From ea94ff906df477389afa5264dfebccda874d7dcd Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 26 Sep 2006 01:14:49 +0000 Subject: [PATCH] wp_get_schedule() from masquerade. git-svn-id: https://develop.svn.wordpress.org/trunk@4254 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/cron.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wp-includes/cron.php b/wp-includes/cron.php index fb93b5a488..511e7f9356 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -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 //