WP HOOKS
filtrod 3.0.0

get_shortlink

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

Opis — z kodu źródłowego

Filters the shortlink for a post.

Parametry

ParametrTypOpis
$shortlinkstringShortlink URL.
$idintPost ID, or 0 for the current post.
$contextstringThe context for the link. One of 'post' or 'query',
$allow_slugsboolWhether 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
}

Popularne w tej kategorii