WordPress.org

Ready to get started?Download WordPress

Codex

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

Difference between revisions of "Plugin API/Filter Reference/private title format"

m (Created page with "== Description == <code>private_title_format</code> is a filter applied to the post title when the post visibility is set to private. == Parameters == {{Parameter|$format|stri…")
(No difference)

Revision as of 13:00, 12 April 2014

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