Changeset 5689 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 02/10/2012 01:17:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r5687 r5689 105 105 106 106 function __construct( $user_id, $type, $page, $per_page, $max, $slug, $search_terms, $populate_extras, $include = false, $exclude = false, $show_hidden = false ){ 107 108 global $bp;109 107 110 108 $this->pag_page = isset( $_REQUEST['grpage'] ) ? intval( $_REQUEST['grpage'] ) : $page; … … 163 161 164 162 // Build pagination links 165 if ( (int) $this->total_group_count && (int)$this->pag_num ) {163 if ( (int) $this->total_group_count && (int)$this->pag_num ) { 166 164 $this->pag_links = paginate_links( array( 167 165 'base' => add_query_arg( array( 'grpage' => '%#%', 'num' => $this->pag_num, 's' => $search_terms, 'sortby' => $this->sort_by, 'order' => $this->order ) ), … … 211 209 212 210 function the_group() { 213 global $group;214 215 211 $this->in_the_loop = true; 216 $this->group = $this->next_group();212 $this->group = $this->next_group(); 217 213 218 214 if ( $this->single_group ) … … 298 294 299 295 function bp_group_is_visible( $group = false ) { 300 global $ bp, $groups_template;296 global $groups_template; 301 297 302 298 if ( bp_current_user_can( 'bp_moderate' ) ) … … 382 378 383 379 $defaults = array( 384 'type' => 'full',385 'width' => false,380 'type' => 'full', 381 'width' => false, 386 382 'height' => false, 387 'class' => 'avatar',388 'id' => false,389 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name )383 'class' => 'avatar', 384 'id' => false, 385 'alt' => sprintf( __( 'Group logo of %s', 'buddypress' ), $groups_template->group->name ) 390 386 ); 391 387 … … 439 435 } 440 436 function bp_get_group_permalink( $group = false ) { 441 global $groups_template , $bp;437 global $groups_template; 442 438 443 439 if ( empty( $group ) ) … … 451 447 } 452 448 function bp_get_group_admin_permalink( $group = false ) { 453 global $groups_template , $bp;449 global $groups_template; 454 450 455 451 if ( empty( $group ) ) … … 668 664 } 669 665 function bp_get_group_all_members_permalink( $group = false ) { 670 global $groups_template , $bp;666 global $groups_template; 671 667 672 668 if ( empty( $group ) ) … … 677 673 678 674 function bp_group_search_form() { 679 global $ groups_template, $bp;675 global $bp; 680 676 681 677 $action = $bp->displayed_user->domain . bp_get_groups_slug() . '/my-groups/search/'; … … 721 717 } 722 718 function bp_get_groups_pagination_count() { 723 global $ bp, $groups_template;719 global $groups_template; 724 720 725 721 $start_num = intval( ( $groups_template->pag_page - 1 ) * $groups_template->pag_num ) + 1; 726 $from_num = bp_core_number_format( $start_num );727 $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) );728 $total = bp_core_number_format( $groups_template->total_group_count );722 $from_num = bp_core_number_format( $start_num ); 723 $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) ); 724 $total = bp_core_number_format( $groups_template->total_group_count ); 729 725 730 726 return apply_filters( 'bp_get_groups_pagination_count', sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ) ); … … 1076 1072 1077 1073 function bp_group_mod_memberlist( $admin_list = false, $group = false ) { 1078 global $groups_template , $group_mods;1074 global $groups_template; 1079 1075 1080 1076 if ( empty( $group ) ) … … 1138 1134 1139 1135 function bp_group_has_moderators( $group = false ) { 1140 global $group _mods, $groups_template;1136 global $groups_template; 1141 1137 1142 1138 if ( empty( $group ) ) … … 1150 1146 } 1151 1147 function bp_get_group_member_promote_mod_link( $args = '' ) { 1152 global $members_template, $groups_template , $bp;1148 global $members_template, $groups_template; 1153 1149 1154 1150 $defaults = array( … … 1167 1163 } 1168 1164 function bp_get_group_member_promote_admin_link( $args = '' ) { 1169 global $members_template, $groups_template , $bp;1165 global $members_template, $groups_template; 1170 1166 1171 1167 $defaults = array( … … 1189 1185 } 1190 1186 function bp_get_group_member_demote_link( $user_id = 0, $group = false ) { 1191 global $members_template, $groups_template , $bp;1187 global $members_template, $groups_template; 1192 1188 1193 1189 if ( empty( $group ) ) … … 1209 1205 } 1210 1206 function bp_get_group_member_ban_link( $user_id = 0, $group = false ) { 1211 global $ members_template, $groups_template, $bp;1207 global $groups_template; 1212 1208 1213 1209 if ( empty( $group ) ) … … 1247 1243 } 1248 1244 function bp_get_group_member_remove_link( $user_id = 0, $group = false ) { 1249 global $ members_template, $groups_template;1245 global $groups_template; 1250 1246 1251 1247 if ( empty( $group ) )
Note: See TracChangeset
for help on using the changeset viewer.