WP_REST_Posts_Controller::protected_title_format

SummerySummery

Overwrites the default protected title format.

Syntax

WP_REST_Posts_Controller::protected_title_format()

DescriptionDescription

By default, WordPress will show password protected posts with a title of "Protected: %s", as the REST API communicates the protected status of a post in a machine readable format, we remove the "Protected: " prefix.

ReturnReturn

(string) Protected title format.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top