filtrod 3.0.0
get_shortlink
Opis — z kodu źródłowego
Filters the shortlink for a post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$shortlink | string | Shortlink URL. |
$id | int | Post ID, or 0 for the current post. |
$context | string | The context for the link. One of 'post' or 'query', |
$allow_slugs | bool | Whether to allow post slugs in the shortlink. Not used by default. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_shortlink', '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_shortlink', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii