From 679e74317bd15bdba10b6b84ea0497975a49e9cb Mon Sep 17 00:00:00 2001 From: Paul Bunkham Date: Tue, 27 Oct 2020 00:24:13 +0000 Subject: [PATCH] Make the number of reusable blocks returned from the API unlimited This is to fix #26352. Having no limit seems like it could be risky, but there are a number of other places in the codebase where all entities are returned in one call to the API, including categories, which could return a similar amount of data to this. --- packages/editor/src/components/provider/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index 9168b6303228e6..be79c224fe7237 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -323,7 +323,8 @@ export default compose( [ selectionEnd: getEditorSelectionEnd(), reusableBlocks: select( 'core' ).getEntityRecords( 'postType', - 'wp_block' + 'wp_block', + { 'per_page': -1 } ), hasUploadPermissions: defaultTo( canUser( 'create', 'media' ),