Is there a hook that I can use when a fatal error occurs?

Look into the WP_Fatal_Error_Handler class. I see a couple of filters in its display_default_error_template() method that might be helpful for you: wp_php_error_args wp_php_error_message The entire class is a drop-in, so if you need to you can replace it entirely with your own version, but I think one of those filters—probably wp_php_error_args—might be what you’re looking … Read more

Is there any filter or action hook to remove layout classes from appearing in my templates?

You may use the following code (either in your active theme’s functions.php file or in a custom plugin): // This line is preferably be added to your theme’s functions.php file // with other add_theme_support() function calls. add_theme_support( ‘disable-layout-styles’ ); // These two lines will probably not be necessary eventually remove_filter( ‘render_block’, ‘wp_render_layout_support_flag’, 10, 2 ); … Read more