Make WordPress Core

Changeset 19410


Ignore:
Timestamp:
11/22/2011 09:50:50 PM (15 years ago)
Author:
markjaquith
Message:

Introduce initial_db_version and leverage it so that pointers only get shown to updated installs, not new 3.3 installs. props nacin. see #18693

Location:
trunk/wp-admin/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r19249 r19410  
    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();
     
    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() ) {
     
    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 )
  • trunk/wp-admin/includes/template.php

    r19389 r19410  
    16781678         */
    16791679        public static function enqueue_scripts( $hook_suffix ) {
     1680                if ( get_site_option( 'initial_db_version' ) >= 19389 ) // 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',
  • trunk/wp-admin/includes/upgrade.php

    r19389 r19410  
    11511151                && is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) )
    11521152                        delete_metadata( 'user', 0, 'dismissed_wp_pointers', '', true );
     1153
     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        }
    11531158
    11541159
Note: See TracChangeset for help on using the changeset viewer.