Support » Fixing WordPress » Remove Browse Happy Function?

  • Resolved Peter M

    (@peter-m)



    Hello
    How do I delete the whole function “Browse Happy”. I am a little sad it is still all over WordPress to be honest. I have figured it is on line 912 of “template.php” (admin/includes/template.php):

    function browse_happy() {
    	$getit = __( 'WordPress recommends a better browser' );
    	echo '
    		<span id="bh" class="alignright"><a href="http://browsehappy.com/" title="'.$getit.'"><img src="images/browse-happy.gif" alt="Browse Happy" /></a></span>
    		';
    }

    So I delete that and the 'browse_happy' section below it but then I get the following error:

    Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, 'browse_happy' was given in /home/mak0sch/public_html/blog/wp-includes/plugin.php on line 311

    to where I searched that line but it has nothing to do with it. I know I could just take the image out but I don’t even want it to load the function as it will simpy slow it down.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Don’t just remove functions. Put it back and use this plugin instead:
    http://wordpress.org/extend/plugins/no-browse-happy

    You should also remove the two lines immediately following the function.

    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
    	add_action( 'in_admin_footer', 'browse_happy' );

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Better to use the plugin, because then it will still be disabled even after you upgrade.

    But then I would rather hard code it into the blog than use a plugin – I don’t want my blog to have any plugins if possible.

    But good for those who would also like it moved 🙂

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    I don’t want my blog to have any plugins if possible.

    Why not? Plugins improve and expand upon the functionality of the blog. Not wanting to have any doesn’t make any sense. Hardcoding changes just means that it becomes more difficult to upgrade later, which leaves your site open to security holes when they are discovered.

    Thank you. Indeed, the simpler – the better.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Browse Happy Function?’ is closed to new replies.