Make WordPress Core


Ignore:
Timestamp:
03/21/2022 12:03:29 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Wrap the $this->request property in wp-includes/class-wp-*-query.php.

This aims to improve readability by fitting the values on a single screen to avoid horizontal scrolling.

See #54728.

File:
1 edited

Legend:

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

    r52822 r52973  
    30013001        }
    30023002
    3003         $old_request   = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
     3003        $old_request = implode(
     3004            ' ',
     3005            array(
     3006                "SELECT $found_rows $distinct $fields",
     3007                "FROM {$wpdb->posts} $join",
     3008                "WHERE 1=1 $where",
     3009                $groupby,
     3010                $orderby,
     3011                $limits,
     3012            )
     3013        );
     3014
    30043015        $this->request = $old_request;
    30053016
     
    30873098                // First get the IDs and then fill in the objects.
    30883099
    3089                 $this->request = "SELECT $found_rows $distinct {$wpdb->posts}.ID FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
     3100                $this->request = implode(
     3101                    ' ',
     3102                    array(
     3103                        "SELECT $found_rows $distinct {$wpdb->posts}.ID",
     3104                        "FROM {$wpdb->posts} $join",
     3105                        "WHERE 1=1 $where",
     3106                        $groupby,
     3107                        $orderby,
     3108                        $limits,
     3109                    )
     3110                );
    30903111
    30913112                /**
Note: See TracChangeset for help on using the changeset viewer.