Make WordPress Core

Ticket #7550: 7550.r8927.diff

File 7550.r8927.diff, 2.6 KB (added by jacobsantos, 16 years ago)

Fixes for general-template.php and update.php based off of r8927

  • general-template.php

     
    17311731 * @param string $file Style handle name or file name (without ".css" extension) relative to wp-admin/
    17321732 * @param bool $force_echo Optional.  Force the stylesheet link to be printed rather than enqueued.
    17331733 */
    1734 
    17351734function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
    17361735        global $wp_styles;
    17371736        if ( !is_a($wp_styles, 'WP_Styles') )
  • update.php

     
    33 * A simple set of functions to check our version 1.0 update service.
    44 *
    55 * @package WordPress
    6  * @since 2.3
     6 * @since 2.3.0
    77 */
    88
    99/**
     
    8484 *
    8585 * The WordPress version, PHP version, and Locale is sent along with a list of
    8686 * all plugins installed. Checks against the WordPress server at
    87  * api.wordpress.org. Will only check if PHP has fsockopen enabled and WordPress
    88  * isn't installing.
     87 * api.wordpress.org. Will only check if WordPress isn't installing.
    8988 *
    9089 * @package WordPress
    9190 * @since 2.3.0
     
    169168 * Check theme versions against the latest versions hosted on WordPress.org.
    170169 *
    171170 * A list of all themes installed in sent to WP. Checks against the
    172  * WordPress server at api.wordpress.org. Will only check if PHP has
    173  * fsockopen enabled and WordPress isn't installing.
     171 * WordPress server at api.wordpress.org. Will only check if WordPress isn't
     172 * installing.
    174173 *
    175174 * @package WordPress
    176175 * @since 2.7.0
     
    233232        update_option( 'update_themes', $new_option );
    234233}
    235234
     235/**
     236 * Check the last time plugins were run before checking plugin versions.
     237 *
     238 * This might have been backported to WordPress 2.6.1 for performance reasons.
     239 * This is used for the wp-admin to check only so often instead of every page
     240 * load.
     241 *
     242 * @since 2.7.0
     243 * @access private
     244 */
    236245function _maybe_update_plugins() {
    237246        $current = get_option( 'update_plugins' );
    238247        if ( isset( $current->last_checked ) && 43200 > ( time() - $current->last_checked ) )
     
    240249        wp_update_plugins();
    241250}
    242251
     252/**
     253 * Check themes versions only after a duration of time.
     254 *
     255 * This is for performance reasons to make sure that on the theme version
     256 * checker is not run on every page load.
     257 *
     258 * @since 2.7.0
     259 * @access private
     260 */
    243261function _maybe_update_themes( ) {
    244262        $current = get_option( 'update_themes' );
    245263        if( isset( $current->last_checked ) && 43200 > ( time( ) - $current->last_checked ) )