wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_comments › WordPress Function

Od2.7.0
Przestarzałyn/a
get_comments ( $args = '' )
Parametry:
  • (string|array) $args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty string.
    Wymagane: Nie
    Domyślny: (puste)
Powrót:
  • (WP_Comment[]|int[]|int) List of comments or number of found comments if `$count` argument is true.
Zdefiniowane na:
Codex:

Retrieves a list of comments.

The comment list can be for the blog as a whole or for an individual post.


Źródło

function get_comments( $args = '' ) {
	$query = new WP_Comment_Query();
	return $query->query( $args );
}