mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-08 14:44:37 +00:00
Docs: Add a comment about the $title global usage in various admin files.
This should make it clear that the variable is used as part of the HTML `<title>` tag on admin screens. Props ravipatel, hellofromTonya, sabernhardt, audrasjb, SergeyBiryukov. Fixes #53729. git-svn-id: https://develop.svn.wordpress.org/trunk@51475 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -138,7 +138,9 @@ enqueue_comment_hotkeys_js();
|
||||
if ( $post_id ) {
|
||||
$comments_count = wp_count_comments( $post_id );
|
||||
$draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' );
|
||||
|
||||
if ( $comments_count->moderated > 0 ) {
|
||||
// Used in the HTML title tag.
|
||||
$title = sprintf(
|
||||
/* translators: 1: Comments count, 2: Post title. */
|
||||
__( 'Comments (%1$s) on “%2$s”' ),
|
||||
@@ -146,6 +148,7 @@ if ( $post_id ) {
|
||||
$draft_or_post_title
|
||||
);
|
||||
} else {
|
||||
// Used in the HTML title tag.
|
||||
$title = sprintf(
|
||||
/* translators: %s: Post title. */
|
||||
__( 'Comments on “%s”' ),
|
||||
@@ -154,13 +157,16 @@ if ( $post_id ) {
|
||||
}
|
||||
} else {
|
||||
$comments_count = wp_count_comments();
|
||||
|
||||
if ( $comments_count->moderated > 0 ) {
|
||||
// Used in the HTML title tag.
|
||||
$title = sprintf(
|
||||
/* translators: %s: Comments count. */
|
||||
__( 'Comments (%s)' ),
|
||||
number_format_i18n( $comments_count->moderated )
|
||||
);
|
||||
} else {
|
||||
// Used in the HTML title tag.
|
||||
$title = __( 'Comments' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user