Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/10/2016 05:39:34 PM (9 years ago)
Author:
dcavins
Message:

Invalidate profile field cache on update.

When a profile field’s position is updated in
BP_XProfile_Field::update_position(), the
cached field data was not cleared. This caused
the field to look like it was unchanged.

Fixes #7112.

Props @emrikol, @r-a-y.

File:
1 edited

Legend:

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

    r10828 r10877  
    943943            $sql = $wpdb->prepare( "UPDATE {$table_name} SET group_id = %d WHERE parent_id = %d", $field_group_id, $field_id );
    944944            $wpdb->query( $sql );
     945
     946            // Invalidate profile field cache.
     947            wp_cache_delete( $field_id, 'bp_xprofile_fields' );
    945948
    946949            return $parent;
Note: See TracChangeset for help on using the changeset viewer.