apply_filters( 'protected_title_format', string $prepend, WP_Post $post )

Filters the text prepended to the post title for protected posts.

Description Description

The filter is only applied on the front end.

Top ↑

Parameters Parameters


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


(WP_Post) Current post object.

Top ↑

Source Source

File: wp-includes/post-template.php

View on Trac

Top ↑

Changelog Changelog

Version Description
2.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by stevenlinx

    Example migrated from Codex:

    Remove protected prefix from post titles

    add_filter( 'protected_title_format', 'spi_remove_protected_protected_from_titles' );
    function spi_remove_protected_protected_from_titles( $format, $post ) {
        return '%s';

You must log in before being able to contribute a note or feedback.