W3cubDocs

/WordPress

_wp_privacy_settings_filter_draft_page_titles( string $title, WP_Post $page )

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Appends ‘(Draft)’ to draft page titles in the privacy page dropdown so that unpublished content is obvious.

Description

Parameters

$title

(string) (Required) Page title.

$page

(WP_Post) (Required) Page data object.

Return

(string) Page title.

Source

File: wp-admin/includes/misc.php

function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) {
	if ( 'draft' === $page->post_status && 'privacy' === get_current_screen()->id ) {
		/* translators: %s: Page Title */
		$title = sprintf( __( '%s (Draft)' ), $title );
	}

	return $title;
}

Changelog

Version Description
4.9.8 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_wp_privacy_settings_filter_draft_page_titles