Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: procedure for removing Admin Bar Sub Nav item


Roger Coathup
Participant

@rogercoathup

@burt:

I’ve written a plugin (essentially your logo replacement code), and put it in the mu-plugins directory, but it doesn’t seem to be getting invoked?

Am I missing something obvious?

My file is called 2l2r-plugins.php and sits in the mu-plugins directory:

<?php

/*

Plugin Name: l2r adminbar logo

Plugin URI: http://www.21inspired.com

Description: replaces the adminbar logo

Version: 1.0

Author: Roger Coathup

Author URI: http://www.21thoughts.com

*/

function l2r_adminbar_logo() {

global $bp;

echo '<img id="admin-bar-logo" src="' . apply_filters( 'bp_admin_bar_logo_src', site_url( MUPLUGINDIR . '/2l2r/images/l2r_home.gif' ) ) . '" alt="' . apply_filters( 'bp_admin_bar_logo_alt_text', __( 'BuddyPress', 'buddypress' ) ) . '" />';

}

remove_action('bp-adminbar-logo','bp_adminbar_logo');

add_action('bp-adminbar-logo','l2r_adminbar_logo');

?>

Skip to toolbar