mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
wp_get_schedule() from masquerade.
git-svn-id: http://svn.automattic.com/wordpress/trunk@4254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6d3a4429f3
commit
f73a8c0447
@ -125,6 +125,18 @@ function wp_get_schedules() {
|
||||
return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
|
||||
}
|
||||
|
||||
function wp_get_schedule($hook, $args = array()) {
|
||||
$crons = _get_cron_array();
|
||||
$key = md5(serialize($args));
|
||||
if ( empty($crons) )
|
||||
return false;
|
||||
foreach ( $crons as $timestamp => $cron ) {
|
||||
if ( isset( $cron[$hook][$key] ) )
|
||||
return $cron[$hook][$key]['schedule'];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Private functions
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user