Changeset 5891 for trunk/bp-members/bp-members-template.php
- Timestamp:
- 03/06/2012 07:15:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-template.php
r5824 r5891 170 170 var $total_member_count; 171 171 172 function __construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude, $meta_key, $meta_value ) {173 174 $this->pag_page = !empty( $_REQUEST[ 'upage'] ) ? intval( $_REQUEST['upage'] ) : (int) $page_number;172 function __construct( $type, $page_number, $per_page, $max, $user_id, $search_terms, $include, $populate_extras, $exclude, $meta_key, $meta_value, $page_arg = 'upage' ) { 173 174 $this->pag_page = !empty( $_REQUEST[$page_arg] ) ? intval( $_REQUEST[$page_arg] ) : (int) $page_number; 175 175 $this->pag_num = !empty( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : (int) $per_page; 176 176 $this->type = $type; … … 200 200 if ( (int) $this->total_member_count && (int) $this->pag_num ) { 201 201 $this->pag_links = paginate_links( array( 202 'base' => add_query_arg( 'upage', '%#%' ),202 'base' => add_query_arg( $page_arg, '%#%' ), 203 203 'format' => '', 204 204 'total' => ceil( (int) $this->total_member_count / (int) $this->pag_num ), … … 286 286 'max' => false, 287 287 288 'page_arg' => 'upage', // See https://buddypress.trac.wordpress.org/ticket/3679 289 288 290 'include' => false, // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users 289 291 'exclude' => false, // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users … … 317 319 return false; 318 320 319 $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras, $exclude, $meta_key, $meta_value );321 $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras, $exclude, $meta_key, $meta_value, $page_arg ); 320 322 return apply_filters( 'bp_has_members', $members_template->has_members(), $members_template ); 321 323 } … … 867 869 868 870 function bp_displayed_user_id() { 869 871 870 872 static $id = 0; 871 873 872 874 if ( empty( $id ) ) { 873 875 global $bp; … … 881 883 882 884 static $id = 0; 883 885 884 886 if ( empty( $id ) ) { 885 887 global $bp;
Note: See TracChangeset
for help on using the changeset viewer.