WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Remove Browse Happy Function? (7 posts)

  1. Peter M
    Member
    Posted 6 years ago #

    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

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

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

  3. haochi
    Member
    Posted 6 years ago #

    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' );
  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

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

  5. Peter M
    Member
    Posted 6 years ago #

    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 :)

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    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.

  7. Larysa Mykhas
    Member
    Posted 5 years ago #

    Thank you. Indeed, the simpler - the better.

Topic Closed

This topic has been closed to new replies.

About this Topic