protected_title_format filter-hook . WP 2.8.0
Filters the text prepended to the post title for protected posts.
The filter is only applied on the front end.
Usage
add_filter( 'protected_title_format', 'filter_function_name_4181', 10, 2 ); function filter_function_name_4181( $prepend, $post ){ // filter... return $prepend; }
- $prepend(string)
- Text displayed before the post title.
Default: 'Protected: %s' - $post(WP_Post)
- Current post object.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
wp-includes/post-template.php 140
$protected_title_format = apply_filters( 'protected_title_format', $prepend, $post );
Where in WP core the hook is used WordPress
wp-includes/post-template.php 1698
add_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );
wp-includes/post-template.php 1702
remove_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );
wp-includes/post-template.php 115
add_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );
wp-includes/post-template.php 117
remove_filter( 'protected_title_format', array( $this, 'protected_title_format' ) );