Skip to:
Content
Pages
Categories
Search
Top
Bottom

Customizing adminbar?

  • Avatar of Dnorman
    dnorman
    Participant

    @dnorman

    I’ve added a link to the site’s dashboard in bp-core-adminbar.php, and the link is only shown if the user is logged in. Currently, I have to hack bp-core-adminbar.php to add the link, but that means re-hacking after each BuddyPress update.

    Is there a saner way for me to add custom stuff to the adminbar without hardcoding hacks in the core file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    Check out bp-core/bp-core-adminbar.php. The items in the admin bar are hooked to bp_adminbar_menus, and are ordered by the priority argument. So, for instance, if you want to put a button between the Blogs and Notifications menus, I’d write the button into a function called bp_adminbar_my_button, then use the hook add_action( 'bp_adminbar_menus', 'bp_adminbar_my_button', 7 );.

    Avatar of mqluvly
    mqluvly
    Participant

    @mqluvly

    Is there a way to center the admin bar, rather that having it on the left? Thanks!

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

You must be logged in to reply to this topic.