Skip to content

Commit

Permalink
Show only the allowed patterns (WordPress#30300)
Browse files Browse the repository at this point in the history
* Show only the allowed patterns

* remove the early return from __experimentalGetAllowedPatterns

* revert block pattern fetched parsed blocks
  • Loading branch information
ntsekouras authored Mar 29, 2021
1 parent 8e6a05e commit f18e494
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,6 @@ export const __experimentalGetParsedPattern = createSelector(
if ( ! pattern ) {
return null;
}

return {
...pattern,
blocks: parse( pattern.content ),
Expand All @@ -1818,10 +1817,6 @@ export const __experimentalGetParsedPattern = createSelector(
export const __experimentalGetAllowedPatterns = createSelector(
( state, rootClientId = null ) => {
const patterns = state.settings.__experimentalBlockPatterns;
if ( ! rootClientId ) {
return patterns;
}

const parsedPatterns = patterns.map( ( { name } ) =>
__experimentalGetParsedPattern( state, name )
);
Expand Down

0 comments on commit f18e494

Please sign in to comment.