Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/07/2014 08:38:34 PM (10 years ago)
Author:
r-a-y
Message:

XProfile: Purge profile group cache when profile groups are reordered.

Commit also includes a unit test.

Fixes #5860.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-classes.php

    r8816 r8986  
    388388        global $wpdb, $bp;
    389389
    390         if ( !is_numeric( $position ) )
     390        if ( !is_numeric( $position ) ) {
    391391            return false;
     392        }
     393
     394        // purge profile field group cache
     395        wp_cache_delete( 'xprofile_groups_inc_empty', 'bp' );
    392396
    393397        return $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_groups} SET group_order = %d WHERE id = %d", $position, $field_group_id ) );
Note: See TracChangeset for help on using the changeset viewer.