WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Авторские Темы для WordPress
функция не описана


Constants::get_constant() public WC 1.0

Attempts to retrieve the "constant" from constants Manager, and if it hasn't been set, then attempts to get the constant with the constant() function. If that also hasn't been set, attempts to get a value from filters.

{} Это метод класса: Constants{}

Хуки из метода

Разное. null if the constant does not exist or the value of the constant.


$result = Constants::get_constant( $name );
$name(строка) (обязательный)
The name of the constant.

Код Constants::get_constant() WC 5.4.1

public static function get_constant( $name ) {
	if ( array_key_exists( $name, self::$set_constants ) ) {
		return self::$set_constants[ $name ];

	if ( defined( $name ) ) {
		return constant( $name );

	 * Filters the value of the constant.
	 * @since 8.5.0
	 * @param null The constant value to be filtered. The default is null.
	 * @param String $name The constant name.
	return apply_filters( 'jetpack_constant_default_value', null, $name );