Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/25/2013 05:09:03 AM (12 years ago)
Author:
johnjamesjacoby
Message:

In bp_core_add_global_group(), do not call wp_cache_init(). Instead, do a function_exists() check on wp_cache_add_global_groups().

Fixes bug where BuddyPress was wiping out WordPress core cache groups on 'plugins_loaded' via 'bp_loaded'. Props markjaquith.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-cache.php

    r6496 r6752  
    1717 */
    1818function bp_core_clear_cache() {
    19     global $cache_path, $cache_filename;
     19    global $cache_path;
    2020
    2121    if ( function_exists( 'prune_super_cache' ) ) {
     
    3131 */
    3232function bp_core_add_global_group() {
    33     wp_cache_init();
    34     wp_cache_add_global_groups( array( 'bp' ) );
     33    if ( function_exists( 'wp_cache_add_global_groups' ) ) {
     34        wp_cache_add_global_groups( array( 'bp' ) );
     35    }
    3536}
    3637add_action( 'bp_loaded', 'bp_core_add_global_group' );
Note: See TracChangeset for help on using the changeset viewer.