diff --git a/admin/qtx_admin_gutenberg.php b/admin/qtx_admin_gutenberg.php index 1fbd8519..c8151865 100644 --- a/admin/qtx_admin_gutenberg.php +++ b/admin/qtx_admin_gutenberg.php @@ -167,8 +167,13 @@ public function rest_request_after_callbacks( $response, $handler, $request ) { * Enqueue the JS script */ public function enqueue_block_editor_assets() { + // By default, excluded post types are filtered out. + global $q_config; + $post_type = qtranxf_post_type(); + $post_type_excluded = isset( $q_config['post_type_excluded'] ) && isset( $post_type ) && in_array( $post_type, $q_config['post_type_excluded'] ); + // Filter to allow qTranslate-XT to manage the block editor (single language mode) - $admin_block_editor = apply_filters( 'qtranslate_admin_block_editor', true ); + $admin_block_editor = apply_filters( 'qtranslate_admin_block_editor', ! $post_type_excluded ); if ( ! $admin_block_editor ) { return; }