mirror of
git://develop.git.wordpress.org/
synced 2025-02-25 00:52:55 +01:00
wp_get_schedule() from masquerade.
git-svn-id: https://develop.svn.wordpress.org/trunk@4254 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
52a2f4a6e1
commit
ea94ff906d
@ -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…
x
Reference in New Issue
Block a user