WP HOOKS
filtrod 2.2.0

user_trailingslashit

Args 2Plik wp-includes/link-template.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the trailing-slashed string, depending on whether the site is set to use trailing slashes.

Parametry

ParametrTypOpis
$urlstringURL with or without a trailing slash.
$type_of_urlstringThe type of URL being considered. Accepts 'single', 'single_trackback', 'single_feed', 'single_paged', 'commentpaged', 'paged', 'home', 'feed', 'category', 'page', 'year', 'month', 'day', 'post_type_archive'.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'user_trailingslashit', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii