Make WordPress Core


Ignore:
Timestamp:
10/20/2011 12:23:35 AM (15 years ago)
Author:
nacin
Message:

Check for plugin/theme updates every hour when hitting update-core.php, not just themes.php/plugins.php. see #18876.

File:
1 edited

Legend:

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

    r19021 r19022  
    144144        $new_option = new stdClass;
    145145        $new_option->last_checked = time();
    146         $timeout = 'load-plugins.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours
     146        // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours.
     147        $timeout = in_array( current_filter(), array( 'load-plugins.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200;
    147148        $time_not_changed = isset( $current->last_checked ) && $timeout > ( time() - $current->last_checked );
    148149
     
    222223                $last_update = new stdClass;
    223224
    224         $timeout = 'load-themes.php' == current_filter() ? 3600 : 43200; //Check for updated every 60 minutes if hitting the themes page, Else, check every 12 hours
     225        // Check for updated every 60 minutes if hitting update pages; else, check every 12 hours.
     226        $timeout = in_array( current_filter(), array( 'load-themes.php', 'load-update.php', 'load-update-core.php' ) ) ? 3600 : 43200;
    225227        $time_not_changed = isset( $last_update->last_checked ) && $timeout > ( time( ) - $last_update->last_checked );
    226228
Note: See TracChangeset for help on using the changeset viewer.