cron_schedules filter-hookWP 2.1.0

Filters the non-default cron schedules.

Usage

add_filter( 'cron_schedules', 'wp_kama_cron_schedules_filter' );

/**
 * Function for `cron_schedules` filter-hook.
 * 
 * @param array $new_schedules An array of non-default cron schedules keyed by the schedule name.
 *
 * @return array
 */
function wp_kama_cron_schedules_filter( $new_schedules ){

	// filter...
	return $new_schedules;
}
$new_schedules(array)

An array of non-default cron schedules keyed by the schedule name.

Default: empty array

  • ...$0(array)
    Cron schedule information.

    • interval(int)
      The schedule interval in seconds.

    • display(string)
      The schedule display name.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

wp_get_schedules()
cron_schedules
wp-includes/cron.php 1115
return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );

Where the hook is used in WordPress

Usage not found.