Make WordPress Core


Ignore:
Timestamp:
06/19/2018 12:11:46 PM (6 years ago)
Author:
azaozz
Message:

Privacy: append (Draft) to draft page titles in the page drop-down on the Privacy Settings screen.

Props allendav, desrosj.
Fixes #44100.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r43367 r43376  
    12731273
    12741274/**
     1275 * Appends '(Draft)' to draft page titles in the privacy page dropdown
     1276 * so that unpublished content is obvious.
     1277 *
     1278 * @since 4.9.7
     1279 * @access private
     1280 *
     1281 * @param string  $title Page title.
     1282 * @param WP_Post $page  Page data object.
     1283 *
     1284 * @return string Page title.
     1285 */
     1286function _wp_privacy_settings_filter_draft_page_titles( $title, $page ) {
     1287    if ( 'draft' === $page->post_status && 'privacy' === get_current_screen()->id ) {
     1288        /* translators: %s: Page Title */
     1289        $title = sprintf( __( '%s (Draft)' ), $title );
     1290    }
     1291
     1292    return $title;
     1293}
     1294
     1295/**
    12751296 * WP_Privacy_Policy_Content class.
    12761297 * TODO: move this to a new file.
Note: See TracChangeset for help on using the changeset viewer.