diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 94150d6..4278dbd 100644
|
|
final class WP_Customize_Manager { |
794 | 794 | 'post_type' => 'customize_changeset', |
795 | 795 | 'post_status' => get_post_stati(), |
796 | 796 | 'name' => $uuid, |
797 | | 'number' => 1, |
| 797 | 'posts_per_page' => 1, |
798 | 798 | 'no_found_rows' => true, |
799 | 799 | 'cache_results' => true, |
800 | 800 | 'update_post_meta_cache' => false, |
… |
… |
final class WP_Customize_Manager { |
1003 | 1003 | 'post__in' => $starter_content_auto_draft_post_ids, |
1004 | 1004 | 'post_status' => 'auto-draft', |
1005 | 1005 | 'post_type' => 'any', |
1006 | | 'number' => -1, |
| 1006 | 'posts_per_page' => -1, |
1007 | 1007 | ) ); |
1008 | 1008 | foreach ( $existing_posts_query->posts as $existing_post ) { |
1009 | 1009 | $existing_starter_content_posts[ $existing_post->post_type . ':' . $existing_post->post_name ] = $existing_post; |
… |
… |
final class WP_Customize_Manager { |
1016 | 1016 | 'post_name__in' => $all_post_slugs, |
1017 | 1017 | 'post_status' => array_diff( get_post_stati(), array( 'auto-draft' ) ), |
1018 | 1018 | 'post_type' => 'any', |
1019 | | 'number' => -1, |
| 1019 | 'posts_per_page' => -1, |
1020 | 1020 | ) ); |
1021 | 1021 | foreach ( $existing_posts_query->posts as $existing_post ) { |
1022 | 1022 | $key = $existing_post->post_type . ':' . $existing_post->post_name; |
diff --git tests/phpunit/tests/customize/manager.php tests/phpunit/tests/customize/manager.php
index c179026..345e666 100644
|
|
class Tests_WP_Customize_Manager extends WP_UnitTestCase { |
402 | 402 | ), |
403 | 403 | ); |
404 | 404 | |
| 405 | update_option( 'posts_per_page', 1 ); // To check #39022. |
405 | 406 | add_theme_support( 'starter-content', $starter_content_config ); |
406 | 407 | $this->assertEmpty( $wp_customize->unsanitized_post_values() ); |
407 | 408 | $wp_customize->import_theme_starter_content(); |