Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2015 01:58:52 AM (8 years ago)
Author:
tw2113
Message:

More documentation cleanup for the Members component.

See #6402.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-adminbar.php

    r10190 r10322  
    1717 * @since 1.6.0
    1818 *
    19  * @todo Deprecate WP 3.2 Toolbar compatibility when we drop 3.2 support
     19 * @todo Deprecate WP 3.2 Toolbar compatibility when we drop 3.2 support.
    2020 */
    2121function bp_members_admin_bar_my_account_menu() {
    2222    global $wp_admin_bar;
    2323
    24     // Bail if this is an ajax request
     24    // Bail if this is an ajax request.
    2525    if ( defined( 'DOING_AJAX' ) )
    2626        return;
    2727
    28     // Logged in user
     28    // Logged in user.
    2929    if ( is_user_logged_in() ) {
    3030
    3131        $bp = buddypress();
    3232
    33         // Stored in the global so we can add menus easily later on
     33        // Stored in the global so we can add menus easily later on.
    3434        $bp->my_account_menu_id = 'my-account-buddypress';
    3535
    36         // Create the main 'My Account' menu
     36        // Create the main 'My Account' menu.
    3737        $wp_admin_bar->add_menu( array(
    3838            'id'     => $bp->my_account_menu_id,
     
    4444        ) ) );
    4545
    46     // Show login and sign-up links
     46    // Show login and sign-up links.
    4747    } elseif ( !empty( $wp_admin_bar ) ) {
    4848
    4949        add_filter ( 'show_admin_bar', '__return_true' );
    5050
    51         // Create the main 'My Account' menu
     51        // Create the main 'My Account' menu.
    5252        $wp_admin_bar->add_menu( array(
    5353            'id'    => 'bp-login',
     
    5656        ) );
    5757
    58         // Sign up
     58        // Sign up.
    5959        if ( bp_get_signup_allowed() ) {
    6060            $wp_admin_bar->add_menu( array(
     
    7676    global $wp_admin_bar;
    7777
    78     // Only show if viewing a user
     78    // Only show if viewing a user.
    7979    if ( !bp_is_user() )
    8080        return false;
    8181
    82     // Don't show this menu to non site admins or if you're viewing your own profile
     82    // Don't show this menu to non site admins or if you're viewing your own profile.
    8383    if ( !current_user_can( 'edit_users' ) || bp_is_my_profile() )
    8484        return false;
     
    8686    $bp = buddypress();
    8787
    88     // Unique ID for the 'My Account' menu
     88    // Unique ID for the 'My Account' menu.
    8989    $bp->user_admin_menu_id = 'user-admin';
    9090
    91     // Add the top-level User Admin button
     91    // Add the top-level User Admin button.
    9292    $wp_admin_bar->add_menu( array(
    9393        'id'    => $bp->user_admin_menu_id,
     
    9797
    9898    if ( bp_is_active( 'xprofile' ) ) {
    99         // User Admin > Edit this user's profile
     99        // User Admin > Edit this user's profile.
    100100        $wp_admin_bar->add_menu( array(
    101101            'parent' => $bp->user_admin_menu_id,
     
    105105        ) );
    106106
    107         // User Admin > Edit this user's avatar
     107        // User Admin > Edit this user's avatar.
    108108        if ( buddypress()->avatar->show_avatars ) {
    109109            $wp_admin_bar->add_menu( array(
     
    115115        }
    116116
    117         // User Admin > Edit this user's cover image
     117        // User Admin > Edit this user's cover image.
    118118        if ( bp_displayed_user_use_cover_image_header() ) {
    119119            $wp_admin_bar->add_menu( array(
     
    128128
    129129    if ( bp_is_active( 'settings' ) ) {
    130         // User Admin > Spam/unspam
     130        // User Admin > Spam/unspam.
    131131        $wp_admin_bar->add_menu( array(
    132132            'parent' => $bp->user_admin_menu_id,
     
    136136        ) );
    137137
    138         // User Admin > Delete Account
     138        // User Admin > Delete Account.
    139139        $wp_admin_bar->add_menu( array(
    140140            'parent' => $bp->user_admin_menu_id,
     
    153153 *
    154154 * @since 1.5.0
     155 *
     156 * @return bool
    155157 */
    156158function bp_members_admin_bar_notifications_menu() {
    157159
    158     // Bail if notifications is not active
     160    // Bail if notifications is not active.
    159161    if ( ! bp_is_active( 'notifications' ) ) {
    160162        return false;
Note: See TracChangeset for help on using the changeset viewer.