Uses
Uses | Description |
---|---|
wp-includes/post.php: get_post() | Retrieves post data given a post ID or post object. |
Magic getter.
If $name
matches a post field, the comment post will be loaded and the post’s value returned.
(string) (Required)
(mixed)
File: wp-includes/class-wp-comment.php
public function __get( $name ) { if ( in_array( $name, $this->post_fields, true ) ) { $post = get_post( $this->comment_post_ID ); return $post->$name; } }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_comment/__get