WP_Recovery_Mode::store_error() WordPress Method

The WP_Recovery_Mode::store_error() method is used to store an error in the WordPress database. This is useful for debugging purposes, as it allows you to see what errors have occurred in your WordPress installation.

WP_Recovery_Mode::store_error( array $error ) #

Stores the given error so that the extension causing it is paused.


Parameters

$error

(array)(Required)Error details from error_get_last().


Top ↑

Return

(bool) True if the error was stored successfully, false otherwise.


Top ↑

Source

File: wp-includes/class-wp-recovery-mode.php

	protected function store_error( $error ) {
		$extension = $this->get_extension_for_error( $error );

		if ( ! $extension ) {
			return false;
		}

		switch ( $extension['type'] ) {
			case 'plugin':
				return wp_paused_plugins()->set( $extension['slug'], $error );
			case 'theme':
				return wp_paused_themes()->set( $extension['slug'], $error );
			default:
				return false;
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
5.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.