mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Don't show pointers for new users. Works for new installs, too. fixes #19360.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63b2f4c6e7
commit
31c8813108
@ -1677,9 +1677,6 @@ final class WP_Internal_Pointers {
|
||||
* remove_action( 'admin_print_footer_scripts', array( 'WP_Internal_Pointers', 'pointer_wp330_toolbar' ) );
|
||||
*/
|
||||
public static function enqueue_scripts( $hook_suffix ) {
|
||||
if ( get_site_option( 'initial_db_version' ) >= 20000 ) // Final db_version for 3.3.
|
||||
return;
|
||||
|
||||
/*
|
||||
* Register feature pointers
|
||||
* Format: array( hook_suffix => pointer_id )
|
||||
@ -1805,9 +1802,19 @@ final class WP_Internal_Pointers {
|
||||
'position' => array( 'edge' => 'top', 'align' => is_rtl() ? 'right' : 'left' ),
|
||||
) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents new users from seeing existing 'new feature' pointers.
|
||||
*
|
||||
* @since 3.3.0
|
||||
*/
|
||||
public static function dismiss_pointers_for_new_users( $user_id ) {
|
||||
add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_media_uploader,wp330_saving_widgets' );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
|
||||
add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
|
||||
add_action( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
|
||||
|
||||
/**
|
||||
* Convert a screen string to a screen object
|
||||
|
Loading…
Reference in New Issue
Block a user