wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_comments › WordPress Function

Depuis2.7.0
Dépréciéen/a
get_comments ( $args = '' )
Paramètres:
  • (string|array) $args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty string.
    Requis: Non
    Défaut: (vide)
Retourne:
  • (WP_Comment[]|int[]|int) List of comments or number of found comments if `$count` argument is true.
Défini(e) dans:
Codex:

Retrieves a list of comments.

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


Source

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