[ Index ]

PHP Cross Reference of WordPress




/wp-includes/ -> class-wp-comment.php (summary)

Comment API: WP_Comment class

File Size: 379 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions


Functions that are not part of a class:

get_instance( $id )   X-Ref
Retrieves a WP_Comment instance.

return: WP_Comment|false Comment object, otherwise false.
since: 4.4.0
param: int $id Comment ID.

__construct( $comment )   X-Ref

Populates properties with object vars.

since: 4.4.0
param: WP_Comment $comment Comment object.

to_array()   X-Ref
Convert object to array.

return: array Object as array.
since: 4.4.0

get_children( $args = array()   X-Ref
Get the children of a comment.

return: WP_Comment[] Array of `WP_Comment` objects.
since: 4.4.0
param: array $args {

add_child( WP_Comment $child )   X-Ref
Add a child to the comment.

Used by `WP_Comment_Query` when bulk-filling descendants.

since: 4.4.0
param: WP_Comment $child Child comment.

get_child( $child_id )   X-Ref
Get a child comment by ID.

return: WP_Comment|false Returns the comment object if found, otherwise false.
since: 4.4.0
param: int $child_id ID of the child.

populated_children( $set )   X-Ref
Set the 'populated_children' flag.

This flag is important for ensuring that calling `get_children()` on a childless comment will not trigger
unneeded database queries.

since: 4.4.0
param: bool $set Whether the comment's children have already been populated.

__isset( $name )   X-Ref
Check whether a non-public property is set.

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

return: bool
since: 4.4.0
param: string $name Property name.

__get( $name )   X-Ref
Magic getter.

If `$name` matches a post field, the comment post will be loaded and the post's value returned.

return: mixed
since: 4.4.0
param: string $name

Generated: Tue Jun 25 01:00:07 2024 Cross-referenced by PHPXref 0.7.1