[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Error Protection API: WP_Recovery_Mode class
File Size: | 470 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file wp-includes/pluggable.php |
WP_Recovery_Mode:: (16 methods):
__construct()
initialize()
is_active()
get_session_id()
is_initialized()
handle_error()
exit_recovery_mode()
handle_exit_recovery_mode()
clean_expired_keys()
handle_cookie()
get_email_rate_limit()
get_link_ttl()
get_extension_for_error()
is_network_plugin()
store_error()
redirect_protected()
Class: WP_Recovery_Mode - X-Ref
Core class used to implement Recovery Mode.__construct() X-Ref |
WP_Recovery_Mode constructor. since: 5.2.0 |
initialize() X-Ref |
Initialize recovery mode for the current request. since: 5.2.0 |
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. since: 5.2.0 |
get_session_id() X-Ref |
Gets the recovery mode session ID. return: string The session ID if recovery mode is active, empty string otherwise. since: 5.2.0 |
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 since: 5.2.0 |
handle_error( array $error ) X-Ref |
Handles a fatal error occurring. The calling API should immediately die() after calling this function. return: true|WP_Error True if the error was handled and headers have already been sent. param: array $error Error details from `error_get_last()`. since: 5.2.0 |
exit_recovery_mode() X-Ref |
Ends the current recovery mode session. return: bool True on success, false on failure. since: 5.2.0 |
handle_exit_recovery_mode() X-Ref |
Handles a request to exit Recovery Mode. since: 5.2.0 |
clean_expired_keys() X-Ref |
Cleans any recovery mode keys that have expired according to the link TTL. Executes on a daily cron schedule. since: 5.2.0 |
handle_cookie() X-Ref |
Handles checking for the recovery mode cookie and validating it. since: 5.2.0 |
get_email_rate_limit() X-Ref |
Gets the rate limit between sending new recovery mode email links. return: int Rate limit in seconds. since: 5.2.0 |
get_link_ttl() X-Ref |
Gets the number of seconds the recovery mode link is valid for. return: int Interval in seconds. since: 5.2.0 |
get_extension_for_error( $error ) X-Ref |
Gets the extension that the error occurred in. return: array|false { param: array $error Error details from `error_get_last()`. since: 5.2.0 |
is_network_plugin( $extension ) X-Ref |
Checks whether the given extension a network activated plugin. return: bool True if network plugin, false otherwise. param: array $extension Extension data. since: 5.2.0 |
store_error( $error ) X-Ref |
Stores the given error so that the extension causing it is paused. return: bool True if the error was stored successfully, false otherwise. param: array $error Error details from `error_get_last()`. since: 5.2.0 |
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. since: 5.2.0 |
Generated: Sat Nov 23 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |