WP_Recovery_Mode::store_error

Advertisement

Summery Summery

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

Syntax Syntax

WP_Recovery_Mode::store_error( array $error )

Parameters Parameters

$error

(array) (Required) Error that was triggered.

Return Return

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

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

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.