Skip to content

Commit

Permalink
Make the number of reusable blocks returned from the API unlimited
Browse files Browse the repository at this point in the history
This is to fix WordPress#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.
  • Loading branch information
pablinos committed Oct 27, 2020
1 parent 2c4ebde commit 679e743
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down

0 comments on commit 679e743

Please sign in to comment.