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:
ryan 2006-09-26 01:14:49 +00:00
parent 6d3a4429f3
commit f73a8c0447

View File

@ -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
//