groups_allowed_status

  • apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) )

    Source Reference:

    • Component: BuddyPress :: bp-groups
      File: /bp-groups/bp-groups-screens.php :: Trac Source Line: 513
      		if ( !$bp->is_item_admin )
      			return false;
      
      		// If the edit form has been submitted, save the edited details
      		if ( isset( $_POST['save'] ) ) {
      			$enable_forum   = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0;
      
      			// Checked against a whitelist for security
      			$allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) );
      			$status         = ( in_array( $_POST['group-status'], (array)$allowed_status ) ) ? $_POST['group-status'] : 'public';
      
      			// Checked against a whitelist for security
      			$allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
      			$invite_status	       = in_array( $_POST['group-invite-status'], (array)$allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
      
      			// Check the nonce
      			if ( !check_admin_referer( 'groups_edit_group_settings' ) )
      				return false;
      

Comments are closed.