WPDev.one
Core Class

WP_Comment

class WP_Comment // Constructor: function Object() { [native code] }

Core class used to organize comments as instantiated objects with defined members.

Methods 9 methods

Method / Return Description
get_instance()
(WP_Comment

Retrieves a WP_Comment instance.

Parameters: $id: mixed
__construct()
void

Constructor.

Parameters: $comment: mixed
to_array()
array

Converts object to array.

get_children()
WP_Comment[]

Gets the children of a comment.

Parameters: $args: mixed
add_child()
void

Adds a child to the comment.

Parameters: $child: WP_Comment
get_child()
(WP_Comment

Gets a child comment by ID.

Parameters: $child_id: mixed
populated_children()
void

Sets the 'populated_children' flag.

Parameters: $set: mixed
__isset()
bool

Determines whether a non-public property is set.

Parameters: $name: mixed
__get()
mixed

Magic getter.

Parameters: $name: mixed

Properties

Property / Type Description
$comment_ID
mixed
public
No description available.
$comment_post_ID
mixed
public
No description available.
$comment_author
mixed
public
No description available.
$comment_author_email
mixed
public
No description available.
$comment_author_url
mixed
public
No description available.
$comment_author_IP
mixed
public
No description available.
$comment_date
mixed
public
No description available.
$comment_date_gmt
mixed
public
No description available.
$comment_content
mixed
public
No description available.
$comment_karma
mixed
public
No description available.
$comment_approved
mixed
public
No description available.
$comment_agent
mixed
public
No description available.
$comment_type
mixed
public
No description available.
$comment_parent
mixed
public
No description available.
$user_id
mixed
public
No description available.
$children
mixed
public
No description available.
$populated_children
mixed
public
No description available.
$post_fields
mixed
public
No description available.

Class Information

Since Version
4.4.0
Source File
wp-includes/class-wp-comment.php
Advertisement