Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/12/2015 05:45:14 AM (10 years ago)
Author:
tw2113
Message:

Further documentation cleanup for Activity Component.

See #6396.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-loader.php

    r10110 r10253  
    99 */
    1010
    11 // Exit if accessed directly
     11// Exit if accessed directly.
    1212defined( 'ABSPATH' ) || exit;
    1313
     
    4747    public function includes( $includes = array() ) {
    4848
    49         // Files to include
     49        // Files to include.
    5050        $includes = array(
    5151            'cssjs',
     
    6060        );
    6161
    62         // Load Akismet support if Akismet is configured
     62        // Load Akismet support if Akismet is configured.
    6363        $akismet_key = bp_get_option( 'wordpress_api_key' );
    6464
     
    9090        $bp = buddypress();
    9191
    92         // Define a slug, if necessary
     92        // Define a slug, if necessary.
    9393        if ( ! defined( 'BP_ACTIVITY_SLUG' ) ) {
    9494            define( 'BP_ACTIVITY_SLUG', $this->id );
    9595        }
    9696
    97         // Global tables for activity component
     97        // Global tables for activity component.
    9898        $global_tables = array(
    9999            'table_name'      => $bp->table_prefix . 'bp_activity',
     
    101101        );
    102102
    103         // Metadata tables for groups component
     103        // Metadata tables for groups component.
    104104        $meta_tables = array(
    105105            'activity' => $bp->table_prefix . 'bp_activity_meta',
     
    138138    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
    139139
    140         // Stop if there is no user displayed or logged in
     140        // Stop if there is no user displayed or logged in.
    141141        if ( ! is_user_logged_in() && ! bp_displayed_user_id() ) {
    142142            return;
    143143        }
    144144
    145         // Determine user to use
     145        // Determine user to use.
    146146        if ( bp_displayed_user_domain() ) {
    147147            $user_domain = bp_displayed_user_domain();
     
    155155        $activity_link = trailingslashit( $user_domain . $slug );
    156156
    157         // Add 'Activity' to the main navigation
     157        // Add 'Activity' to the main navigation.
    158158        $main_nav = array(
    159159            'name'                => _x( 'Activity', 'Profile activity screen nav', 'buddypress' ),
     
    165165        );
    166166
    167         // Add the subnav items to the activity nav item if we are using a theme that supports this
     167        // Add the subnav items to the activity nav item if we are using a theme that supports this.
    168168        $sub_nav[] = array(
    169169            'name'            => _x( 'Personal', 'Profile activity screen sub nav', 'buddypress' ),
     
    175175        );
    176176
    177         // @ mentions
     177        // Check @mentions.
    178178        if ( bp_activity_do_mentions() ) {
    179179            $sub_nav[] = array(
     
    188188        }
    189189
    190         // Favorite activity items
     190        // Favorite activity items.
    191191        if ( bp_activity_can_favorite() ) {
    192192            $sub_nav[] = array(
     
    201201        }
    202202
    203         // Additional menu if friends is active
     203        // Additional menu if friends is active.
    204204        if ( bp_is_active( 'friends' ) ) {
    205205            $sub_nav[] = array(
     
    214214        }
    215215
    216         // Additional menu if groups is active
     216        // Additional menu if groups is active.
    217217        if ( bp_is_active( 'groups' ) ) {
    218218            $sub_nav[] = array(
     
    250250    public function setup_admin_bar( $wp_admin_nav = array() ) {
    251251
    252         // Menus for logged in user
     252        // Menus for logged in user.
    253253        if ( is_user_logged_in() ) {
    254254
    255             // Setup the logged in user variables
     255            // Setup the logged in user variables.
    256256            $activity_link = trailingslashit( bp_loggedin_user_domain() . bp_get_activity_slug() );
    257257
    258             // Unread message count
     258            // Unread message count.
    259259            if ( bp_activity_do_mentions() ) {
    260260                $count = bp_get_total_mention_count_for_user( bp_loggedin_user_id() );
     
    266266            }
    267267
    268             // Add the "Activity" sub menu
     268            // Add the "Activity" sub menu.
    269269            $wp_admin_nav[] = array(
    270270                'parent' => buddypress()->my_account_menu_id,
     
    274274            );
    275275
    276             // Personal
     276            // Personal.
    277277            $wp_admin_nav[] = array(
    278278                'parent' => 'my-account-' . $this->id,
     
    282282            );
    283283
    284             // Mentions
     284            // Mentions.
    285285            if ( bp_activity_do_mentions() ) {
    286286                $wp_admin_nav[] = array(
     
    292292            }
    293293
    294             // Favorites
    295             // Favorite activity items
     294            // Favorite activity items.
    296295            if ( bp_activity_can_favorite() ) {
    297296                $wp_admin_nav[] = array(
     
    338337    public function setup_title() {
    339338
    340         // Adjust title based on view
     339        // Adjust title based on view.
    341340        if ( bp_is_activity_component() ) {
    342341            $bp = buddypress();
     
    364363    public function setup_actions() {
    365364
    366         // Spam prevention
     365        // Spam prevention.
    367366        add_action( 'bp_include', 'bp_activity_setup_akismet' );
    368367
     
    377376    public function setup_cache_groups() {
    378377
    379         // Global groups
     378        // Global groups.
    380379        wp_cache_add_global_groups( array(
    381380            'bp_activity',
Note: See TracChangeset for help on using the changeset viewer.