filtrod 2.8.0
protected_title_format
Opis — z kodu źródłowego
Filters the text prepended to the post title for protected posts.
The filter is only applied on the front end.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$prepend | string | Text displayed before the post title. Default 'Protected: %s'. |
$post | \WP_Post | Current post object. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'protected_title_format', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'protected_title_format', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii