[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Error Protection API: WP_Recovery_Mode class
File Size: | 471 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. |
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. return: true|WP_Error|void True if the error was handled and headers have already been sent. param: array $error Error details from `error_get_last()`. |
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. return: array|false { param: array $error Error details from `error_get_last()`. |
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. |
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()`. |
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 : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |