Uses
Uses | Description |
---|---|
wp-includes/functions.php: wp_die() | Kills WordPress execution and displays HTML page with an error message. |
wp-includes/load.php: is_wp_error() | Check whether variable is a WordPress Error. |
Handles checking for the recovery mode cookie and validating it.
File: wp-includes/class-wp-recovery-mode.php
protected function handle_cookie() { $validated = $this->cookie_service->validate_cookie(); if ( is_wp_error( $validated ) ) { $this->cookie_service->clear_cookie(); $validated->add_data( array( 'status' => 403 ) ); wp_die( $validated ); } $session_id = $this->cookie_service->get_session_id_from_cookie(); if ( is_wp_error( $session_id ) ) { $this->cookie_service->clear_cookie(); $session_id->add_data( array( 'status' => 403 ) ); wp_die( $session_id ); } $this->is_active = true; $this->session_id = $session_id; }
Version | Description |
---|---|
5.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_recovery_mode/handle_cookie