Make WordPress Core

Changeset 4254


Ignore:
Timestamp:
09/26/2006 01:14:49 AM (20 years ago)
Author:
ryan
Message:

wp_get_schedule() from masquerade.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.