WP HOOKS
filtrod 3.3.0

wp_trim_words

Args 4Plik wp-includes/formatting.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the text content after words have been trimmed.

Parametry

ParametrTypOpis
$textstringThe trimmed text.
$num_wordsintThe number of words to trim the text to. Default 55.
$morestringAn optional string to append to the end of the trimmed text, e.g. ….
$original_textstringThe text before it was trimmed.

Wywołanie

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

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

Popularne w tej kategorii