WP_Comment::__isset

Advertisement

Summery Summery

Check whether a non-public property is set.

Syntax Syntax

WP_Comment::__isset( string $name )

Description Description

If $name matches a post field, the comment post will be loaded and the post’s value checked.

Parameters Parameters

$name

(Required) Property name.

Return Return

(bool)

Source Source

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

	 */
	public function __isset( $name ) {
		if ( in_array( $name, $this->post_fields, true ) && 0 !== (int) $this->comment_post_ID ) {
			$post = get_post( $this->comment_post_ID );
			return property_exists( $post, $name );
		}

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply