filtrdynamicznyod 2.6.0
{$adjacent}_post_link
Args 5Plik wp-includes/link-template.php
Opis — z kodu źródłowego
Filters the adjacent post link.
The dynamic portion of the hook name, $adjacent, refers to the type of adjacency, 'next' or 'previous'.
Possible hook names include:
next_post_linkprevious_post_link
Hook dynamiczny — możliwe nazwy
next_post_linkprevious_post_linkParametry
| Parametr | Typ | Opis |
|---|---|---|
$output | string | The adjacent post link. |
$format | string | Link anchor format. |
$link | string | Link permalink format. |
$post | \WP_Post | string | The adjacent post. Empty string if no corresponding post exists. |
$adjacent | string | Whether the post is previous or next. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$adjacent}_post_link', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$adjacent}_post_link', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii