Make WordPress Core


Ignore:
Timestamp:
06/16/2020 07:07:04 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Rename the $clean or $ids variable in several functions to $non_cached_ids for clarity.

  • _get_non_cached_ids()
  • update_meta_cache()
  • update_object_term_cache()

See #49542.

File:
1 edited

Legend:

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

    r48059 r48065  
    63606360 */
    63616361function _get_non_cached_ids( $object_ids, $cache_key ) {
    6362     $clean        = array();
    6363     $cache_values = wp_cache_get_multiple( $object_ids, $cache_key );
    6364     foreach ( $cache_values as $id => $cache_value ) {
    6365         $id = (int) $id;
    6366         if ( ! $cache_value ) {
    6367             $clean[] = $id;
    6368         }
    6369     }
    6370 
    6371     return $clean;
     6362    $non_cached_ids = array();
     6363    $cache_values   = wp_cache_get_multiple( $object_ids, $cache_key );
     6364
     6365    foreach ( $cache_values as $id => $value ) {
     6366        if ( ! $value ) {
     6367            $non_cached_ids[] = (int) $id;
     6368        }
     6369    }
     6370
     6371    return $non_cached_ids;
    63726372}
    63736373
Note: See TracChangeset for help on using the changeset viewer.