Make WordPress Core


Ignore:
Timestamp:
11/30/2011 04:05:59 PM (13 years ago)
Author:
nacin
Message:

Don't show pointers for new users. Works for new installs, too. fixes #19360.

File:
1 edited

Legend:

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

    r19488 r19489  
    16781678     */
    16791679    public static function enqueue_scripts( $hook_suffix ) {
    1680         if ( get_site_option( 'initial_db_version' ) >= 20000 ) // Final db_version for 3.3.
    1681             return;
    1682 
    16831680        /*
    16841681         * Register feature pointers
     
    18061803        ) );
    18071804    }
    1808 }
    1809 
    1810 add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
     1805
     1806    /**
     1807     * Prevents new users from seeing existing 'new feature' pointers.
     1808     *
     1809     * @since 3.3.0
     1810     */
     1811    public static function dismiss_pointers_for_new_users( $user_id ) {
     1812        add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_media_uploader,wp330_saving_widgets' );
     1813    }
     1814}
     1815
     1816add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts'                ) );
     1817add_action( 'user_register',         array( 'WP_Internal_Pointers', 'dismiss_pointers_for_new_users' ) );
    18111818
    18121819/**
Note: See TracChangeset for help on using the changeset viewer.