on_name = $this->get_option_name(); if ( ! $option_name ) { return false; } $paused_extensions = (array) get_option( $option_name, array() ); unset( $paused_extensions[ $this->type ] ); if ( ! $paused_extensions ) { return delete_option( $option_name ); } return update_option( $option_name, $paused_extensions ); } /** * Checks whether the underlying API to store paused extensions is loaded. * * @since 5.2.0 * * @return bool True if the API is loaded, false otherwise. */ protected function is_api_loaded() { return function_exists( 'get_option' ); } /** * Get the option name for storing paused extensions. * * @since 5.2.0 * * @return string */ protected function get_option_name() { if ( ! wp_recovery_mode()->is_active() ) { return ''; } $session_id = wp_recovery_mode()->get_session_id(); if ( empty( $session_id ) ) { return ''; } return "{$session_id}_paused_extensions"; } } 3.0 The `$handled` parameter was added. * * @param array $error Error information retrieved from `error_get_last()`. * @param true|WP_Error $handled Whether Recovery Mode handled the fatal error. */ protected function display_error_template( $error, $handled ) { if ( defined( 'WP_CONTENT_DIR' ) ) { // Load custom PHP error template, if present. $php_error_pluggable = WP_CONTENT_DIR . '/php-error.php'; if ( is_readable( $php_error_pluggable ) ) { require_once $php_error_pluggable; return; } } // Otherwise, display the default error template. $this->display_default_error_template( $error, $handled ); } /** * Displays the default PHP error template. * * This method is called conditionally if no 'php-error.php' drop-in is available. * * It calls {@see wp_die()} with a message indicating that the site is experiencing technical difficulties and a * login link to the admin backend. The {@see 'wp_php_error_message'} and {@see 'wp_php_error_args'} filters can * be used to modify these parameters. * * @since 5.2.0 * @since 5.3.0 The `$handled` parameter was added. * * @param array $error Error information retrieved from `error_get_last()`. * @param true|WP_Error $handled Whether Recovery Mode handled the fatal error. */ protected function display_default_error_template( $error, $handled ) { if ( ! function_exists( '__' ) ) { wp_load_translations_early(); } if ( ! function_exists( 'wp_die' ) ) { require_once ABSPATH . WPINC . '/functions.php'; } if ( ! class_exists( 'WP_Error' ) ) { require_once ABSPATH . WPINC . '/class-wp-error.php'; } if ( true === $handled && wp_is_recovery_mode() ) { $message = __( 'There has been a critical error on this website, putting it in recovery mode. Please check the Themes and Plugins screens for more details. If you just installed or updated a theme or plugin, check the relevant page for that first.' ); } elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) { if ( is_multisite() ) { $message = __( 'There has been a critical error on this website. Please reach out to your site administrator, and inform them of this error for further assistance.' ); } else { $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' ); } } else { $message = __( 'There has been a critical error on this website.' ); } $message = sprintf( '

%s

%s

', $message, /* translators: Documentation about troubleshooting. */ __( 'https://wordpress.org/documentation/article/faq-troubleshooting/' ), __( 'Learn more about troubleshooting WordPress.' ) ); $args = array( 'response' => 500, 'exit' => false, ); /** * Filters the message that the default PHP error template displays. * * @since 5.2.0 * * @param string $message HTML error message to display. * @param array $error Error information retrieved from `error_get_last()`. */ $message = apply_filters( 'wp_php_error_message', $message, $error ); /** * Filters the arguments passed to {@see wp_die()} for the default PHP error template. * * @since 5.2.0 * * @param array $args Associative array of arguments passed to `wp_die()`. By default these contain a * 'response' key, and optionally 'link_url' and 'link_text' keys. * @param array $error Error information retrieved from `error_get_last()`. */ $args = apply_filters( 'wp_php_error_args', $args, $error ); $wp_error = new WP_Error( 'internal_server_error', $message, array( 'error' => $error, ) ); wp_die( $wp_error, '', $args ); } } WP_Error( 'invalid_format', __( 'Invalid cookie format.' ) ); } return $parts; } /** * Generates the recovery mode cookie value. * * The cookie is a base64 encoded string with the following format: * * recovery_mode|iat|rand|signature * * Where "recovery_mode" is a constant string, * iat is the time the cookie was generated at, * rand is a randomly generated password that is also used as a session identifier * and signature is an hmac of the preceding 3 parts. * * @since 5.2.0 * * @return string Generated cookie content. */ private function generate_cookie() { $to_sign = sprintf( 'recovery_mode|%s|%s', time(), wp_generate_password( 20, false ) ); $signed = $this->recovery_mode_hash( $to_sign ); return base64_encode( sprintf( '%s|%s', $to_sign, $signed ) ); } /** * Gets a form of `wp_hash()` specific to Recovery Mode. * * We cannot use `wp_hash()` because it is defined in `pluggable.php` which is not loaded until after plugins are loaded, * which is too late to verify the recovery mode cookie. * * This tries to use the `AUTH` salts first, but if they aren't valid specific salts will be generated and stored. * * @since 5.2.0 * * @param string $data Data to hash. * @return string|false The hashed $data, or false on failure. */ private function recovery_mode_hash( $data ) { $default_keys = array_unique( array( 'put your unique phrase here', /* * translators: This string should only be translated if wp-config-sample.php is localized. * You can check the localized release package or * https://i18n.svn.wordpress.org//branches//dist/wp-config-sample.php */ __( 'put your unique phrase here' ), ) ); if ( ! defined( 'AUTH_KEY' ) || in_array( AUTH_KEY, $default_keys, true ) ) { $auth_key = get_site_option( 'recovery_mode_auth_key' ); if ( ! $auth_key ) { if ( ! function_exists( 'wp_generate_password' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } $auth_key = wp_generate_password( 64, true, true ); update_site_option( 'recovery_mode_auth_key', $auth_key ); } } else { $auth_key = AUTH_KEY; } if ( ! defined( 'AUTH_SALT' ) || in_array( AUTH_SALT, $default_keys, true ) || AUTH_SALT === $auth_key ) { $auth_salt = get_site_option( 'recovery_mode_auth_salt' ); if ( ! $auth_salt ) { if ( ! function_exists( 'wp_generate_password' ) ) { require_once ABSPATH . WPINC . '/pluggable.php'; } $auth_salt = wp_generate_password( 64, true, true ); update_site_option( 'recovery_mode_auth_salt', $auth_salt ); } } else { $auth_salt = AUTH_SALT; } $secret = $auth_key . $auth_salt; return hash_hmac( 'sha1', $data, $secret ); } } his->option_name, array() ); } /** * Updates the recovery key records. * * @since 5.2.0 * * @param array $keys Associative array of $token => $data pairs, where $data has keys 'hashed_key' * and 'created_at'. * @return bool True on success, false on failure. */ private function update_keys( array $keys ) { return update_option( $this->option_name, $keys ); } }
Fatal error: Uncaught Error: Class 'WP_Fatal_Error_Handler' not found in /home/islamicf/public_html/wp-includes/error-protection.php:92 Stack trace: #0 /home/islamicf/public_html/wp-settings.php(65): wp_register_fatal_error_handler() #1 /home/islamicf/public_html/wp-config.php(99): require_once('/home/islamicf/...') #2 /home/islamicf/public_html/wp-load.php(50): require_once('/home/islamicf/...') #3 /home/islamicf/public_html/wp-blog-header.php(13): require_once('/home/islamicf/...') #4 /home/islamicf/public_html/index.php(17): require('/home/islamicf/...') #5 {main} thrown in /home/islamicf/public_html/wp-includes/error-protection.php on line 92