WP_REST_Posts_Controller::protected_title_format
Overwrites the default protected and private title format.
By default, WordPress will show password protected or private posts with a title of "Protected: %s" or "Private: %s", as the REST API communicates the status of a post in a machine-readable format, we remove the prefix.
Method of the class: WP_REST_Posts_Controller{}
No Hooks.
Returns
String. Title format.
Usage
$WP_REST_Posts_Controller = new WP_REST_Posts_Controller(); $WP_REST_Posts_Controller->protected_title_format();
Changelog
| Since 4.7.0 | Introduced. |
WP_REST_Posts_Controller::protected_title_format() WP REST Posts Controller::protected title format code WP 7.0
public function protected_title_format() {
return '%s';
}