get_schedule
Filter HookDescription
Filters the schedule name for a hook.Hook Information
File Location |
wp-includes/cron.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1169 |
Hook Parameters
Type | Name | Description |
---|---|---|
string|false
|
$schedule
|
Schedule for the hook. False if not found. |
string
|
$hook
|
Action hook to execute when cron is run. |
array
|
$args
|
Arguments to pass to the hook's callback function. |
Usage Examples
Basic Usage
<?php
// Hook into get_schedule
add_filter('get_schedule', 'my_custom_filter', 10, 3);
function my_custom_filter($schedule, $hook, $args) {
// Your custom filtering logic here
return $schedule;
}
Source Code Context
wp-includes/cron.php:1169
- How this hook is used in WordPress core
<?php
1164 *
1165 * @param string|false $schedule Schedule for the hook. False if not found.
1166 * @param string $hook Action hook to execute when cron is run.
1167 * @param array $args Arguments to pass to the hook's callback function.
1168 */
1169 return apply_filters( 'get_schedule', $schedule, $hook, $args );
1170 }
1171
1172 /**
1173 * Retrieves cron jobs ready to be run.
1174 *
PHP Documentation
<?php
/**
* 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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/cron.php
Related Hooks
Related hooks will be displayed here in future updates.