WP HOOKS
filtrod 4.4.0

get_page_of_comment

Args 4Plik wp-includes/comment.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the calculated page on which a comment appears.

Parametry

ParametrTypOpis
$pageintComment page.
$argsarray{ Arguments used to calculate pagination. These include arguments auto-detected by the function, based on query vars, system settings, etc. For pristine arguments passed to the function, see <code>$original_args</code>. @type string $type Type of comments to count. @type int $page Calculated current page. @type int $per_page Calculated number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
$original_argsarray{ Array of arguments passed to the function. Some or all of these may not be set. @type string $type Type of comments to count. @type int $page Current comment page. @type int $per_page Number of comments per page. @type int $max_depth Maximum comment threading depth allowed. }
$comment_idintID of the comment.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_page_of_comment', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii