Make WordPress Core

Ticket #5637: cron.phpdoc.r6597.diff

File cron.phpdoc.r6597.diff, 5.0 KB (added by darkdragon, 16 years ago)

Incomplete documentation for cron.php based off of r6597

  • cron.php

     
    11<?php
    22
     3/**
     4 * wp_schedule_single_event() - {@internal Missing Short Description}}
     5 *
     6 * {@internal Missing Long Description}}
     7 *
     8 * @since 2.1.0
     9 *
     10 * @param unknown_type $timestamp
     11 * @param unknown_type $hook
     12 * @param unknown_type $args
     13 */
    314function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
    415        $crons = _get_cron_array();
    516        $key = md5(serialize($args));
     
    819        _set_cron_array( $crons );
    920}
    1021
     22/**
     23 * wp_schedule_event() - {@internal Missing Short Description}}
     24 *
     25 * {@internal Missing Long Description}}
     26 *
     27 * @since 2.1.0
     28 *
     29 * @param unknown_type $timestamp
     30 * @param unknown_type $recurrence
     31 * @param unknown_type $hook
     32 * @param unknown_type $args
     33 * @return unknown
     34 */
    1135function wp_schedule_event( $timestamp, $recurrence, $hook, $args = array()) {
    1236        $crons = _get_cron_array();
    1337        $schedules = wp_get_schedules();
     
    1943        _set_cron_array( $crons );
    2044}
    2145
     46/**
     47 * wp_reschedule_event() - {@internal Missing Short Description}}
     48 *
     49 * {@internal Missing Long Description}}
     50 *
     51 * @since 2.1.0
     52 *
     53 * @param unknown_type $timestamp
     54 * @param unknown_type $recurrence
     55 * @param unknown_type $hook
     56 * @param unknown_type $args
     57 * @return unknown
     58 */
    2259function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) {
    2360        $crons = _get_cron_array();
    2461        $schedules = wp_get_schedules();
     
    4178        wp_schedule_event( $timestamp, $recurrence, $hook, $args );
    4279}
    4380
     81/**
     82 * wp_unschedule_event() - {@internal Missing Short Description}}
     83 *
     84 * {@internal Missing Long Description}}
     85 *
     86 * @since 2.1.0
     87 *
     88 * @param unknown_type $timestamp
     89 * @param unknown_type $hook
     90 * @param unknown_type $args
     91 */
    4492function wp_unschedule_event( $timestamp, $hook, $args = array() ) {
    4593        $crons = _get_cron_array();
    4694        $key = md5(serialize($args));
     
    52100        _set_cron_array( $crons );
    53101}
    54102
     103/**
     104 * wp_clear_scheduled_hook() - {@internal Missing Short Description}}
     105 *
     106 * {@internal Missing Long Description}}
     107 *
     108 * @since 2.1.0
     109 *
     110 * @param unknown_type $hook
     111 */
    55112function wp_clear_scheduled_hook( $hook ) {
    56113        $args = array_slice( func_get_args(), 1 );
    57114
     
    59116                wp_unschedule_event( $timestamp, $hook, $args );
    60117}
    61118
     119/**
     120 * wp_next_scheduled() - {@internal Missing Short Description}}
     121 *
     122 * {@internal Missing Long Description}}
     123 *
     124 * @since 2.1.0
     125 *
     126 * @param unknown_type $hook
     127 * @param unknown_type $args
     128 * @return unknown
     129 */
    62130function wp_next_scheduled( $hook, $args = array() ) {
    63131        $crons = _get_cron_array();
    64132        $key = md5(serialize($args));
     
    71139        return false;
    72140}
    73141
     142/**
     143 * spawn_cron() - {@internal Missing Short Description}}
     144 *
     145 * {@internal Missing Long Description}}
     146 *
     147 * @since 2.1.0
     148 *
     149 * @return unknown
     150 */
    74151function spawn_cron() {
    75152        $crons = _get_cron_array();
    76153
     
    104181                );
    105182}
    106183
     184/**
     185 * wp_cron() - {@internal Missing Short Description}}
     186 *
     187 * {@internal Missing Long Description}}
     188 *
     189 * @since 2.1.0
     190 *
     191 */
    107192function wp_cron() {
    108193        // Prevent infinite loops caused by lack of wp-cron.php
    109194        if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false )
     
    130215        }
    131216}
    132217
     218/**
     219 * wp_get_schedules() - {@internal Missing Short Description}}
     220 *
     221 * {@internal Missing Long Description}}
     222 *
     223 * @since 2.1.0
     224 *
     225 * @return unknown
     226 */
    133227function wp_get_schedules() {
    134228        $schedules = array(
    135229                'hourly' => array( 'interval' => 3600, 'display' => __('Once Hourly') ),
     
    138232        return array_merge( apply_filters( 'cron_schedules', array() ), $schedules );
    139233}
    140234
     235/**
     236 * wp_get_schedule() - {@internal Missing Short Description}}
     237 *
     238 * {@internal Missing Long Description}}
     239 *
     240 * @since 2.1.0
     241 *
     242 * @param unknown_type $hook
     243 * @param unknown_type $args
     244 * @return unknown
     245 */
    141246function wp_get_schedule($hook, $args = array()) {
    142247        $crons = _get_cron_array();
    143248        $key = md5(serialize($args));
     
    154259// Private functions
    155260//
    156261
     262/**
     263 * _get_cron_array() - {@internal Missing Short Description}}
     264 *
     265 * {@internal Missing Long Description}}
     266 *
     267 * @since 2.1.0
     268 * @access private
     269 *
     270 * @return unknown
     271 */
    157272function _get_cron_array()  {
    158273        $cron = get_option('cron');
    159274        if ( ! is_array($cron) )
     
    167282        return $cron;
    168283}
    169284
     285/**
     286 * _set_cron_array() - {@internal Missing Short Description}}
     287 *
     288 * {@internal Missing Long Description}}
     289 *
     290 * @since 2.1.0
     291 * @access private
     292 *
     293 * @param unknown_type $cron
     294 */
    170295function _set_cron_array($cron) {
    171296        $cron['version'] = 2;
    172297        update_option( 'cron', $cron );
    173298}
    174299
     300/**
     301 * _update_cron_array() - {@internal Missing Short Description}}
     302 *
     303 * {@internal Missing Long Description}}
     304 *
     305 * @since 2.1.0
     306 *
     307 * @param unknown_type $cron
     308 * @return unknown
     309 */
    175310function _upgrade_cron_array($cron) {
    176311        if ( isset($cron['version']) && 2 == $cron['version'])
    177312                return $cron;
     
    190325        return $new_cron;
    191326}
    192327
    193 ?>
     328?>
     329 No newline at end of file