Commit 868c0a8c authored by Erick Hitter's avatar Erick Hitter
Browse files

Add two methods to the `WP_Object_Class` class whose absence causes fatal errors in WP 3.6.

The `WP_Object_Class` implementation already leverages the data these two methods manipulate.
parent 6539cce2
......@@ -1010,4 +1010,28 @@ class WP_Object_Cache {
return false;
}
}
/**
* Sets the list of global groups.
*
* @param array $groups List of groups that are global.
*/
function add_global_groups( $groups ) {
$groups = (array) $groups;
$groups = array_fill_keys( $groups, true );
$this->global_groups = array_merge( $this->global_groups, $groups );
}
/**
* Sets the list of groups not to be cached by Redis.
*
* @param array $groups List of groups that are to be ignored.
*/
function add_non_persistent_groups( $groups ) {
$groups = (array) $groups;
$groups = array_fill_keys( $groups, true );
$this->no_redis_groups = array_merge( $this->no_redis_groups, $groups );
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment