WP_Paused_Extensions_Storage::get()publicWP 5.2.0

Gets the error for an extension, if paused.

Метод класса: WP_Paused_Extensions_Storage{}

Хуков нет.

Возвращает

Массив|null. Error that is stored, or null if the extension is not paused.

Использование

$WP_Paused_Extensions_Storage = new WP_Paused_Extensions_Storage();
$WP_Paused_Extensions_Storage->get( $extension );
$extension(строка) (обязательный)
Plugin or theme directory name.

Список изменений

С версии 5.2.0 Введена.

Код WP_Paused_Extensions_Storage::get() 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 ];
}