Make WordPress Core


Ignore:
Timestamp:
02/01/2014 10:24:30 PM (13 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/cache.php

    r26868 r27064  
    389389         * Remove the contents of the cache key in the group
    390390         *
    391          * If the cache key does not exist in the group and $force parameter is set
    392          * to false, then nothing will happen. The $force parameter is set to false
    393          * by default.
     391         * If the cache key does not exist in the group, then nothing will happen.
     392         * There used to be a 3rd param (bool $force Optional. Whether to
     393         * force the unsetting of the cache key in the group).
    394394         *
    395395         * @since 2.0.0
    … …  
    397397         * @param int|string $key What the contents in the cache are called
    398398         * @param string $group Where the cache contents are grouped
    399          * @param bool $force Optional. Whether to force the unsetting of the cache
    400          *              key in the group
     399         *
    401400         * @return bool False if the contents weren't deleted and true on success
    402401         */
    403         function delete($key, $group = 'default', $force = false) {
     402        function delete( $key, $group = 'default' ) {
    404403                if ( empty( $group ) )
    405404                        $group = 'default';
    … …  
    408407                        $key = $this->blog_prefix . $key;
    409408
    410                 if ( ! $force && ! $this->_exists( $key, $group ) )
     409                if ( ! $this->_exists( $key, $group ) )
    411410                        return false;
    412411
Note: See TracChangeset for help on using the changeset viewer.