WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/private title format

Description

private_title_format is a filter applied to the post title when the post visibility is set to private.

Parameters

$format
(string) (') The string to output
Default:

Default: 'Private:%s'

Examples

/* Removing private prefix from post titles */ 

 
function spi_remove_private_protected_from_titles( $format ) {
	return '%s';
}
add_filter( 'private_title_format',   'spi_remove_private_protected_from_titles' );

here %s is the post title