In `cache.php`, clarify some `return` docs. Some `WP_Object_Cache` methods return `void`, so those wrapper functions don't need to return at all.
See #32444. Built from https://develop.svn.wordpress.org/trunk@32528 git-svn-id: http://core.svn.wordpress.org/trunk@32498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4c19c591f
commit
9b3271f635
|
@ -37,7 +37,7 @@ function wp_cache_add( $key, $data, $group = '', $expire = 0 ) {
|
|||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @return bool Always returns True
|
||||
* @return true Always returns True
|
||||
*/
|
||||
function wp_cache_close() {
|
||||
return true;
|
||||
|
@ -135,7 +135,8 @@ function wp_cache_incr( $key, $offset = 1, $group = '' ) {
|
|||
* Sets up Object Cache Global and assigns it.
|
||||
*
|
||||
* @since 2.0.0
|
||||
* @global WP_Object_Cache $wp_object_cache WordPress Object Cache
|
||||
* @global $wp_object_cache WordPress Object Cache instance
|
||||
* @uses WP_Object_Cache
|
||||
*/
|
||||
function wp_cache_init() {
|
||||
$GLOBALS['wp_object_cache'] = new WP_Object_Cache();
|
||||
|
@ -192,7 +193,7 @@ function wp_cache_set( $key, $data, $group = '', $expire = 0 ) {
|
|||
function wp_cache_switch_to_blog( $blog_id ) {
|
||||
global $wp_object_cache;
|
||||
|
||||
return $wp_object_cache->switch_to_blog( $blog_id );
|
||||
$wp_object_cache->switch_to_blog( $blog_id );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -205,7 +206,7 @@ function wp_cache_switch_to_blog( $blog_id ) {
|
|||
function wp_cache_add_global_groups( $groups ) {
|
||||
global $wp_object_cache;
|
||||
|
||||
return $wp_object_cache->add_global_groups( $groups );
|
||||
$wp_object_cache->add_global_groups( $groups );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -239,7 +240,7 @@ function wp_cache_reset() {
|
|||
|
||||
global $wp_object_cache;
|
||||
|
||||
return $wp_object_cache->reset();
|
||||
$wp_object_cache->reset();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -499,7 +500,7 @@ class WP_Object_Cache {
|
|||
* @param int|string $key What the contents in the cache are called
|
||||
* @param string $group Where the cache contents are grouped
|
||||
* @param string $force Whether to force a refetch rather than relying on the local cache (default is false)
|
||||
* @return bool|mixed False on failure to retrieve contents or the cache
|
||||
* @return false|mixed False on failure to retrieve contents or the cache
|
||||
* contents on success
|
||||
*/
|
||||
public function get( $key, $group = 'default', $force = false, &$found = null ) {
|
||||
|
@ -616,7 +617,7 @@ class WP_Object_Cache {
|
|||
* @param mixed $data The contents to store in the cache
|
||||
* @param string $group Where to group the cache contents
|
||||
* @param int $expire Not Used
|
||||
* @return bool Always returns true
|
||||
* @return true Always returns true
|
||||
*/
|
||||
public function set( $key, $data, $group = 'default', $expire = 0 ) {
|
||||
if ( empty( $group ) )
|
||||
|
@ -706,7 +707,7 @@ class WP_Object_Cache {
|
|||
*
|
||||
* @since 2.0.8
|
||||
*
|
||||
* @return bool True value. Won't be used by PHP
|
||||
* @return true True value. Won't be used by PHP
|
||||
*/
|
||||
public function __destruct() {
|
||||
return true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32527';
|
||||
$wp_version = '4.3-alpha-32528';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue