Get some recent comments depending on the arguments you've passed.
The arguments are the same as the one of get_comments wordpress function.
This function return an array of WPS_Comment objects.
| Name | Type | Description | Status | Default |
|---|---|---|---|---|
| $args | { Array } | The arguments to pass to the get_comments wordpress function |
optional | [] |
Return { Array<WPS_Comment> } Array of WPS\Comment objects
$comments = WPS::recent_comments([
'number' => 3
]);Author : Olivier Bossel olivier.bossel@gmail.com https://olivierbossel.com
See : See more : https://codex.wordpress.org/Function_Reference/get_comments