WP_Post::__isset( string $key ): bool

In this article

Isset-er.

Parameters

$keystringrequired
Property to check if set.

Return

bool

Source

public function __isset( $key ) {
	if ( 'ancestors' === $key ) {
		return true;
	}

	if ( 'page_template' === $key ) {
		return true;
	}

	if ( 'post_category' === $key ) {
		return true;
	}

	if ( 'tags_input' === $key ) {
		return true;
	}

	return metadata_exists( 'post', $this->ID, $key );
}

Changelog

VersionDescription
3.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.