W3cubDocs

/WordPress

WP_Paused_Extensions_Storage::get( string $extension )

Gets the error for an extension, if paused.

Parameters

$extension

(string) (Required) Plugin or theme directory name.

Return

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

Source

File: wp-includes/class-wp-paused-extensions-storage.php

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

Version Description
5.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_paused_extensions_storage/get