179 if ( ! class_exists( 'WP_Error' ) ) { |
179 if ( ! class_exists( 'WP_Error' ) ) { |
180 require_once ABSPATH . WPINC . '/class-wp-error.php'; |
180 require_once ABSPATH . WPINC . '/class-wp-error.php'; |
181 } |
181 } |
182 |
182 |
183 if ( true === $handled && wp_is_recovery_mode() ) { |
183 if ( true === $handled && wp_is_recovery_mode() ) { |
184 $message = __( 'There has been a critical error on your 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.' ); |
184 $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.' ); |
185 } elseif ( is_protected_endpoint() ) { |
185 } elseif ( is_protected_endpoint() && wp_recovery_mode()->is_initialized() ) { |
186 $message = __( 'There has been a critical error on your website. Please check your site admin email inbox for instructions.' ); |
186 $message = __( 'There has been a critical error on this website. Please check your site admin email inbox for instructions.' ); |
187 } else { |
187 } else { |
188 $message = __( 'There has been a critical error on your website.' ); |
188 $message = __( 'There has been a critical error on this website.' ); |
189 } |
189 } |
190 |
190 |
191 $message = sprintf( |
191 $message = sprintf( |
192 '<p>%s</p><p><a href="%s">%s</a></p>', |
192 '<p>%s</p><p><a href="%s">%s</a></p>', |
193 $message, |
193 $message, |
194 /* translators: Documentation explaining debugging in WordPress. */ |
194 /* translators: Documentation about troubleshooting. */ |
195 __( 'https://wordpress.org/support/article/debugging-in-wordpress/' ), |
195 __( 'https://wordpress.org/support/article/faq-troubleshooting/' ), |
196 __( 'Learn more about debugging in WordPress.' ) |
196 __( 'Learn more about troubleshooting WordPress.' ) |
197 ); |
197 ); |
198 |
198 |
199 $args = array( |
199 $args = array( |
200 'response' => 500, |
200 'response' => 500, |
201 'exit' => false, |
201 'exit' => false, |