private_title_format filter-hookWP 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', 'wp_kama_private_title_format_filter', 10, 2 );

 * Function for `private_title_format` filter-hook.
 * @param string  $prepend Text displayed before the post title.
 * @param WP_Post $post    Current post object.
 * @return string
function wp_kama_private_title_format_filter( $prepend, $post ){

	// filter...
	return $prepend;
Text displayed before the post title.
Default: 'Private: %s'
Current post object.


Since 2.8.0 Introduced.

Where the hook is called

wp-includes/post-template.php 160
$private_title_format = apply_filters( 'private_title_format', $prepend, $post );

Where the hook is used in WordPress

Usage not found.