WP_Query::__get │ public │ WP 4.0.0

Makes private properties readable for backward compatibility.

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

Хуков нет.

Возвращает

mixed. Property.

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

global $wp_query;
$wp_query->__get( $name );
$name(строка) (обязательный)
Property to get.

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

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

Код WP_Query::__get() WP 7.1.2

public function __get( $name ) {
	if ( in_array( $name, $this->compat_fields, true ) ) {
		return $this->$name;
	}
}