Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove_action( ‘bp_adminbar_logo’, ‘bp_adminbar_logo’ ); not working in RC2?

  • Avatar of 21green
    21green
    Participant

    @21green

    I wrote my own plugin to customize the buddypress adminbar. I use the following function to remove the default budypress adminbar logo:

    remove_action( ‘bp_adminbar_logo’, ‘bp_adminbar_logo’ );

    On RC1 this works perfect, however it seems to broke on RC2. Does anybody know why and what i could do to fix this small issue?

    Problem occured for me on a clean RC2 install …

Viewing 6 replies - 1 through 6 (of 6 total)
  • Avatar of Burt Adsit
    Burt Adsit
    Participant

    @burtadsit

    Where is your remove_action() call running in RC2? There is a filter now that might work better unless you are hooking up other menu items there also.

    apply_filters( ‘bp_admin_bar_logo_src’ …

    Avatar of Cawoodm
    cawoodm
    Participant

    @cawoodm

    I agree, remove_action( ‘bp_adminbar_logo’, ‘bp_adminbar_logo’ ); is not working in the latest BP. This must be a bug.

    Avatar of Cawoodm
    cawoodm
    Participant

    @cawoodm

    Sadly, neither is this:

    apply_filters( ‘bp_admin_bar_logo_src’, ‘my_admin_bar_logo_src’);

    function my_admin_bar_logo_src($a) {return ‘/blank.gif’;}

    It work fine for me, I got this working earlier. I will check when I get home that we are not talking about different logos and post the code here.

    Yep, still works. I assume we\’re talking about the \’buddypress\’ graphic in the top-left of the \’buddybar\’.

    In my theme\’s functions.php:

    remove_action( \'bp_adminbar_logo\', \'bp_adminbar_logo\' );

    And in my CSS:

    #wp-admin-bar ul { margin-left: 0 !important; }

    If that doesn\’t work before you, it\’s because you\’re putting it in the wrong file. If you\’ve got it in bp-custom.php, then it\’s getting read before the buddybar menu items are created internally – therefore it doesn\’t remove them as it needs to happen afterwards.

    Burt Adsit has a suggestion on the Trac for a bp-custom-after.php which would be an appropiate place for this sort of override. In the interim, I suggest you make a file \’z-custom.php\’ in /mu-plugins/ and put the above line in.

    Avatar of erikshosting
    erikshosting
    Member

    @erikshosting

    I just wanted to mention that adding the
    #wp-admin-bar ul { margin-left: 0 !important; }
    line of code to my stylesheet, killed the flyout menus on my custom buddypress admin bar links.. Just wanted to mention it here, as I couldn’t find it anywhere else on the next. so, basically, adding a 0 margin-left to wp-admin bar ul, will kill the fly out, sideways, sub-sub page, or grand child pages on the buddypress admin bar.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.