WordPress.org

Make WordPress Core

Ticket #47678: 47678-wp_cron.php.patch

File 47678-wp_cron.php.patch, 813 bytes (added by jrf, 11 months ago)

Simplify wp_cron.php

  • src/wp-cron.php

    From 86bd38e79c542904aaf23894a6bd8444598e2b9f Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sat, 20 Jul 2019 06:46:15 +0200
    Subject: [PATCH] Simplify wp_cron.php
    
    ---
     src/wp-cron.php | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/src/wp-cron.php b/src/wp-cron.php
    index d9a2c94072..1a944c216e 100644
    a b foreach ( $crons as $timestamp => $cronhooks ) { 
    118118                        $schedule = $v['schedule'];
    119119
    120120                        if ( $schedule ) {
    121                                 $new_args = array( $timestamp, $schedule, $hook, $v['args'] );
    122                                 call_user_func_array( 'wp_reschedule_event', $new_args );
     121                                wp_reschedule_event( $timestamp, $schedule, $hook, $v['args'] );
    123122                        }
    124123
    125124                        wp_unschedule_event( $timestamp, $hook, $v['args'] );