mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-05 16:08:12 +01:00
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
git-svn-id: http://svn.automattic.com/wordpress/trunk@19410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91746f3179
commit
a1fb35ca98
@ -330,7 +330,7 @@ $wp_queries = wp_get_db_schema( 'all' );
|
|||||||
* @uses $wp_db_version
|
* @uses $wp_db_version
|
||||||
*/
|
*/
|
||||||
function populate_options() {
|
function populate_options() {
|
||||||
global $wpdb, $wp_db_version, $current_site;
|
global $wpdb, $wp_db_version, $current_site, $wp_db_current_db_version;
|
||||||
|
|
||||||
$guessurl = wp_guess_url();
|
$guessurl = wp_guess_url();
|
||||||
|
|
||||||
@ -480,6 +480,12 @@ function populate_options() {
|
|||||||
'default_post_format' => 0,
|
'default_post_format' => 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 3.3
|
||||||
|
if ( ! is_multisite() ) {
|
||||||
|
$options['initial_db_version'] = ! empty( $wp_db_current_db_version ) && $wp_current_db_version < $wp_db_version
|
||||||
|
? $wp_current_db_version : $wp_db_version;
|
||||||
|
}
|
||||||
|
|
||||||
// 3.0 multisite
|
// 3.0 multisite
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
/* translators: blog tagline */
|
/* translators: blog tagline */
|
||||||
@ -886,7 +892,8 @@ We hope you enjoy your new site. Thanks!
|
|||||||
'add_new_users' => '0',
|
'add_new_users' => '0',
|
||||||
'upload_space_check_disabled' => '0',
|
'upload_space_check_disabled' => '0',
|
||||||
'subdomain_install' => intval( $subdomain_install ),
|
'subdomain_install' => intval( $subdomain_install ),
|
||||||
'global_terms_enabled' => global_terms_enabled() ? '1' : '0'
|
'global_terms_enabled' => global_terms_enabled() ? '1' : '0',
|
||||||
|
'initial_db_version' => get_option( 'initial_db_version' ),
|
||||||
);
|
);
|
||||||
if ( ! $subdomain_install )
|
if ( ! $subdomain_install )
|
||||||
$sitemeta['illegal_names'][] = 'blog';
|
$sitemeta['illegal_names'][] = 'blog';
|
||||||
|
@ -1677,10 +1677,14 @@ final class WP_Internal_Pointers {
|
|||||||
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp330_toolbar' ) );
|
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp330_toolbar' ) );
|
||||||
*/
|
*/
|
||||||
public static function enqueue_scripts( $hook_suffix ) {
|
public static function enqueue_scripts( $hook_suffix ) {
|
||||||
|
if ( get_site_option( 'initial_db_version' ) >= 19389 ) // Final db_version for 3.3.
|
||||||
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register feature pointers
|
* Register feature pointers
|
||||||
* Format: array( hook_suffix => pointer_id )
|
* Format: array( hook_suffix => pointer_id )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$registered_pointers = array(
|
$registered_pointers = array(
|
||||||
'index.php' => 'wp330_toolbar',
|
'index.php' => 'wp330_toolbar',
|
||||||
'post-new.php' => 'wp330_media_uploader',
|
'post-new.php' => 'wp330_media_uploader',
|
||||||
|
@ -1151,6 +1151,11 @@ function upgrade_330() {
|
|||||||
&& is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) )
|
&& is_main_site() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) )
|
||||||
delete_metadata( 'user', 0, 'dismissed_wp_pointers', '', true );
|
delete_metadata( 'user', 0, 'dismissed_wp_pointers', '', true );
|
||||||
|
|
||||||
|
if ( $wp_current_db_version < 19390 && is_main_site() ) {
|
||||||
|
update_site_option( 'initial_db_version', $wp_current_db_version );
|
||||||
|
// populate_options() will handle single-site.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ( $wp_current_db_version >= 11548 )
|
if ( $wp_current_db_version >= 11548 )
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user