wp_get_wp_version()WP 6.7.0

Returns the current WordPress version.

Returns an unmodified value of $wp_version. Some plugins modify the global in an attempt to improve security through obscurity. This practice can cause errors in WordPress, so the ability to get an unmodified version is needed.

Хуков нет.

Возвращает

Строку. The current WordPress version.

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

wp_get_wp_version();

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

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

Код wp_get_wp_version() WP 6.7.1

function wp_get_wp_version() {
	static $wp_version;

	if ( ! isset( $wp_version ) ) {
		require ABSPATH . WPINC . '/version.php';
	}

	return $wp_version;
}