Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/25/2009 08:38:56 PM (12 years ago)
Author:
apeatling
Message:

Activity stream commenting updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r2114 r2128  
    1717    var $full_name;
    1818
    19     function bp_activity_template( $type, $user_id, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments ) {
     19    function bp_activity_template( $type, $user_id, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden ) {
    2020        global $bp;
    2121
     
    2929        } else {
    3030            if ( $type == 'sitewide' )
    31                 $this->activities = bp_activity_get_sitewide( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter ) );
     31                $this->activities = bp_activity_get_sitewide( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter, 'show_hidden' => $show_hidden ) );
    3232
    3333            if ( $type == 'personal' )
     
    129129        'per_page' => 25, // number of items per page
    130130        'max' => false, // max number to return
     131        'show_hidden' => false, // Show activity items that are hidden site-wide?
    131132
    132133        /* Filtering */
     
    157158        $filter = array( 'object' => $object, 'action' => $action, 'primary_id' => $primary_id, 'secondary_id' => $secondary_id );
    158159
    159     $activities_template = new BP_Activity_Template( $type, $user_id, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments );
     160    $activities_template = new BP_Activity_Template( $type, $user_id, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden );
    160161
    161162    return apply_filters( 'bp_has_activities', $activities_template->has_activities(), &$activities_template );
     
    481482
    482483        foreach ( (array) $component_names as $component_name ) {
     484            /* Skip the activity comment filter */
     485            if ( 'activity' == $component_name )
     486                continue;
     487
    483488            if ( isset( $_GET['afilter'] ) && $component_name == $_GET['afilter'] )
    484489                $selected = ' class="selected"';
Note: See TracChangeset for help on using the changeset viewer.