Changeset 6835 for trunk/bp-groups/bp-groups-admin.php
- Timestamp:
- 03/04/2013 01:23:22 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-admin.php
r6834 r6835 86 86 check_admin_referer( 'bp-groups-delete' ); 87 87 88 $group_id = (int) $_GET['gid']; 89 90 $result = groups_delete_group( $group_id ); 91 92 if ( $result ) { 93 $redirect_to = add_query_arg( 'deleted', '1', $redirect_to ); 94 } else { 95 $redirect_to = add_query_arg( array( 96 'deleted' => 0, 97 'action' => 'edit', 98 'gid' => $group_id 99 ) ); 100 } 88 $group_ids = wp_parse_id_list( $_GET['gid'] ); 89 90 $count = 0; 91 foreach ( $group_ids as $group_id ) { 92 if ( groups_delete_group( $group_id ) ) { 93 $count++; 94 } 95 } 96 97 $redirect_to = add_query_arg( 'deleted', $count, $redirect_to ); 101 98 102 99 bp_core_redirect( $redirect_to );
Note: See TracChangeset
for help on using the changeset viewer.