Changeset 11146 for trunk/src/bp-groups/bp-groups-screens.php
- Timestamp:
- 09/21/2016 10:59:04 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-screens.php
r11145 r11146 931 931 if ( !check_admin_referer( 'groups_edit_group_settings' ) ) 932 932 return false; 933 934 /* 935 * Save group types. 936 * 937 * Ensure we keep types that have 'show_in_create_screen' set to false. 938 */ 939 $current_types = bp_groups_get_group_type( bp_get_current_group_id(), false ); 940 $current_types = array_intersect( bp_groups_get_group_types( array( 'show_in_create_screen' => false ) ), (array) $current_types ); 941 if ( isset( $_POST['group-types'] ) ) { 942 $current_types = array_merge( $current_types, $_POST['group-types'] ); 943 944 // Set group types. 945 bp_groups_set_group_type( bp_get_current_group_id(), $current_types ); 946 947 // No group types checked, so this means we want to wipe out all group types. 948 } else { 949 /* 950 * Passing a blank string will wipe out all types for the group. 951 * 952 * Ensure we keep types that have 'show_in_create_screen' set to false. 953 */ 954 $current_types = empty( $current_types ) ? '' : $current_types; 955 956 // Set group types. 957 bp_groups_set_group_type( bp_get_current_group_id(), $current_types ); 958 } 933 959 934 960 if ( !groups_edit_group_settings( $_POST['group-id'], $enable_forum, $status, $invite_status ) ) {
Note: See TracChangeset
for help on using the changeset viewer.