Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/24/2021 04:16:17 AM (3 years ago)
Author:
espellcaste
Message:

Making PHPDoc Improvements to the BP Friends (component) files.

Also, adding several minor PHP changes.

See #8553

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/classes/class-bp-friends-component.php

    r13002 r13092  
    66 *
    77 * @package BuddyPress
    8  * @subpackage Friends
     8 * @subpackage FriendsComponent
    99 * @since 1.5.0
    1010 */
     
    3131            buddypress()->plugin_dir,
    3232            array(
    33                 'adminbar_myaccount_order' => 60
     33                'adminbar_myaccount_order' => 60,
    3434            )
    3535        );
     
    104104     *
    105105     * @since 1.5.0
     106     *
     107     * @global BuddyPress $bp The one true BuddyPress instance.
    106108     *
    107109     * @see BP_Component::setup_globals() for description of parameters.
     
    194196            'screen_function'     => 'friends_screen_my_friends',
    195197            'default_subnav_slug' => 'my-friends',
    196             'item_css_id'         => $this->id
     198            'item_css_id'         => $this->id,
    197199        );
    198200
     
    205207            'screen_function' => 'friends_screen_my_friends',
    206208            'position'        => 10,
    207             'item_css_id'     => 'friends-my-friends'
     209            'item_css_id'     => 'friends-my-friends',
    208210        );
    209211
     
    215217            'screen_function' => 'friends_screen_requests',
    216218            'position'        => 20,
    217             'user_has_access' => $access
     219            'user_has_access' => $access,
    218220        );
    219221
     
    241243            // Pending friend requests.
    242244            $count = count( friends_get_friendship_request_user_ids( bp_loggedin_user_id() ) );
    243             if ( !empty( $count ) ) {
     245            if ( ! empty( $count ) ) {
    244246                $title = sprintf(
    245247                    /* translators: %s: Pending friend request count for the current user */
     
    253255                );
    254256            } else {
    255                 $title   = _x( 'Friends',            'My Account Friends menu',        'buddypress' );
    256                 $pending = _x( 'No Pending Requests','My Account Friends menu sub nav', 'buddypress' );
     257                $title   = _x( 'Friends', 'My Account Friends menu', 'buddypress' );
     258                $pending = _x( 'No Pending Requests', 'My Account Friends menu sub nav', 'buddypress' );
    257259            }
    258260
     
    262264                'id'     => 'my-account-' . $this->id,
    263265                'title'  => $title,
    264                 'href'   => $friends_link
     266                'href'   => $friends_link,
    265267            );
    266268
     
    271273                'title'    => _x( 'Friendships', 'My Account Friends menu sub nav', 'buddypress' ),
    272274                'href'     => $friends_link,
    273                 'position' => 10
     275                'position' => 10,
    274276            );
    275277
     
    280282                'title'    => $pending,
    281283                'href'     => trailingslashit( $friends_link . 'requests' ),
    282                 'position' => 20
     284                'position' => 20,
    283285            );
    284286        }
     
    291293     *
    292294     * @since 1.5.0
     295     *
     296     * @global BuddyPress $bp The one true BuddyPress instance.
    293297     */
    294298    public function setup_title() {
Note: See TracChangeset for help on using the changeset viewer.