Make WordPress Core

Ticket #35323: 35323.diff

File 35323.diff, 4.5 KB (added by dd32, 8 years ago)
  • src/wp-includes/update.php

    function _maybe_update_themes() { 
    635641
    636642/**
    637643 * Schedule core, theme, and plugin update checks.
    638644 *
    639645 * @since 3.1.0
    640646 */
    641647function wp_schedule_update_checks() {
    642648        if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() )
    643649                wp_schedule_event(time(), 'twicedaily', 'wp_version_check');
    644650
    645651        if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() )
    646652                wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins');
    647653
    648654        if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() )
    649655                wp_schedule_event(time(), 'twicedaily', 'wp_update_themes');
    650 
    651         if ( ! wp_next_scheduled( 'wp_maybe_auto_update' ) && ! wp_installing() ) {
    652                 // Schedule auto updates for 7 a.m. and 7 p.m. in the timezone of the site.
    653                 $next = strtotime( 'today 7am' );
    654                 $now = time();
    655                 // Find the next instance of 7 a.m. or 7 p.m., but skip it if it is within 3 hours from now.
    656                 while ( ( $now + 3 * HOUR_IN_SECONDS ) > $next ) {
    657                         $next += 12 * HOUR_IN_SECONDS;
    658                 }
    659                 $next = $next - get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
    660                 // Add a random number of minutes, so we don't have all sites trying to update exactly on the hour
    661                 $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;
    662                 wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );
    663         }
    664656}
    665657
    666658/**
    667659 * Clear existing update caches for plugins, themes, and core.
    668660 *
    669661 * @since 4.1.0
    670662 */
    671663function wp_clean_update_cache() {
    672664        if ( function_exists( 'wp_clean_plugins_cache' ) ) {
    673665                wp_clean_plugins_cache();
    674666        } else {
    675667                delete_site_transient( 'update_plugins' );
    676668        }
    677669        wp_clean_themes_cache();
    678670        delete_site_transient( 'update_core' );
  • src/wp-admin/includes/upgrade.php

    function upgrade_all() { 
    537537        if ( $wp_current_db_version < 26691 )
    538538                upgrade_380();
    539539
    540540        if ( $wp_current_db_version < 29630 )
    541541                upgrade_400();
    542542
    543543        if ( $wp_current_db_version < 33055 )
    544544                upgrade_430();
    545545
    546546        if ( $wp_current_db_version < 33056 )
    547547                upgrade_431();
    548548
    549549        if ( $wp_current_db_version < 35700 )
    550550                upgrade_440();
    551551
     552        if ( $wp_current_db_version < 35701 )
     553                upgrade_450();
     554
    552555        maybe_disable_link_manager();
    553556
    554557        maybe_disable_automattic_widgets();
    555558
    556559        update_option( 'db_version', $wp_db_version );
    557560        update_option( 'db_upgraded', true );
    558561}
    559562
    560563/**
    561564 * Execute changes made in WordPress 1.0.
    562565 *
    563566 * @ignore
    564567 * @since 1.0.0
    565568 *
    566569 * @global wpdb $wpdb WordPress database abstraction object.
    function upgrade_440() { 
    16481651
    16491652        if ( $wp_current_db_version < 34030 ) {
    16501653                $wpdb->query( "ALTER TABLE {$wpdb->options} MODIFY option_name VARCHAR(191)" );
    16511654        }
    16521655
    16531656        // Remove the unused 'add_users' role.
    16541657        $roles = wp_roles();
    16551658        foreach ( $roles->role_objects as $role ) {
    16561659                if ( $role->has_cap( 'add_users' ) ) {
    16571660                        $role->remove_cap( 'add_users' );
    16581661                }
    16591662        }
    16601663}
    16611664
    16621665/**
     1666 * Execute changes made in WordPress 4.5.0
     1667 *
     1668 * @ignore
     1669 * @since 4.5.0
     1670 *
     1671 * @global int $wp_current_db_version
     1672 */
     1673function upgrade_450() {
     1674        global $wp_current_db_version;
     1675        if ( $wp_current_db_version < 35701 )
     1676                wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
     1677}
     1678
     1679/**
    16631680 * Executes network-level upgrade routines.
    16641681 *
    16651682 * @since 3.0.0
    16661683 *
    16671684 * @global int   $wp_current_db_version
    16681685 * @global wpdb  $wpdb
    16691686 */
    16701687function upgrade_network() {
    16711688        global $wp_current_db_version, $wpdb;
    16721689
    16731690        // Always.
    16741691        if ( is_main_network() ) {
    16751692                /*
    16761693                 * Deletes all expired transients. The multi-table delete syntax is used
    16771694                 * to delete the transient record from table a, and the corresponding
  • src/wp-includes/version.php

     
    11<?php
    22/**
    33 * The WordPress version string
    44 *
    55 * @global string $wp_version
    66 */
    77$wp_version = '4.5-alpha-35776-src';
    88
    99/**
    1010 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
    1111 *
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 35700;
     14$wp_db_version = 35701;
    1515
    1616/**
    1717 * Holds the TinyMCE version
    1818 *
    1919 * @global string $tinymce_version
    2020 */
    2121$tinymce_version = '4208-20151113';
    2222
    2323/**
    2424 * Holds the required PHP version
    2525 *
    2626 * @global string $required_php_version
    2727 */
    2828$required_php_version = '5.2.4';
    2929