| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Comment API: WP_Comment class
| File Size: | 378 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| get_instance( $id ) X-Ref |
| Retrieves a WP_Comment instance. param: int $id Comment ID. return: WP_Comment|false Comment object, otherwise false. |
| __construct( $comment ) X-Ref |
| Constructor. Populates properties with object vars. param: WP_Comment $comment Comment object. |
| to_array() X-Ref |
| Converts object to array. return: array Object as array. |
| get_children( $args = array() X-Ref |
| Gets the children of a comment. param: array $args { return: WP_Comment[] Array of `WP_Comment` objects. |
| add_child( WP_Comment $child ) X-Ref |
| Adds a child to the comment. Used by `WP_Comment_Query` when bulk-filling descendants. param: WP_Comment $child Child comment. |
| get_child( $child_id ) X-Ref |
| Gets a child comment by ID. param: int $child_id ID of the child. return: WP_Comment|false Returns the comment object if found, otherwise false. |
| populated_children( $set ) X-Ref |
| Sets the 'populated_children' flag. This flag is important for ensuring that calling `get_children()` on a childless comment will not trigger unneeded database queries. param: bool $set Whether the comment's children have already been populated. |
| __isset( $name ) X-Ref |
| Determines 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. param: string $name Property to check if set. return: bool Whether the property is set. |
| __get( $name ) X-Ref |
| Magic getter. If `$name` matches a post field, the comment post will be loaded and the post's value returned. param: string $name Property name. return: mixed |
| Generated : Sat Apr 18 08:20:10 2026 | Cross-referenced by PHPXref |