WP_Post::__isset

Advertisement

Summery Summery

Isset-er.

Syntax Syntax

WP_Post::__isset( string $key )

Parameters Parameters

$key

(Required) Property to check if set.

Return Return

(bool)

Source Source

File: wp-includes/class-wp-post.php

	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 );
	}

Advertisement

Changelog Changelog

Changelog
Version Description
3.5.0 Introduced.

Advertisement

Leave a Reply