WordPress at Your Fingertips
function is not described

WP_REST_Posts_Controller::protected_title_format() protected WP 4.7.0

Overwrites the default protected title format.

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.

{} It's a method of the class: WP_REST_Posts_Controller{}

No Hooks.


String. Protected title format.


// protected - for code of main (parent) or child class
$result = $this->protected_title_format();


Since 4.7.0 Introduced.

Code of WP_REST_Posts_Controller::protected_title_format() WP 5.8

public function protected_title_format() {
	return '%s';