/ Database / query.get_comment

Title : query.get_comment
Purpose : Retrieves comment data given a comment ID or comment object.
Syntax : [query.get_comment id=”575512″ output=”ARRAY_A” /]
Input Parameters : id: (int) Comment ID.
output:(string) (Optional) The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which corresponds to a WP_Comment object, an associative array, or a numeric array, respectively.
Return Value : (WP_Comment|array|null) Depends on $output value.
Example 1 :
Code : [query.get_comment id=”575512″ output=”ARRAY_A” /]
Output : (WP_Comment|array|null) Depends on $output value.
Description :
If an object is passed then the comment data will be cached and then returned after being passed through a filter. If the comment is empty, then the global comment variable will be used, if it is set.

Most Popular

Leave a Reply

Your email address will not be published.