diff --git src/wp-admin/js/customize-nav-menus.js src/wp-admin/js/customize-nav-menus.js
index e315019..e38f673 100644
|
|
|
267 | 267 | items.each( function( menuItem ) { |
268 | 268 | $content.append( itemTemplate( menuItem.attributes ) ); |
269 | 269 | } ); |
270 | | if ( 20 > items.length ) { |
271 | | self.pages.search = -1; // Up to 20 posts and 20 terms in results, if <20, no more results for either. |
| 270 | if ( 10 > items.length ) { |
| 271 | self.pages.search = -1; // Up to 10 posts and 10 terms in results, if <10, no more results for either. |
272 | 272 | } else { |
273 | 273 | self.pages.search = self.pages.search + 1; |
274 | 274 | } |
… |
… |
|
277 | 277 | } else if ( items && page === 1 ) { |
278 | 278 | wp.a11y.speak( api.Menus.data.l10n.itemsFound.replace( '%d', items.length ) ); |
279 | 279 | } |
| 280 | |
| 281 | var totalHeight = $content.prop( 'scrollHeight' ), |
| 282 | lastItem = $content.find( 'li' ).last(); |
| 283 | |
| 284 | // The window is larger than the results and we need to initiate page 2 search. |
| 285 | if ( 1 === page && totalHeight > lastItem.position().top + lastItem.outerHeight( true ) ) { |
| 286 | self.doSearch( 2 ); |
| 287 | } |
280 | 288 | }); |
281 | 289 | |
282 | 290 | self.currentRequest.fail(function( data ) { |
diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php
index fb1633b..44b1f77 100644
|
|
final class WP_Customize_Nav_Menus { |
244 | 244 | 'update_post_term_cache' => false, |
245 | 245 | 'update_post_meta_cache' => false, |
246 | 246 | 'post_status' => 'publish', |
247 | | 'posts_per_page' => 20, |
| 247 | 'posts_per_page' => 10, |
248 | 248 | ); |
249 | 249 | |
250 | 250 | $args['pagenum'] = isset( $args['pagenum'] ) ? absint( $args['pagenum'] ) : 1; |
… |
… |
final class WP_Customize_Nav_Menus { |
281 | 281 | $taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'names' ); |
282 | 282 | $terms = get_terms( $taxonomies, array( |
283 | 283 | 'name__like' => $args['s'], |
284 | | 'number' => 20, |
285 | | 'offset' => 20 * ($args['pagenum'] - 1), |
| 284 | 'number' => 10, |
| 285 | 'offset' => 10 * ($args['pagenum'] - 1), |
286 | 286 | ) ); |
287 | 287 | |
288 | 288 | // Check if any taxonomies were found. |