• Resolved oxfordian3

    (@oxfordian3)


    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?

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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

    Marko is correct.

    Thread Starter oxfordian3

    (@oxfordian3)

    Thank you!

    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.

    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.

    Doctor Dave

    (@vincarrillo)

    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' ) );

    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.

    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.

    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.

    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’);

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Disable 3.3 New Feature Tool Tips’ is closed to new replies.