WP_Paused_Extensions_Storage::get( string $extension ): array|null

In this article

Gets the error for an extension, if paused.

Parameters

$extensionstringrequired
Plugin or theme directory name.

Return

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

Source

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

Changelog

VersionDescription
5.2.0Introduced.

User Contributed Notes

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