mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-28 19:52:53 +00:00
Coding Standards: Apply some alignment fixes after composer format.
Follow up to [53485]. See #55674. git-svn-id: https://develop.svn.wordpress.org/trunk@53676 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cea27f3ac1
commit
e942983c4b
@ -58,11 +58,11 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
|
||||
}
|
||||
|
||||
$query_args = array(
|
||||
'post_type' => $post_types,
|
||||
'post_status' => 'publish',
|
||||
'paged' => (int) $request['page'],
|
||||
'posts_per_page' => (int) $request['per_page'],
|
||||
'ignore_sticky_posts' => true,
|
||||
'post_type' => $post_types,
|
||||
'post_status' => 'publish',
|
||||
'paged' => (int) $request['page'],
|
||||
'posts_per_page' => (int) $request['per_page'],
|
||||
'ignore_sticky_posts' => true,
|
||||
);
|
||||
|
||||
if ( ! empty( $request['search'] ) ) {
|
||||
@ -81,8 +81,8 @@ class WP_REST_Post_Search_Handler extends WP_REST_Search_Handler {
|
||||
*/
|
||||
$query_args = apply_filters( 'rest_post_search_query', $query_args, $request );
|
||||
|
||||
$query = new WP_Query();
|
||||
$posts = $query->query( $query_args );
|
||||
$query = new WP_Query();
|
||||
$posts = $query->query( $query_args );
|
||||
// Querying the whole post object will warm the object cache, avoiding an extra query per result.
|
||||
$found_ids = wp_list_pluck( $posts, 'ID' );
|
||||
$total = $query->found_posts;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user