WP HOOKS
filtrod 4.5.0

comments_template_query_args

Args 1Plik wp-includes/comment-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the arguments used to query comments in comments_template().

Parametry

ParametrTypOpis
$comment_argsarray{ Array of WP_Comment_Query arguments. @type string|array $orderby Field(s) to order by. @type string $order Order of results. Accepts 'ASC' or 'DESC'. @type string $status Comment status. @type array $include_unapproved Array of IDs or email addresses whose unapproved comments will be included in results. @type int $post_id ID of the post. @type bool $no_found_rows Whether to refrain from querying for found rows. @type bool $update_comment_meta_cache Whether to prime cache for comment meta. @type bool|string $hierarchical Whether to query for comments hierarchically. @type int $offset Comment offset. @type int $number Number of comments to fetch. }

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'comments_template_query_args', 'twoja_funkcja' );

function twoja_funkcja($param_1) {
	// Twój kod
}

Popularne w tej kategorii