filtrod 3.3.0
wp_trim_words
Opis — z kodu źródłowego
Filters the text content after words have been trimmed.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$text | string | The trimmed text. |
$num_words | int | The number of words to trim the text to. Default 55. |
$more | string | An optional string to append to the end of the trimmed text, e.g. …. |
$original_text | string | The 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
}
// 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