wppaste
WordPress

WP_Recovery_Mode

Since
5.2.0
Source
wp-includes/class-wp-recovery-mode.php:14
Core class used to implement Recovery Mode.

Compatibility

WordPress
since 5.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 2

Every hook that fires from inside WP_Recovery_Mode, in the order it appears in the class, grouped by the method that fires it.

Properties · 7

$key_serviceWP_Recovery_Mode_Key_Serviceprivate
Service to generate a recovery mode key.
$email_serviceWP_Recovery_Mode_Email_Serviceprivate
Service to handle sending an email with a recovery mode link.
$is_initializedboolprivate
Is recovery mode initialized.
$is_activeboolprivate
Is recovery mode active in this session.
$session_idstringprivate
Get an ID representing the current recovery mode session.

Methods · 16

Source code

#[AllowDynamicProperties]class WP_Recovery_Mode { 	const EXIT_ACTION = 'exit_recovery_mode'; 	/**	 * Service to handle cookies.	 *	 * @since 5.2.0	 * @var WP_Recovery_Mode_Cookie_Service	 */	private $cookie_service; 	/**	 * Service to generate a recovery mode key.	 *	 * @since 5.2.0	 * @var WP_Recovery_Mode_Key_Service	 */	private $key_service; 	/**	 * Service to generate and validate recovery mode links.	 *	 * @since 5.2.0	 * @var WP_Recovery_Mode_Link_Service	 */	private $link_service; 	/**	 * Service to handle sending an email with a recovery mode link.	 *	 * @since 5.2.0	 * @var WP_Recovery_Mode_Email_Service	 */	private $email_service; 	/**	 * Is recovery mode initialized.	 *	 * @since 5.2.0	 * @var bool	 */	private $is_initialized = false; 	/**	 * Is recovery mode active in this session.	 *	 * @since 5.2.0	 * @var bool	 */	private $is_active = false; 	/**	 * Get an ID representing the current recovery mode session.	 *	 * @since 5.2.0	 * @var string	 */	private $session_id = ''; 	/**	 * WP_Recovery_Mode constructor.	 *	 * @since 5.2.0	 */	public function __construct() {		$this->cookie_service = new WP_Recovery_Mode_Cookie_Service();		$this->key_service    = new WP_Recovery_Mode_Key_Service();		$this->link_service   = new WP_Recovery_Mode_Link_Service( $this->cookie_service, $this->key_service );		$this->email_service  = new WP_Recovery_Mode_Email_Service( $this->link_service );	} 	/**	 * Initialize recovery mode for the current request.	 *	 * @since 5.2.0	 */	public function initialize() {		$this->is_initialized = true;

Changelog

Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/class-wp-recovery-mode.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.