From a1ffaec8b484a045729645b5ad6f815fada0f25c Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Feb 2014 22:24:30 +0000 Subject: [PATCH] Remove `$force` argument from `WP_Object_Cache::delete()`. From @nacin: "This was for internal-use-only, I don't think _deprecated_argument() is needed, but let's put a comment somewhere just so we know we'd have to be careful if we ever want to add a third argument here later." `$force` argument has been removed, and docs were updated. Fixes #22478. git-svn-id: https://develop.svn.wordpress.org/trunk@27064 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/cache.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/cache.php b/src/wp-includes/cache.php index 81a64c0aeb..67274ec358 100644 --- a/src/wp-includes/cache.php +++ b/src/wp-includes/cache.php @@ -388,26 +388,25 @@ class WP_Object_Cache { /** * Remove the contents of the cache key in the group * - * If the cache key does not exist in the group and $force parameter is set - * to false, then nothing will happen. The $force parameter is set to false - * by default. + * If the cache key does not exist in the group, then nothing will happen. + * There used to be a 3rd param (bool $force Optional. Whether to + * force the unsetting of the cache key in the group). * * @since 2.0.0 * * @param int|string $key What the contents in the cache are called * @param string $group Where the cache contents are grouped - * @param bool $force Optional. Whether to force the unsetting of the cache - * key in the group + * * @return bool False if the contents weren't deleted and true on success */ - function delete($key, $group = 'default', $force = false) { + function delete( $key, $group = 'default' ) { if ( empty( $group ) ) $group = 'default'; if ( $this->multisite && ! isset( $this->global_groups[ $group ] ) ) $key = $this->blog_prefix . $key; - if ( ! $force && ! $this->_exists( $key, $group ) ) + if ( ! $this->_exists( $key, $group ) ) return false; unset( $this->cache[$group][$key] );