[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





/wp-includes/ -> class-wp-recovery-mode.php (summary)

Error Protection API: WP_Recovery_Mode class

File Size: 468 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file

Defines 1 class

WP_Recovery_Mode:: (16 methods):

Class: WP_Recovery_Mode  - X-Ref

Core class used to implement Recovery Mode.

__construct()   X-Ref
WP_Recovery_Mode constructor.

initialize()   X-Ref
Initialize recovery mode for the current request.

is_active()   X-Ref
Checks whether recovery mode is active.

This will not change after recovery mode has been initialized. {@see WP_Recovery_Mode::run()}.

return: bool True if recovery mode is active, false otherwise.

get_session_id()   X-Ref
Gets the recovery mode session ID.

return: string The session ID if recovery mode is active, empty string otherwise.

is_initialized()   X-Ref
Checks whether recovery mode has been initialized.

Recovery mode should not be used until this point. Initialization happens immediately before loading plugins.

return: bool

handle_error( array $error )   X-Ref
Handles a fatal error occurring.

The calling API should immediately die() after calling this function.

param: array $error Error details from {@see error_get_last()}
return: true|WP_Error True if the error was handled and headers have already been sent.

exit_recovery_mode()   X-Ref
Ends the current recovery mode session.

return: bool True on success, false on failure.

handle_exit_recovery_mode()   X-Ref
Handles a request to exit Recovery Mode.

clean_expired_keys()   X-Ref
Cleans any recovery mode keys that have expired according to the link TTL.

Executes on a daily cron schedule.

handle_cookie()   X-Ref
Handles checking for the recovery mode cookie and validating it.

get_email_rate_limit()   X-Ref
Gets the rate limit between sending new recovery mode email links.

return: int Rate limit in seconds.

get_link_ttl()   X-Ref
Gets the number of seconds the recovery mode link is valid for.

return: int Interval in seconds.

get_extension_for_error( $error )   X-Ref
Gets the extension that the error occurred in.

param: array  $error Error that was triggered.
return: array|false {

is_network_plugin( $extension )   X-Ref
Checks whether the given extension a network activated plugin.

param: array $extension Extension data.
return: bool True if network plugin, false otherwise.

store_error( $error )   X-Ref
Stores the given error so that the extension causing it is paused.

param: array $error Error that was triggered.
return: bool True if the error was stored successfully, false otherwise.

redirect_protected()   X-Ref
Redirects the current request to allow recovering multiple errors in one go.

The redirection will only happen when on a protected endpoint.

It must be ensured that this method is only called when an error actually occurred and will not occur on the
next request again. Otherwise it will create a redirect loop.

Generated : Fri Jul 3 08:20:01 2020 Cross-referenced by PHPXref