wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



_wp_privacy_settings_filter_draft_page_titles › WordPress Function

Da4.9.8
Deprecaton/a
_wp_privacy_settings_filter_draft_page_titles ( $title, $page )
Accedi:
  • private
Parametri: (2)
  • (string) $title Page title.
    Richiesto:
  • (WP_Post) $page Page data object.
    Richiesto:
Ritorna:
  • (string) Page title.
Definito a:
Codex:

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



Sorgenti

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;
}