Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_comments ›

Desde2.7.0
Obsoleton/a
get_comments ( $args = '' )
Parâmetros:
  • (string|array) $args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty.
    Required: No
    Padrão: (empty)
Retorna:
  • (int|array) List of comments or number of found comments if `$count` argument is true.
Definido em:
Codex:

Retrieve a list of comments.

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



Fonte

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