filtrod 4.4.0
get_page_of_comment
Opis — z kodu źródłowego
Filters the calculated page on which a comment appears.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$page | int | Comment page. |
$args | array | { 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_args | array | { 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_id | int | ID 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
}
// 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