Skip to content

Commit

Permalink
Load Classic block only when experiment is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed May 5, 2023
1 parent 3bf0a38 commit 723eb31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ const getAllBlocks = () => {
buttons,
calendar,
categories,
...( window.wp && window.wp.oldEditor ? [ classic ] : [] ), // Only add the classic block in WP Context.
code,
column,
columns,
Expand Down Expand Up @@ -233,6 +232,11 @@ const getAllBlocks = () => {
blocks.push( detailsContent );
blocks.push( detailsSummary );
}

// Only add the classic block in WP Context
if ( window?.wp?.oldEditor && ! window?.__experimentalDisableTinymce ) {
blocks.push( classic );
}
return blocks.filter( Boolean );
};

Expand Down

0 comments on commit 723eb31

Please sign in to comment.