Skip to content

Commit

Permalink
Add perPage qty to navigation-link block search query
Browse files Browse the repository at this point in the history
  • Loading branch information
prasadkarmalkar committed Dec 23, 2024
1 parent 12f7764 commit 5b4a1f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/block-library/src/navigation-link/link-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ export function getSuggestionsQuery( type, kind ) {
switch ( type ) {
case 'post':
case 'page':
return { type: 'post', subtype: type };
return { type: 'post', subtype: type, perPage: 20 };
case 'category':
return { type: 'term', subtype: 'category' };
return { type: 'term', subtype: 'category', perPage: 20 };
case 'tag':
return { type: 'term', subtype: 'post_tag' };
return { type: 'term', subtype: 'post_tag', perPage: 20 };
case 'post_format':
return { type: 'post-format' };
default:
if ( kind === 'taxonomy' ) {
return { type: 'term', subtype: type };
return { type: 'term', subtype: type, perPage: 20 };
}
if ( kind === 'post-type' ) {
return { type: 'post', subtype: type };
return { type: 'post', subtype: type, perPage: 20 };
}
return {
// for custom link which has no type
Expand Down

0 comments on commit 5b4a1f1

Please sign in to comment.