mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@52973 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3000,7 +3000,18 @@ class WP_Query {
|
||||
$found_rows = 'SQL_CALC_FOUND_ROWS';
|
||||
}
|
||||
|
||||
$old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
|
||||
$old_request = implode(
|
||||
' ',
|
||||
array(
|
||||
"SELECT $found_rows $distinct $fields",
|
||||
"FROM {$wpdb->posts} $join",
|
||||
"WHERE 1=1 $where",
|
||||
$groupby,
|
||||
$orderby,
|
||||
$limits,
|
||||
)
|
||||
);
|
||||
|
||||
$this->request = $old_request;
|
||||
|
||||
if ( ! $q['suppress_filters'] ) {
|
||||
@@ -3086,7 +3097,17 @@ class WP_Query {
|
||||
if ( $split_the_query ) {
|
||||
// First get the IDs and then fill in the objects.
|
||||
|
||||
$this->request = "SELECT $found_rows $distinct {$wpdb->posts}.ID FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
|
||||
$this->request = implode(
|
||||
' ',
|
||||
array(
|
||||
"SELECT $found_rows $distinct {$wpdb->posts}.ID",
|
||||
"FROM {$wpdb->posts} $join",
|
||||
"WHERE 1=1 $where",
|
||||
$groupby,
|
||||
$orderby,
|
||||
$limits,
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters the Post IDs SQL request before sending.
|
||||
|
||||
Reference in New Issue
Block a user