Comment
Overview
The Comment module wraps comment objects and common comment operations. It includes an object trait for domain objects backed by WP_Comment, a fluent get_comments() builder, and an update/insert builder for persisting comments.
Types in this module
Lipe\Lib\Comment\Comment_TraitLipe\Lib\Comment\Get_CommentsLipe\Lib\Comment\Update_Comment
Comment_Trait
Shared behavior for classes that wrap a single WordPress comment and want meta access through the library’s meta tools.
Key public methods
public function get_object(): ?\WP_Commentpublic function get_id(): intpublic function get_meta_type(): MetaTypepublic function get_comment_post(): ?\WP_Postpublic function exists(): boolpublic static function factory(int|\WP_Comment $comment): static
Get_Comments
Fluent query object for get_comments() with date and meta clause support.
Key public methods
public function orderby(array|string $orderby, string $order = ''): voidpublic function merge_query(\WP_Comment_Query $query): voidpublic function get_light_args(): array
Example
<?php
use Lipe\Lib\Comment\Get_Comments;
$query = new Get_Comments([]);
$query->post_id = 42;
$query->number = 10;
$comments = get_comments($query->get_args());
Update_Comment
Fluent wrapper for wp_insert_comment() and wp_update_comment().
This class is primarily property-driven through the shared args system; populate the fields WordPress expects, then pass get_args() into the core insert/update function.