Skip to content

Commit

Permalink
Ensure that WP_Theme_JSON_Data_Gutenberg exists
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Oct 13, 2023
1 parent 87f9d66 commit 1fd0f86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/blocks-everywhere/classes/class-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class Editor {
* Constructor
*/
public function __construct() {
if ( ! class_exists( 'WP_Theme_JSON_Data_Gutenberg' ) ) {
return null;
}
add_action( 'template_redirect', [ $this, 'setup_media' ] );
add_filter( 'block_editor_settings_all', [ $this, 'block_editor_settings_all' ] );
add_filter( 'should_load_block_editor_scripts_and_styles', '__return_true' );
Expand Down

0 comments on commit 1fd0f86

Please sign in to comment.