filtrod 4.8.0
page_menu_link_attributes
Opis — z kodu źródłowego
Filters the HTML attributes applied to a page menu item's anchor element.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$atts | array | { The HTML attributes applied to the menu item's <code><a></code> element, empty strings are ignored. @type string $href The href attribute. @type string $aria-current The aria-current attribute. } |
$page | \WP_Post | Page data object. |
$depth | int | Depth of page, used for padding. |
$args | array | An array of arguments. |
$current_page_id | int | ID of the current page. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'page_menu_link_attributes', '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( 'page_menu_link_attributes', 'twoja_funkcja', 10, 5 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4, $param_5) {
// Twój kod
}Popularne w tej kategorii