Don't show pointers for new users. Works for new installs, too. fixes #19360.
git-svn-id: https://develop.svn.wordpress.org/trunk@19489 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8ef374f2e1
commit
15afe56aa9
|
@ -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( 'user_register', array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
|
||||
|
||||
/**
|
||||
* Convert a screen string to a screen object
|
||||
|
|
Loading…
Reference in New Issue