Changeset 5903
- Timestamp:
- 03/11/2012 03:54:27 PM (13 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-buddybar.php
r5689 r5903 24 24 return false; 25 25 26 // Don't show this menu to non site admins or if you're viewing your own profile27 if ( !current_user_can( 'edit_users' ) || !bp_current_user_can( 'bp_moderate' ) || ( bp_is_item_admin() && ! bp_is_item_mod()) )26 // Only group admins and site admins can see this menu 27 if ( !current_user_can( 'edit_users' ) && !bp_current_user_can( 'bp_moderate' ) && !bp_is_item_admin() ) 28 28 return false; ?> 29 29 -
trunk/bp-groups/bp-groups-classes.php
r5729 r5903 385 385 386 386 // Get total group results 387 $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', join( ' ', (array) $t_sql ), $t_sql );387 $total_groups_sql = apply_filters( 'bp_groups_get_total_groups_sql', $t_sql, $total_sql ); 388 388 $total_groups = $wpdb->get_var( $total_groups_sql ); 389 389 -
trunk/bp-groups/bp-groups-loader.php
r5895 r5903 327 327 ); 328 328 329 $group_link = trailingslashit( bp_get_root_domain() . '/' . $this->root_slug . '/' . $this->current_group->slug);329 $group_link = bp_get_group_permalink( $this->current_group ); 330 330 331 331 // Add the "Home" subnav item, as this will always be present -
trunk/bp-groups/bp-groups-template.php
r5893 r5903 446 446 $group =& $groups_template->group; 447 447 448 return apply_filters( 'bp_get_group_permalink', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/');448 return apply_filters( 'bp_get_group_permalink', trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/' ) ); 449 449 } 450 450 … … 458 458 $group =& $groups_template->group; 459 459 460 return apply_filters( 'bp_get_group_admin_permalink', trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug. '/admin' ) );460 return apply_filters( 'bp_get_group_admin_permalink', trailingslashit( bp_get_group_permalink( $group ) . '/admin' ) ); 461 461 } 462 462 … … 1267 1267 if ( bp_is_item_admin() || bp_is_item_mod() ) : ?> 1268 1268 1269 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/edit-details' ) ?>"><?php _e( 'Details', 'buddypress' ); ?></a></li>1269 <li<?php if ( 'edit-details' == $current_tab || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/edit-details' ) ?>"><?php _e( 'Details', 'buddypress' ); ?></a></li> 1270 1270 1271 1271 <?php endif; ?> … … 1274 1274 return false; ?> 1275 1275 1276 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/group-settings' ) ?>"><?php _e( 'Settings', 'buddypress' ); ?></a></li>1276 <li<?php if ( 'group-settings' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-settings' ) ?>"><?php _e( 'Settings', 'buddypress' ); ?></a></li> 1277 1277 1278 1278 <?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> 1279 1279 1280 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/group-avatar' ) ?>"><?php _e( 'Avatar', 'buddypress' ); ?></a></li>1280 <li<?php if ( 'group-avatar' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/group-avatar' ) ?>"><?php _e( 'Avatar', 'buddypress' ); ?></a></li> 1281 1281 1282 1282 <?php endif; ?> 1283 1283 1284 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/manage-members' ) ?>"><?php _e( 'Members', 'buddypress' ); ?></a></li>1284 <li<?php if ( 'manage-members' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/manage-members' ) ?>"><?php _e( 'Members', 'buddypress' ); ?></a></li> 1285 1285 1286 1286 <?php if ( $groups_template->group->status == 'private' ) : ?> 1287 1287 1288 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/membership-requests' ) ?>"><?php _e( 'Requests', 'buddypress' ); ?></a></li>1288 <li<?php if ( 'membership-requests' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/membership-requests' ) ?>"><?php _e( 'Requests', 'buddypress' ); ?></a></li> 1289 1289 1290 1290 <?php endif; ?> … … 1292 1292 <?php do_action( 'groups_admin_tabs', $current_tab, $group->slug ) ?> 1293 1293 1294 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/delete-group' ) ?>"><?php _e( 'Delete', 'buddypress' ); ?></a></li>1294 <li<?php if ( 'delete-group' == $current_tab ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_get_group_permalink( $group ) . 'admin/delete-group' ) ?>"><?php _e( 'Delete', 'buddypress' ); ?></a></li> 1295 1295 1296 1296 <?php … … 1664 1664 } 1665 1665 function bp_get_total_group_count_for_user( $user_id = 0 ) { 1666 return apply_filters( 'bp_get_total_group_count_for_user', groups_total_groups_for_user( $user_id ) );1666 return apply_filters( 'bp_get_total_group_count_for_user', groups_total_groups_for_user( $user_id ), $user_id ); 1667 1667 } 1668 1668 … … 2829 2829 global $bp; 2830 2830 2831 // Must be displayed user2831 // Must be a group 2832 2832 if ( empty( $bp->groups->current_group->id ) ) 2833 2833 return; 2834 2834 2835 // Append $action to $url if there is no $type2835 // Append $action to $url if provided 2836 2836 if ( !empty( $action ) ) 2837 $url = bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $bp->groups->current_group->slug . '/'. $action;2837 $url = bp_get_group_permalink( groups_get_current_group() ) . $action; 2838 2838 else 2839 $url = bp_get_ root_domain() . '/' . bp_get_groups_root_slug() . '/' . $bp->groups->current_group->slug;2839 $url = bp_get_group_permalink( groups_get_current_group() ); 2840 2840 2841 2841 // Add a slash at the end of our user url
Note: See TracChangeset
for help on using the changeset viewer.