Changeset 11740
- Timestamp:
- 11/03/2017 09:17:04 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r11735 r11740 105 105 'description' => '', 106 106 'slug' => '', 107 'status' => 'public',108 'parent_id' => 0,109 'enable_forum' => 0,110 'date_created' => bp_core_current_time()107 'status' => null, 108 'parent_id' => null, 109 'enable_forum' => null, 110 'date_created' => null 111 111 ); 112 112 … … 121 121 $creator_id = ! empty( $creator_id ) ? $creator_id : $group->creator_id; 122 122 $description = ! empty( $description ) ? $description : $group->description; 123 $status = ! is_null( $status ) ? $status : $group->status; 124 $parent_id = ! is_null( $parent_id ) ? $parent_id : $group->parent_id; 125 $enable_forum = ! is_null( $enable_forum ) ? $enable_forum : $group->enable_forum; 126 $date_created = ! is_null( $date_created ) ? $date_created : $group->date_created; 123 127 124 128 // Groups need at least a name. … … 131 135 // Instantiate new group object. 132 136 $group = new BP_Groups_Group; 137 138 // Check for null values, reset to sensible defaults. 139 $status = ! is_null( $status ) ? $status : 'public'; 140 $parent_id = ! is_null( $parent_id ) ? $parent_id : 0; 141 $enable_forum = ! is_null( $enable_forum ) ? $enable_forum : 0; 142 $date_created = ! is_null( $date_created ) ? $date_created : bp_core_current_time(); 133 143 } 134 144
Note: See TracChangeset
for help on using the changeset viewer.