diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-26 15:45:20 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-09-26 15:45:20 +0000 |
| commit | 28781ebb081ab8d99b30a33f5cd911b3b050bcc9 (patch) | |
| tree | f21e6b7d3dd06002c58dd52ae2eae10d64d62d85 /wp-includes/cron.php | |
| parent | cbd939114d362bfece3839d7d5d5e07367fd6be8 (diff) | |
WP Merge to rev 4254
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@770 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/cron.php')
| -rw-r--r-- | wp-includes/cron.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 677fc3c..dd72d82 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -102,7 +102,7 @@ function wp_cron() { return;
$keys = array_keys( $crons );
- if ( $keys[0] > time() )
+ if ( isset($keys[0]) && $keys[0] > time() )
return;
$schedules = wp_get_schedules();
@@ -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
//
|
