WP HOOKS
filtrod 3.0.0

pre_post_link

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

Opis — z kodu źródłowego

Filters the permalink structure for a post before token replacement occurs.

Only applies to posts with post_type of 'post'.

Parametry

ParametrTypOpis
$permalinkstringThe site's permalink structure.
$post\WP_PostThe post in question.
$leavenameboolWhether to keep the post name.

Wywołanie

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

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

Popularne w tej kategorii