Changeset 5891 for trunk/bp-activity/bp-activity-template.php
- Timestamp:
- 03/06/2012 07:15:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r5758 r5891 105 105 var $full_name; 106 106 107 function __construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude = false, $in = false, $spam = 'ham_only' ) {107 function __construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude = false, $in = false, $spam = 'ham_only', $page_arg = 'acpage' ) { 108 108 global $bp; 109 109 110 $this->pag_page = isset( $_REQUEST[ 'acpage'] ) ? intval( $_REQUEST['acpage'] ) : $page;110 $this->pag_page = isset( $_REQUEST[$page_arg] ) ? intval( $_REQUEST[$page_arg] ) : $page; 111 111 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 112 112 … … 164 164 if ( (int) $this->total_activity_count && (int) $this->pag_num ) { 165 165 $this->pag_links = paginate_links( array( 166 'base' => add_query_arg( 'acpage', '%#%' ),166 'base' => add_query_arg( $page_arg, '%#%' ), 167 167 'format' => '', 168 168 'total' => ceil( (int) $this->total_activity_count / (int) $this->pag_num ), … … 300 300 'spam' => 'ham_only', // Hide spammed items 301 301 302 'page_arg' => 'acpage', // See https://buddypress.trac.wordpress.org/ticket/3679 303 302 304 // Scope - pre-built activity filters for a user (friends/groups/favorites/mentions) 303 305 'scope' => $scope, … … 388 390 $spam = 'all'; 389 391 390 $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in, $spam );392 $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in, $spam, $page_arg ); 391 393 392 394 return apply_filters( 'bp_has_activities', $activities_template->has_activities(), $activities_template ); … … 897 899 $dn_default = $activities_template->current_comment->display_name; 898 900 } 899 901 900 902 $alt_default = isset( $dn_default ) ? sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name ) : __( 'Profile picture', 'buddypress' ); 901 903 902 904 $defaults = array( 903 905 'alt' => $alt_default, … … 993 995 $object = 'group'; 994 996 $item_id = $activities_template->activity->item_id; 995 997 996 998 if ( empty( $alt ) ) { 997 999 $group = groups_get_group( $item_id );
Note: See TracChangeset
for help on using the changeset viewer.