WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (20 months ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r45932 r47122  
    2828
    2929    global $wpdb, $wp_local_package;
    30     // include an unmodified $wp_version
     30    // Include an unmodified $wp_version.
    3131    include( ABSPATH . WPINC . '/version.php' );
    3232    $php_version = phpversion();
     
    3535    $translations = wp_get_installed_translations( 'core' );
    3636
    37     // Invalidate the transient when $wp_version changes
     37    // Invalidate the transient when $wp_version changes.
    3838    if ( is_object( $current ) && $wp_version != $current->version_checked ) {
    3939        $current = false;
     
    5050    }
    5151
    52     // Wait 60 seconds between multiple version check requests
    53     $timeout          = 60;
     52    // Wait 1 minute between multiple version check requests.
     53    $timeout          = MINUTE_IN_SECONDS;
    5454    $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
    5555    if ( ! $force_check && $time_not_changed ) {
     
    6666    $locale = apply_filters( 'core_version_check_locale', get_locale() );
    6767
    68     // Update last_checked for current to prevent multiple blocking requests if request hangs
     68    // Update last_checked for current to prevent multiple blocking requests if request hangs.
    6969    $current->last_checked = time();
    7070    set_site_transient( 'update_core', $current );
     
    261261    }
    262262
    263     // include an unmodified $wp_version
     263    // Include an unmodified $wp_version.
    264264    include( ABSPATH . WPINC . '/version.php' );
    265265
    266     // If running blog-side, bail unless we've not checked in the last 12 hours
     266    // If running blog-side, bail unless we've not checked in the last 12 hours.
    267267    if ( ! function_exists( 'get_plugins' ) ) {
    268268        require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     
    324324        }
    325325
    326         // Bail if we've checked recently and if nothing has changed
     326        // Bail if we've checked recently and if nothing has changed.
    327327        if ( ! $plugin_changed ) {
    328328            return;
     
    330330    }
    331331
    332     // Update last_checked for current to prevent multiple blocking requests if request hangs
     332    // Update last_checked for current to prevent multiple blocking requests if request hangs.
    333333    $current->last_checked = time();
    334334    set_site_transient( 'update_plugins', $current );
     
    352352        $timeout = 30;
    353353    } else {
    354         // Three seconds, plus one extra second for every 10 plugins
     354        // Three seconds, plus one extra second for every 10 plugins.
    355355        $timeout = 3 + (int) ( count( $plugins ) / 10 );
    356356    }
     
    441441    }
    442442
    443     // include an unmodified $wp_version
     443    // Include an unmodified $wp_version.
    444444    include( ABSPATH . WPINC . '/version.php' );
    445445
     
    514514        }
    515515
    516         // Bail if we've checked recently and if nothing has changed
     516        // Bail if we've checked recently and if nothing has changed.
    517517        if ( ! $theme_changed ) {
    518518            return;
     
    520520    }
    521521
    522     // Update last_checked for current to prevent multiple blocking requests if request hangs
     522    // Update last_checked for current to prevent multiple blocking requests if request hangs.
    523523    $last_update->last_checked = time();
    524524    set_site_transient( 'update_themes', $last_update );
     
    542542        $timeout = 30;
    543543    } else {
    544         // Three seconds, plus one extra second for every 10 themes
     544        // Three seconds, plus one extra second for every 10 themes.
    545545        $timeout = 3 + (int) ( count( $themes ) / 10 );
    546546    }
     
    729729 */
    730730function _maybe_update_core() {
    731     // include an unmodified $wp_version
     731    // Include an unmodified $wp_version.
    732732    include( ABSPATH . WPINC . '/version.php' );
    733733
Note: See TracChangeset for help on using the changeset viewer.