Make WordPress Core


Ignore:
Timestamp:
12/02/2016 04:17:03 PM (10 years ago)
Author:
westonruter
Message:

Customize: Fix posts limit query arg for WP_Query from incorrect number to posts_per_page.

Props dlh.
Fixes #39022.

File:
1 edited

Legend:

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

    r39411 r39434  
    795795                        'post_status' => get_post_stati(),
    796796                        'name' => $uuid,
    797                         'number' => 1,
     797                        'posts_per_page' => 1,
    798798                        'no_found_rows' => true,
    799799                        'cache_results' => true,
     
    10041004                                'post_status' => 'auto-draft',
    10051005                                'post_type' => 'any',
    1006                                 'number' => -1,
     1006                                'posts_per_page' => -1,
    10071007                        ) );
    10081008                        foreach ( $existing_posts_query->posts as $existing_post ) {
     
    10171017                                'post_status' => array_diff( get_post_stati(), array( 'auto-draft' ) ),
    10181018                                'post_type' => 'any',
    1019                                 'number' => -1,
     1019                                'posts_per_page' => -1,
    10201020                        ) );
    10211021                        foreach ( $existing_posts_query->posts as $existing_post ) {
Note: See TracChangeset for help on using the changeset viewer.