wpseek.com
WordPress开发者和主题制作者的搜索引擎



_wp_privacy_settings_filter_draft_page_titles › WordPress Function

Since4.9.8
已弃用n/a
_wp_privacy_settings_filter_draft_page_titles ( $title, $page )
访问:
  • private
参数: (2)
  • (string) $title Page title.
    Required: Yes
  • (WP_Post) $page Page data object.
    Required: Yes
返回:
  • (string) Page title.
定义在:
文档:

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



源码

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