Ticket #35323: 35323.diff
File 35323.diff, 4.5 KB (added by , 9 years ago) |
---|
-
src/wp-includes/update.php
function _maybe_update_themes() { 635 641 636 642 /** 637 643 * Schedule core, theme, and plugin update checks. 638 644 * 639 645 * @since 3.1.0 640 646 */ 641 647 function wp_schedule_update_checks() { 642 648 if ( ! wp_next_scheduled( 'wp_version_check' ) && ! wp_installing() ) 643 649 wp_schedule_event(time(), 'twicedaily', 'wp_version_check'); 644 650 645 651 if ( ! wp_next_scheduled( 'wp_update_plugins' ) && ! wp_installing() ) 646 652 wp_schedule_event(time(), 'twicedaily', 'wp_update_plugins'); 647 653 648 654 if ( ! wp_next_scheduled( 'wp_update_themes' ) && ! wp_installing() ) 649 655 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 hour661 $next = $next + rand( 0, 59 ) * MINUTE_IN_SECONDS;662 wp_schedule_event( $next, 'twicedaily', 'wp_maybe_auto_update' );663 }664 656 } 665 657 666 658 /** 667 659 * Clear existing update caches for plugins, themes, and core. 668 660 * 669 661 * @since 4.1.0 670 662 */ 671 663 function wp_clean_update_cache() { 672 664 if ( function_exists( 'wp_clean_plugins_cache' ) ) { 673 665 wp_clean_plugins_cache(); 674 666 } else { 675 667 delete_site_transient( 'update_plugins' ); 676 668 } 677 669 wp_clean_themes_cache(); 678 670 delete_site_transient( 'update_core' ); -
src/wp-admin/includes/upgrade.php
function upgrade_all() { 537 537 if ( $wp_current_db_version < 26691 ) 538 538 upgrade_380(); 539 539 540 540 if ( $wp_current_db_version < 29630 ) 541 541 upgrade_400(); 542 542 543 543 if ( $wp_current_db_version < 33055 ) 544 544 upgrade_430(); 545 545 546 546 if ( $wp_current_db_version < 33056 ) 547 547 upgrade_431(); 548 548 549 549 if ( $wp_current_db_version < 35700 ) 550 550 upgrade_440(); 551 551 552 if ( $wp_current_db_version < 35701 ) 553 upgrade_450(); 554 552 555 maybe_disable_link_manager(); 553 556 554 557 maybe_disable_automattic_widgets(); 555 558 556 559 update_option( 'db_version', $wp_db_version ); 557 560 update_option( 'db_upgraded', true ); 558 561 } 559 562 560 563 /** 561 564 * Execute changes made in WordPress 1.0. 562 565 * 563 566 * @ignore 564 567 * @since 1.0.0 565 568 * 566 569 * @global wpdb $wpdb WordPress database abstraction object. … … function upgrade_440() { 1648 1651 1649 1652 if ( $wp_current_db_version < 34030 ) { 1650 1653 $wpdb->query( "ALTER TABLE {$wpdb->options} MODIFY option_name VARCHAR(191)" ); 1651 1654 } 1652 1655 1653 1656 // Remove the unused 'add_users' role. 1654 1657 $roles = wp_roles(); 1655 1658 foreach ( $roles->role_objects as $role ) { 1656 1659 if ( $role->has_cap( 'add_users' ) ) { 1657 1660 $role->remove_cap( 'add_users' ); 1658 1661 } 1659 1662 } 1660 1663 } 1661 1664 1662 1665 /** 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 */ 1673 function 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 /** 1663 1680 * Executes network-level upgrade routines. 1664 1681 * 1665 1682 * @since 3.0.0 1666 1683 * 1667 1684 * @global int $wp_current_db_version 1668 1685 * @global wpdb $wpdb 1669 1686 */ 1670 1687 function upgrade_network() { 1671 1688 global $wp_current_db_version, $wpdb; 1672 1689 1673 1690 // Always. 1674 1691 if ( is_main_network() ) { 1675 1692 /* 1676 1693 * Deletes all expired transients. The multi-table delete syntax is used 1677 1694 * to delete the transient record from table a, and the corresponding -
src/wp-includes/version.php
1 1 <?php 2 2 /** 3 3 * The WordPress version string 4 4 * 5 5 * @global string $wp_version 6 6 */ 7 7 $wp_version = '4.5-alpha-35776-src'; 8 8 9 9 /** 10 10 * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. 11 11 * 12 12 * @global int $wp_db_version 13 13 */ 14 $wp_db_version = 3570 0;14 $wp_db_version = 35701; 15 15 16 16 /** 17 17 * Holds the TinyMCE version 18 18 * 19 19 * @global string $tinymce_version 20 20 */ 21 21 $tinymce_version = '4208-20151113'; 22 22 23 23 /** 24 24 * Holds the required PHP version 25 25 * 26 26 * @global string $required_php_version 27 27 */ 28 28 $required_php_version = '5.2.4'; 29 29