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

Props dlh.
Fixes #39022.

Built from https://develop.svn.wordpress.org/trunk@39434


git-svn-id: http://core.svn.wordpress.org/trunk@39374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-12-02 16:18:43 +00:00
parent c354cfd79b
commit 01fe6a2fac
2 changed files with 4 additions and 4 deletions

View File

@ -794,7 +794,7 @@ final class WP_Customize_Manager {
'post_type' => 'customize_changeset',
'post_status' => get_post_stati(),
'name' => $uuid,
'number' => 1,
'posts_per_page' => 1,
'no_found_rows' => true,
'cache_results' => true,
'update_post_meta_cache' => false,
@ -1003,7 +1003,7 @@ final class WP_Customize_Manager {
'post__in' => $starter_content_auto_draft_post_ids,
'post_status' => 'auto-draft',
'post_type' => 'any',
'number' => -1,
'posts_per_page' => -1,
) );
foreach ( $existing_posts_query->posts as $existing_post ) {
$existing_starter_content_posts[ $existing_post->post_type . ':' . $existing_post->post_name ] = $existing_post;
@ -1016,7 +1016,7 @@ final class WP_Customize_Manager {
'post_name__in' => $all_post_slugs,
'post_status' => array_diff( get_post_stati(), array( 'auto-draft' ) ),
'post_type' => 'any',
'number' => -1,
'posts_per_page' => -1,
) );
foreach ( $existing_posts_query->posts as $existing_post ) {
$key = $existing_post->post_type . ':' . $existing_post->post_name;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-alpha-39433';
$wp_version = '4.8-alpha-39434';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.