wp_get_schedule() – Retrieve the recurrence schedule for an event.
You appear to be a bot. Output may be restricted
Description
Retrieves the name of the recurrence schedule for an event.
Usage
$string|false = wp_get_schedule( $hook, $args );
Parameters
- $hook
- ( string ) required – Action hook to identify the event.
- $args
- ( array ) optional – Optional. Arguments passed to the event's callback function. Default empty array.
Returns
string|false Schedule name on success, false if no schedule.
Source
File name: wordpress/wp-includes/cron.php
Lines:
1 to 19 of 19
function wp_get_schedule( $hook, $args = array() ) { $schedule = false; $event = wp_get_scheduled_event( $hook, $args ); if ( $event ) { $schedule = $event->schedule; } /** * Filters the schedule name for a hook. * * @since 5.1.0 * * @param string|false $schedule Schedule for the hook. False if not found. * @param string $hook Action hook to execute when cron is run. * @param array $args Arguments to pass to the hook's callback function. */ return apply_filters( 'get_schedule', $schedule, $hook, $args ); }