WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/16/2020 07:07:04 PM (17 months 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/meta.php

    r48055 r48065  
    927927    }
    928928
    929     $cache_key    = $meta_type . '_meta';
    930     $ids          = array();
    931     $cache        = array();
    932     $cache_values = wp_cache_get_multiple( $object_ids, $cache_key );
     929    $cache_key      = $meta_type . '_meta';
     930    $non_cached_ids = array();
     931    $cache          = array();
     932    $cache_values   = wp_cache_get_multiple( $object_ids, $cache_key );
     933
    933934    foreach ( $cache_values as $id => $cached_object ) {
    934935        if ( false === $cached_object ) {
    935             $ids[] = $id;
     936            $non_cached_ids[] = $id;
    936937        } else {
    937938            $cache[ $id ] = $cached_object;
     
    939940    }
    940941
    941     if ( empty( $ids ) ) {
     942    if ( empty( $non_cached_ids ) ) {
    942943        return $cache;
    943944    }
    944945
    945946    // Get meta info.
    946     $id_list   = join( ',', $ids );
     947    $id_list   = join( ',', $non_cached_ids );
    947948    $id_column = ( 'user' === $meta_type ) ? 'umeta_id' : 'meta_id';
    948949
     
    968969    }
    969970
    970     foreach ( $ids as $id ) {
     971    foreach ( $non_cached_ids as $id ) {
    971972        if ( ! isset( $cache[ $id ] ) ) {
    972973            $cache[ $id ] = array();
Note: See TracChangeset for help on using the changeset viewer.