apply_filters( 'private_title_format', string $prepend, WP_Post $post )
- Since
- 2.8.0
Filters the text prepended to the post title of private posts.
Description
The filter is only applied on the front end.
Compatibility
- WordPress
- since 2.8.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$prependstring- Text displayed before the post title.
Default 'Private: %s'. $postWP_Post- Current post object.
Where this hook fires · 1
wp-includes/post-template.php:160get_the_title()
Source code
* @since 2.8.0 * * @param string $prepend Text displayed before the post title. * Default 'Private: %s'. * @param WP_Post $post Current post object. */ $private_title_format = apply_filters( 'private_title_format', $prepend, $post ); $post_title = sprintf( $private_title_format, $post_title ); } } /**Changelog
Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.