wp_is_fatal_error_handler_enabled example


}

/** * Registers the shutdown handler for fatal errors. * * The handler will only be registered if {@see wp_is_fatal_error_handler_enabled()} returns true. * * @since 5.2.0 */
function wp_register_fatal_error_handler() {
    if ( ! wp_is_fatal_error_handler_enabled() ) {
        return;
    }

    $handler = null;
    if ( defined( 'WP_CONTENT_DIR' ) && is_readable( WP_CONTENT_DIR . '/fatal-error-handler.php' ) ) {
        $handler = include WP_CONTENT_DIR . '/fatal-error-handler.php';
    }

    if ( ! is_object( $handler ) || ! is_callable( array( $handler, 'handle' ) ) ) {
        $handler = new WP_Fatal_Error_Handler();
    }

    
// Make taxonomies and posts available to plugins and themes. // @plugin authors: warning: these get registered again on the init hook. create_initial_taxonomies();
create_initial_post_types();

wp_start_scraping_edited_file_errors();

// Register the default theme directory root. register_theme_directory( get_theme_root() );

if ( ! is_multisite() && wp_is_fatal_error_handler_enabled() ) {
    // Handle users requesting a recovery mode link and initiating recovery mode.     wp_recovery_mode()->initialize();
}

// Load active plugins. foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
    wp_register_plugin_realpath( $plugin );

    $_wp_plugin_file = $plugin;
    include_once $plugin;
    $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
Home | Imprint | This part of the site doesn't use cookies.