Skip to content

Commit ea94ff9

Browse files
committed
wp_get_schedule() from masquerade.
git-svn-id: https://develop.svn.wordpress.org/trunk@4254 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 52a2f4a commit ea94ff9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

wp-includes/cron.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ function wp_get_schedules() {
125125
return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
126126
}
127127

128+
function wp_get_schedule($hook, $args = array()) {
129+
$crons = _get_cron_array();
130+
$key = md5(serialize($args));
131+
if ( empty($crons) )
132+
return false;
133+
foreach ( $crons as $timestamp => $cron ) {
134+
if ( isset( $cron[$hook][$key] ) )
135+
return $cron[$hook][$key]['schedule'];
136+
}
137+
return false;
138+
}
139+
128140
//
129141
// Private functions
130142
//

0 commit comments

Comments
 (0)