Make WordPress Core

Ticket #18693: 18693.5.diff

File 18693.5.diff, 2.5 KB (added by nacin, 14 years ago)
  • wp-admin/includes/upgrade.php

     
    11511151                && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) )
    11521152                        delete_metadata( 'user', 0, 'dismissed_wp_pointers', '', true );
    11531153
     1154        if ( $wp_current_db_version < 19390 && is_main_site() ) {
     1155                update_site_option( 'initial_db_version', $wp_current_db_version );
     1156                // populate_options() will handle single-site.
     1157        }
    11541158
     1159
    11551160        if ( $wp_current_db_version >= 11548 )
    11561161                return;
    11571162
  • wp-admin/includes/schema.php

     
    330330 * @uses $wp_db_version
    331331 */
    332332function populate_options() {
    333         global $wpdb, $wp_db_version, $current_site;
     333        global $wpdb, $wp_db_version, $current_site, $wp_db_current_db_version;
    334334
    335335        $guessurl = wp_guess_url();
    336336
     
    480480        'default_post_format' => 0,
    481481        );
    482482
     483        // 3.3
     484        if ( ! is_multisite() ) {
     485                $options['initial_db_version'] = ! empty( $wp_db_current_db_version ) && $wp_current_db_version < $wp_db_version
     486                        ? $wp_current_db_version : $wp_db_version;
     487        }
     488
    483489        // 3.0 multisite
    484490        if ( is_multisite() ) {
    485491                /* translators: blog tagline */
     
    886892                'add_new_users' => '0',
    887893                'upload_space_check_disabled' => '0',
    888894                'subdomain_install' => intval( $subdomain_install ),
    889                 'global_terms_enabled' => global_terms_enabled() ? '1' : '0'
     895                'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
     896                'initial_db_version' => get_option( 'initial_db_version' ),
    890897        );
    891898        if ( ! $subdomain_install )
    892899                $sitemeta['illegal_names'][] = 'blog';
  • wp-admin/includes/template.php

     
    16771677         *     remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp330_toolbar' ) );
    16781678         */
    16791679        public static function enqueue_scripts( $hook_suffix ) {
     1680                if ( get_site_option( 'initial_db_version' ) >= 99999 ) // Final db_version for 3.3.
     1681                        return;
     1682
    16801683                /*
    16811684                 * Register feature pointers
    16821685                 * Format: array( hook_suffix => pointer_id )
    16831686                 */
     1687
    16841688                $registered_pointers = array(
    16851689                        'index.php'    => 'wp330_toolbar',
    16861690                        'post-new.php' => 'wp330_media_uploader',