Make WordPress Core


Ignore:
Timestamp:
09/14/2023 12:44:23 PM (22 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Restore more descriptive variable names in a few class methods.

When various methods parameters in child classes were renamed to $item to match the parent class for PHP 8 named parameter support, most of the methods restored the more descriptive, specific name at the beginning for better readability, with several exceptions for methods consisting only of a few lines.

To avoid confusion about why some methods do that and some don't, this commit aims to bring more consistency to the code, specifically in list tables' ::column_default() methods.

Follow-up to [51728], [51737], [51786].

See #58831.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php

    r56575 r56586  
    368368
    369369        // Base fields for every post.
     370        $fields = $this->get_fields_for_response( $request );
    370371        $data   = array();
    371         $fields = $this->get_fields_for_response( $request );
    372372
    373373        if ( rest_is_field_included( 'id', $fields ) ) {
     
    604604
    605605        $theme  = WP_Theme_JSON_Resolver::get_merged_data( 'theme' );
     606        $fields = $this->get_fields_for_response( $request );
    606607        $data   = array();
    607         $fields = $this->get_fields_for_response( $request );
    608608
    609609        if ( rest_is_field_included( 'settings', $fields ) ) {
Note: See TracChangeset for help on using the changeset viewer.