Skip to:
Content

BuddyPress.org

Changeset 5346


Ignore:
Timestamp:
11/23/2011 09:12:18 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Tweaks to WP toolbar menus:

  • WP3.3 compat
  • Move Notification bubble to right, next to my-account
  • Make my-account-buddypress a menu-group, so dependent children always follow
  • See #3596
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-adminbar.php

    r5334 r5346  
    2020 * @return If doing ajax
    2121 */
    22 function bp_admin_bar_my_account_secondary() {
     22function bp_admin_bar_my_account_root() {
    2323        global $wp_admin_bar;
    2424
     
    3232                // Add secondary parent item for all BuddyPress components
    3333                $wp_admin_bar->add_menu( array(
    34                         'parent' => 'my-account',
    35                         'id'     => 'my-account-buddypress',
    36                         'title'  => ' ',
    37                         'meta'   => array(
    38                                 'class' => 'secondary',
     34                        'parent'    => 'my-account',
     35                        'id'        => 'my-account-buddypress',
     36                        'title'     => __( 'My Account' ),
     37                        'group'     => true,
     38                        'meta'      => array(
     39                                'class' => 'ab-sub-secondary'
    3940                        )
    4041                ) );
    4142        }
    4243}
    43 add_action( 'admin_bar_menu', 'bp_admin_bar_my_account_secondary', 9999 );
     44add_action( 'admin_bar_menu', 'bp_admin_bar_my_account_root', 100 );
    4445
    4546/**
  • trunk/bp-members/bp-members-adminbar.php

    r5307 r5346  
    190190        // Add the top-level Notifications button
    191191        $wp_admin_bar->add_menu( array(
    192                 'id'    => 'bp-notifications',
    193                 'title' => $menu_title,
    194                 'href'  => bp_loggedin_user_domain(),
    195                 'meta'  => array(
    196                         'class' => 'opposite',
    197                 )
     192                'parent'    => 'top-secondary',
     193                'id'        => 'bp-notifications',
     194                'title'     => $menu_title,
     195                'href'      => bp_loggedin_user_domain(),
    198196        ) );
    199197
Note: See TracChangeset for help on using the changeset viewer.