filtrod 2.6.0
editable_slug
Opis — z kodu źródłowego
Filters the editable slug for a post or term.
Note: This is a multi-use hook in that it is leveraged both for editable post URIs and term slugs.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$slug | string | The editable slug. Will be either a term slug or post URI depending upon the context in which it is evaluated. |
$tag | \WP_Term | \WP_Post | Term or post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'editable_slug', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'editable_slug', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii