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

You appear to be a bot. Output may be restricted

Description

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

Usage

$string = _wp_privacy_settings_filter_draft_page_titles( $title, $page );

Parameters

$title
( string ) required – Page title.
$page
( WP_Post ) required – Page data object.

Returns

string Page title.

Source

File name: wordpress/wp-admin/includes/misc.php
Lines:

1 to 8 of 8
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;
}
 

 View on GitHub View on Trac