Make WordPress Core

Ticket #44118: 44118.diff

File 44118.diff, 1.5 KB (added by pbiron, 4 years ago)

refreshing patch

  • src/wp-includes/update.php

    From f10c6f6f3bcdc465d19ab03ea1af76b1537a14df Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Thu, 6 May 2021 15:58:23 -0600
    Subject: [PATCH] Refresh patch.
    
    ---
     src/wp-includes/update.php | 11 ++++++-----
     1 file changed, 6 insertions(+), 5 deletions(-)
    
    diff --git a/src/wp-includes/update.php b/src/wp-includes/update.php
    index d4b538e29d..3e9b4406f4 100644
    a b function wp_update_plugins( $extra_stats = array() ) { 
    296296                $current = new stdClass;
    297297        }
    298298
    299         $new_option               = new stdClass;
    300         $new_option->last_checked = time();
    301 
    302299        $doing_cron = wp_doing_cron();
    303300
    304301        // Check for update on a different schedule, depending on the page.
    function wp_update_plugins( $extra_stats = array() ) { 
    327324                $plugin_changed = false;
    328325
    329326                foreach ( $plugins as $file => $p ) {
    330                         $new_option->checked[ $file ] = $p['Version'];
    331 
    332327                        if ( ! isset( $current->checked[ $file ] ) || (string) $current->checked[ $file ] !== (string) $p['Version'] ) {
    333328                                $plugin_changed = true;
    334329                        }
    function wp_update_plugins( $extra_stats = array() ) { 
    416411                return;
    417412        }
    418413
     414        $new_option               = new stdClass;
     415        $new_option->last_checked = time();
     416        foreach ( $plugins as $file => $p ) {
     417                $new_option->checked[ $file ] = $p['Version'];
     418        }
     419
    419420        $response = json_decode( wp_remote_retrieve_body( $raw_response ), true );
    420421
    421422        foreach ( $response['plugins'] as &$plugin ) {