private_title_format хук-фильтр . WP 2.8.0
Filters the text prepended to the post title of private posts.
The filter is only applied on the front end.
Использование
add_filter( 'private_title_format', 'filter_function_name_2533', 10, 2 ); function filter_function_name_2533( $prepend, $post ){ // filter... return $prepend; }
- $prepend(строка)
- Text displayed before the post title.
По умолчанию: 'Private: %s' - $post(WP_Post)
- Current post object.
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
wp-includes/post-template.php 158
$private_title_format = apply_filters( 'private_title_format', $prepend, $post );