cron_schedules
Filters the non-default cron schedules.
Description
Parameters (1)
- 0. $array (array) =>
array()
- An array of non-default cron schedules. Default empty.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'cron_schedules', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the cron_schedules callback
- function filter_cron_schedules( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'cron_schedules', 'filter_cron_schedules', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'cron_schedules', 'filter_cron_schedules', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /wp-includes/cron.php
- return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );