filtrod 2.7.0
site_url
Opis — z kodu źródłowego
Filters the site URL.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$url | string | The complete site URL including scheme and path. |
$path | string | Path relative to the site URL. Blank string if no path is specified. |
$scheme | string | null | Scheme to give the site URL context. Accepts 'http', 'https', 'login', 'login_post', 'admin', 'relative' or null. |
$blog_id | int | null | Site ID, or null for the current site. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'site_url', '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( 'site_url', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii