Forums

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

  1. oxfordian3
    Member
    Posted 5 months 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 5 months 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
    WordPress Dev
    Posted 5 months ago #

    Marko is correct.

  4. oxfordian3
    Member
    Posted 5 months ago #

    Thank you!

  5. pancaketron
    Member
    Posted 5 months 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 3 months 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. vincarrillo
    Member
    Posted 2 months 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. brianhogg
    Member
    Posted 1 week 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.

Reply

You must log in to post.

About this Topic