WP_Recovery_Mode::store_error( array $error ): bool

In this article

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

Parameters

$errorarrayrequired
Error details from error_get_last().

Return

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

Source

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;
	}
}

Changelog

VersionDescription
5.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.