Un motore di ricerca WordPress per sviluppatori e autori di temi



get_comments ›

Da2.7.0
Deprecaton/a
get_comments ( $args = '' )
Parametri:
  • (string|array) $args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty.
    Richiesto: No
    Default: (vuoto)
Ritorna:
  • (int|array) List of comments or number of found comments if `$count` argument is true.
Definito a:
Codex:

Retrieve a list of comments.

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



Sorgenti

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