Make WordPress Core

Ticket #49866: wp-cron.php.patch

File wp-cron.php.patch, 1.3 KB (added by nishisan, 6 years ago)

wp-cron.php Patch for new hooks

  • wp-cron.php

    old new  
    126126
    127127                        wp_unschedule_event( $timestamp, $hook, $v['args'] );
    128128
     129
     130                        /**
     131                          * Fires the pre_wp_cron_run to call the associated filters
     132                          * @ignore
     133                      * @since 5.4.0
     134                          * @param string $hook Name of the hook that was scheduled to be fired.
     135                          * @param string $wp_cron_uuid Unique UUID for this hook execution context.
     136                          */
     137
     138
     139                        // Create an Unique UUID to we can track this execution context
     140                        $wp_cron_uuid = wp_generate_uuid4();
     141               
     142                        do_action('pre_wp_cron_run',$hook,$wp_cron_uuid);
     143
    129144                        /**
    130145                         * Fires scheduled events.
    131146                         *
     
    137152                         */
    138153                        do_action_ref_array( $hook, $v['args'] );
    139154
     155                        /**
     156              * Fires the post_wp_cron_run to call the associated filters
     157              * @ignore
     158              * @since 5.4.0
     159                          * @param string $hook Name of the hook that was scheduled to be fired.
     160              * @param string $wp_cron_uuid Unique UUID for this hook execution context.
     161              */
     162            do_action('post_wp_cron_run',$hook,$wp_cron_uuid);
     163               
    140164                        // If the hook ran too long and another cron process stole the lock, quit.
    141165                        if ( _get_cron_lock() !== $doing_wp_cron ) {
    142166                                return;