Bug – critical error when certain code is used
-
fluent-snippet-storage]$ cat _*.php
<?php
// <Internal Doc Start>
/*
*
* @description:
* @tags:
* @group:
* @name: Disable Google font download
* @type: PHP
* @status: published
* @created_by: 1
* @created_at: 2026-06-04 07:55:43
* @updated_at: 2026-06-04 07:55:50
* @is_valid: 1
* @updated_by: 1
* @priority: 10
* @run_at: all
* @load_as_file:
* @load_in_block_editor:
* @condition: {"status":"no","run_if":"assertive","items":[[]]}
*/
?>
<?php if (!defined("ABSPATH")) { return;} // <Internal Doc End> ?>
<?php
function project_dequeue_unnecessary_styles() {
wp_dequeue_style( 'google-fonts' );
wp_deregister_style( 'google-fonts' );
}
add_action( 'wp_print_styles', 'project_dequeue_unnecessary_styles' );<?php
// <Internal Doc Start>
/*
*
* @description:
* @tags:
* @group:
* @name: No google fonts
* @type: PHP
* @status: published
* @created_by: 1
* @created_at: 2026-06-04 07:58:27
* @updated_at: 2026-06-04 07:58:33
* @is_valid: 1
* @updated_by: 1
* @priority: 10
* @run_at: all
* @load_as_file:
* @load_in_block_editor:
* @condition: {"status":"no","run_if":"assertive","items":[[]]}
*/
?>
<?php if (!defined("ABSPATH")) { return;} // <Internal Doc End> ?>
<?php
function project_dequeue_unnecessary_styles() {
wp_dequeue_style( 'google-fonts' );
wp_deregister_style( 'google-fonts' );
}
add_action( 'wp_print_styles', 'project_dequeue_unnecessary_styles' );When i have two above snippets active at same time, WP-admin returns “There has been a critical error on this website.” can such issue be prevented, preventing submission etc. so one does not spend time finding out which plugin and which setting causing this.
plugin version 10.53, WP 7, PHP 8.4
You must be logged in to reply to this topic.