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



get_comments › WordPress Function

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 string.
    Required: No
    Padrão: (empty)
Retorna:
  • (WP_Comment[]|int[]|int) List of comments or number of found comments if `$count` argument is true.
Definido em:
Codex:

Retrieves 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 );
}