Changeset 7791
- Timestamp:
- 02/05/2014 07:16:55 PM (11 years ago)
- Location:
- trunk/bp-xprofile
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-cache.php
r7786 r7791 18 18 wp_cache_delete( 'xprofile_group_' . $group_obj->id, 'bp' ); 19 19 } 20 add_action( 'xprofile_group s_deleted_group', 'xprofile_clear_profile_groups_object_cache' );21 add_action( 'xprofile_group s_saved_group', 'xprofile_clear_profile_groups_object_cache' );20 add_action( 'xprofile_group_after_delete', 'xprofile_clear_profile_groups_object_cache' ); 21 add_action( 'xprofile_group_after_save', 'xprofile_clear_profile_groups_object_cache' ); 22 22 23 23 function xprofile_clear_profile_data_object_cache( $group_id ) { … … 36 36 // Clear default visibility level cache 37 37 wp_cache_delete( 'xprofile_default_visibility_levels', 'bp' ); 38 39 // Modified fields can alter parent group status, in particular when 40 // the group goes from empty to non-empty. Bust its cache, as well as 41 // the global group_inc_empty cache 42 wp_cache_delete( 'xprofile_group_' . $field_obj->group_id, 'bp' ); 43 wp_cache_delete( 'xprofile_groups_inc_empty', 'bp' ); 38 44 } 39 45 add_action( 'xprofile_fields_saved_field', 'xprofile_clear_profile_field_object_cache' ); -
trunk/bp-xprofile/bp-xprofile-classes.php
r7786 r7791 75 75 return false; 76 76 77 do_action_ref_array( 'xprofile_group_before_delete', array( &$this ) ); 78 77 79 // Delete field group 78 80 if ( !$wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->profile->table_name_groups} WHERE id = %d", $this->id ) ) ) { … … 88 90 } 89 91 } 92 93 do_action_ref_array( 'xprofile_group_after_delete', array( &$this ) ); 90 94 91 95 return true;
Note: See TracChangeset
for help on using the changeset viewer.