WPSEO_Gutenberg_Compatibility::detect_installed_gutenberg_version()protectedYoast 1.0

Detects the currently installed Gutenberg version.

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

Хуков нет.

Возвращает

Строку. The currently installed Gutenberg version. Empty if the version couldn't be detected.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->detect_installed_gutenberg_version();

Код WPSEO_Gutenberg_Compatibility::detect_installed_gutenberg_version() Yoast 22.4

protected function detect_installed_gutenberg_version() {
	if ( defined( 'GUTENBERG_VERSION' ) ) {
		return GUTENBERG_VERSION;
	}

	return '';
}