wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_wp_privacy_settings_filter_draft_page_titles › WordPress Function

Seit4.9.8
Veraltetn/v
_wp_privacy_settings_filter_draft_page_titles ( $title, $page )
Zugriff:
  • private
Parameter: (2)
  • (string) $title Page title.
    Erforderlich: Ja
  • (WP_Post) $page Page data object.
    Erforderlich: Ja
Gibt zurück:
  • (string) Page title.
Definiert in:
Codex:

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



Quellcode

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