- Timestamp:
- 04/29/2021 08:31:02 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-invitations-template.php
r12919 r12930 163 163 164 164 // Parse arguments. 165 $r = wp_parse_args( $args, array( 166 'id' => false, 167 'user_id' => false, 168 'inviter_id' => false, 169 'invitee_email' => false, 170 'item_id' => false, 171 'type' => 'invite', 172 'invite_sent' => 'all', 173 'accepted' => 'all', 174 'search_terms' => '', 175 'order_by' => 'date_modified', 176 'sort_order' => 'DESC', 177 'page' => 1, 178 'per_page' => 25, 179 'fields' => 'all', 180 'page_arg' => 'ipage', 181 ) ); 165 $r = wp_parse_args( 166 $args, 167 array( 168 'id' => false, 169 'user_id' => false, 170 'inviter_id' => false, 171 'invitee_email' => false, 172 'item_id' => false, 173 'type' => 'invite', 174 'invite_sent' => 'all', 175 'accepted' => 'all', 176 'search_terms' => '', 177 'order_by' => 'date_modified', 178 'sort_order' => 'DESC', 179 'page' => 1, 180 'per_page' => 25, 181 'fields' => 'all', 182 'page_arg' => 'ipage', 183 ) 184 ); 182 185 183 186 // Sort order direction. … … 191 194 // Setup variables. 192 195 $this->pag_arg = sanitize_key( $r['page_arg'] ); 193 $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] 194 $this->pag_num = bp_sanitize_pagination_arg( 'num', 196 $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] ); 197 $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] ); 195 198 $this->user_id = $r['user_id']; 196 199 $this->search_terms = $r['search_terms']; … … 198 201 $this->sort_order = $r['sort_order']; 199 202 $this->query_vars = array( 200 'id' 201 'user_id' 202 'inviter_id' 203 'invitee_email' 204 'item_id' 205 'type' 206 'invite_sent' 207 'accepted' 208 'search_terms' 209 'order_by' 210 'sort_order' 211 'page' 212 'per_page' 203 'id' => $r['id'], 204 'user_id' => $r['user_id'], 205 'inviter_id' => $r['inviter_id'], 206 'invitee_email' => $r['invitee_email'], 207 'item_id' => $r['item_id'], 208 'type' => $r['type'], 209 'invite_sent' => $r['invite_sent'], 210 'accepted' => $r['accepted'], 211 'search_terms' => $this->search_terms, 212 'order_by' => $this->order_by, 213 'sort_order' => $this->sort_order, 214 'page' => $this->pag_page, 215 'per_page' => $this->pag_num, 213 216 ); 214 217 … … 225 228 ); 226 229 227 $this->pag_links = paginate_links( array( 228 'base' => add_query_arg( $this->pag_arg, '%#%' ), 229 'format' => '', 230 'total' => ceil( (int) $this->total_invitation_count / (int) $this->pag_num ), 231 'current' => $this->pag_page, 232 'prev_text' => _x( '←', 'Network invitation pagination previous text', 'buddypress' ), 233 'next_text' => _x( '→', 'Network invitation pagination next text', 'buddypress' ), 234 'mid_size' => 1, 235 'add_args' => $add_args, 236 ) ); 230 $this->pag_links = paginate_links( 231 array( 232 'base' => add_query_arg( $this->pag_arg, '%#%' ), 233 'format' => '', 234 'total' => ceil( (int) $this->total_invitation_count / (int) $this->pag_num ), 235 'current' => $this->pag_page, 236 'prev_text' => _x( '←', 'Network invitation pagination previous text', 'buddypress' ), 237 'next_text' => _x( '→', 'Network invitation pagination next text', 'buddypress' ), 238 'mid_size' => 1, 239 'add_args' => $add_args, 240 ) 241 ); 237 242 } 238 243 }
Note: See TracChangeset
for help on using the changeset viewer.