private_title_format WordPress Filter Hook

The private_title_format hook is a great way to change the way your private posts are displayed on your blog. This hook allows you to specify the format of the title for private posts, which can be useful if you want to make your private posts more visible to certain users or groups.

apply_filters( 'private_title_format', string $prepend, WP_Post $post ) #

Filters the text prepended to the post title of private posts.


Description

The filter is only applied on the front end.


Top ↑

Parameters

$prepend

(string)Text displayed before the post title. Default 'Private: %s'.

$post

(WP_Post)Current post object.


Top ↑

Source

File: wp-includes/post-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.