From f73a8c04474afacef6c2c0fffca27c18bb232385 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Sep 2006 01:14:49 +0000 Subject: [PATCH] wp_get_schedule() from masquerade. git-svn-id: http://svn.automattic.com/wordpress/trunk@4254 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 //