Changeset 4254

Show
Ignore:
Timestamp:
09/26/06 01:14:49 (2 years ago)
Author:
ryan
Message:

wp_get_schedule() from masquerade.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/cron.php

    r4221 r4254  
    126126} 
    127127 
     128function 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