WP_Paused_Extensions_Storage::get()publicWP 5.2.0

Gets the error for an extension, if paused.

Method of the class: WP_Paused_Extensions_Storage{}

No Hooks.

Return

Array|null. Error that is stored, or null if the extension is not paused.

Usage

$WP_Paused_Extensions_Storage = new WP_Paused_Extensions_Storage();
$WP_Paused_Extensions_Storage->get( $extension );
$extension(string) (required)
Plugin or theme directory name.

Changelog

Since 5.2.0 Introduced.

WP_Paused_Extensions_Storage::get() code WP 6.5.2

public function get( $extension ) {
	if ( ! $this->is_api_loaded() ) {
		return null;
	}

	$paused_extensions = $this->get_all();

	if ( ! isset( $paused_extensions[ $extension ] ) ) {
		return null;
	}

	return $paused_extensions[ $extension ];
}