Make WordPress Core

Ticket #20537: 20537.2.patch

File 20537.2.patch, 838 bytes (added by kurtpayne, 13 years ago)

Alternate patch

  • wp-includes/cron.php

     
    256256 * @return null When doesn't need to run Cron.
    257257 */
    258258function wp_cron() {
     259        global $current_blog;
    259260
    260261        // Prevent infinite loops caused by lack of wp-cron.php
    261262        if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) )
     
    264265        if ( false === $crons = _get_cron_array() )
    265266                return;
    266267
     268        // Don't process cron for suspended blogs.
     269        if ( is_multisite() && ( $current_blog->archived || $current_blog->spam || $current_blog->deleted ) )
     270                return;
     271
    267272        $local_time = microtime( true );
    268273        $keys = array_keys( $crons );
    269274        if ( isset($keys[0]) && $keys[0] > $local_time )