admin_url('admin-ajax.php'), 'pluginurl' => Consts::get_url(), ) ); // Blocks deactivator $blocks = new Blocks(); wp_enqueue_script( Consts::PLUGIN_NAME . '-deactivator', Consts::get_url() . 'dist/deactivator.build.js', [ 'wp-editor', 'wp-blocks', 'wp-i18n', 'wp-element' ], Consts::VERSION, true ); wp_localize_script( Consts::PLUGIN_NAME . '-deactivator', 'advancedGutenbergBlocksDeactivated', $blocks->get_disabled_blocks_js() ); // Special styles for the Editor wp_enqueue_style( 'advanced-gutenberg-blocks-editor', Consts::get_url() . 'dist/blocks.editor.build.css', [ 'wp-edit-blocks' ], Consts::VERSION ); } }