WordPress at a glance
function is not described

WP_Query::__get() WP 4.0.0

Make private properties readable for backward compatibility.

This is a method of the class: WP_Query

No Hooks.


Mixed. Property.


$WP_Query = new WP_Query();
$var = $WP_Query->__get( $name );
$name(string) (required)
Property to get.

Code of WP Query:: get: wp-includes/class-wp-query.php WP 5.2

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