Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: protected_title_format

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
131                 *
132                 * The filter is only applied on the front end.
133                 *
134                 * @since 2.8.0
135                 *
136                 * @param string  $prepend Text displayed before the post title.
137                 *                         Default 'Protected: %s'.
138                 * @param WP_Post $post    Current post object.
139                 */
140                $protected_title_format = apply_filters( 'protected_title_format', $prepend, $post );
141                $title                  = sprintf( $protected_title_format, $title );
142           } elseif ( isset( $post->post_status ) && 'private' === $post->post_status ) {
143
144                /* translators: %s: Private post title. */
145                $prepend = __( 'Private: %s' );
146
147                /**
148                 * Filters the text prepended to the post title of private posts.
149                 *