WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Disable 3.3 New Feature Tool Tips (11 posts)

  1. oxfordian3
    Member
    Posted 2 years ago #

    I have a WP project that has a lot of Admin customization for the client. I am generally stripping down the Admin with all but the necessary display and function that they need.

    With WP 3.3 come WordPress New Feature Tool Tips. I haven't yet seen a good way to eliminate them. Looking at source code, they appear to be inserted with specific scripts (rather than generalized by title attribute or some other tag). For example:

    <script type="text/javascript">
    		jQuery(document).ready( function($) {
    			var options = {"content":"<h3>Updated Media Uploader<\/h3><p>The single media icon now launches the uploader for all file types, and the new drag and drop interface makes uploading a breeze.<\/p>","position":{"edge":"left","align":"center"}};
    
    			if ( ! options )
    				return;
    
    			options = $.extend( options, {
    				close: function() {
    					$.post( ajaxurl, {
    						pointer: 'wp330_media_uploader',
    						action: 'dismiss-wp-pointer'
    					});
    				}
    			});
    
    			$('#content-add_media').pointer( options ).pointer('open');
    		});
    </script>

    Anyone know a good way to disable these insertions?

  2. Marko Heijnen
    Member
    Posted 2 years ago #

    When you look into the code of WordPress this should work:

    remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );

    This is described in the file wp-admin/includes/template.php and then line 1667

  3. Andrew Nacin
    Lead Developer
    Posted 2 years ago #

    Marko is correct.

  4. oxfordian3
    Member
    Posted 2 years ago #

    Thank you!

  5. pancaketron
    Member
    Posted 2 years ago #

    Is there not a switch in the UI to disable these? I understand the desire to show off all of the new features and all but not allowing people to get rid of them puts the feature on par with Microsoft's "Clippy" Office Assistant.

    I work on WP sites for multiple clients which makes it even more irritating because I end up seeing tips even more often than someone with just one site. If I were installing all sites from scratch I would have no problem making the edit described above but I've been doing upgrades from 3.2.1 so would have to edit the file for each client.

    Please learn from Microsoft's very well known mistake and consider allowing a way for people to turn these things off from the dashboard at the very least or just leaving them off by default and letting users turn them on if they want them.

  6. ThePondermatic
    Member
    Posted 2 years ago #

    I ran into an especially annoying situation. In my preferred browser, Chrome, the "Dismiss" button didn't appear on the pointers at all. I assumed that they went away when I left the page. When they didn't, I had to look up how to get rid of them, then open up another browser specifically to remove them. Please take the pointers out.

  7. Rocket Pixels
    Member
    Posted 2 years ago #

    Figured it out after five minutes of searching the template.php file:

    At about line #1816 changed:

    add_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );

    to:

    remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );

  8. Brian Hogg
    Member
    Posted 2 years ago #

    When disabling in a plugin you're creating, you need to call it from something like the admin_init() hook (rather than just in the content of the main plugin file), ie:

    // Remove the pointer scripts
    function my_remove_pointer_scripts() {
    	remove_action( 'admin_enqueue_scripts', array( 'WP_Internal_Pointers', 'enqueue_scripts' ) );
    }
    
    add_action('admin_init', 'my_remove_pointer_scripts');

    Otherwise I'm guessing the add_action() in template.php is getting called after you try to remove it, thus not working as you'd hoped.

  9. cynthiablue
    Member
    Posted 2 years ago #

    I'm also using Chrome, and there is no dismiss option for the tips in my wordpress dashboard. I see the dismiss when I use Firefox... but I prefer Chrome.

  10. Marko Heijnen
    Member
    Posted 2 years ago #

    That bug you having hasn't to do with this topic. This is about removing them at all.
    Then again I use Chrome a lot and never experienced that issue.

  11. Elan42.com
    Member
    Posted 1 year ago #

    this solution don't works for me ...
    can you be more specific ?

    Also, is there some wp-config, or functions.php, where I can put this code for a specific website other than editing WP code ?

    In the future, I suggest for the developers to add a global option like:
    define('WP_USE_POINTERS', 'OFF');

Topic Closed

This topic has been closed to new replies.

About this Topic