Skip to:
Content
Pages
Categories
Search
Top
Bottom

Change Notifications Menu (bp_adminbar_notifications_menu())

  • Profile photo of Fanoop
    Keith Kelly
    Participant

    @fanoop

    I am creating a custom menu bar for my site. I am also implementing the Twitter Bootstrap framework.

    In order to keep the site consistent and avoid having to recreate the wheel, I would like to inject some html classed and components into the output of the bp_adminbar_notifications_menu() function without hacking the core.

    For example the current output code is:

    <li id="bp-adminbar-notifications-menu">
    <a href="http://localhost/fanoop/members/admin/">Notifications
    <span>1</span>
    </a>
    <ul>
    <li class="alt">
    <a href=&quot;http://localhost/fanoop/members/admin/activity/mentions/&quot; title=&quot;<a href='http://buddypress.org/community/members/admin/' rel='nofollow'>@admin</a> Mentions">You have 8 new mentions</a>
    </li>
    </ul>
    </li>

    I would like to add components to the first list item, the anchor tag, the span and the unordered list tag so it looks like this:

    <li class="dropdown" id="bp-adminbar-notifications-menu">
    <a class="dropdown-toggle" href="http://localhost/fanoop/members/admin/">Notifications
    <span class="btn btn-danger btn-mini">1</span>
    </a>
    <ul>
    <li class="alt">
    <a href=&quot;http://localhost/fanoop/members/admin/activity/mentions/&quot; title=&quot;<a href='http://buddypress.org/community/members/admin/' rel='nofollow'>@admin</a> Mentions">You have 8 new mentions</a>
    </li>
    </ul>
    </li>

    If I can do that it would be great. That way I wouldn’t have to try and recreate the Bootstrap dropdown menus.

  • The topic ‘Change Notifications Menu (bp_adminbar_notifications_menu())’ is closed to new replies.
Skip to toolbar