Make WordPress Core


Ignore:
Timestamp:
07/22/2021 01:51:58 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-comments.php

    r50999 r51475  
    139139    $comments_count      = wp_count_comments( $post_id );
    140140    $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' );
     141
    141142    if ( $comments_count->moderated > 0 ) {
     143        // Used in the HTML title tag.
    142144        $title = sprintf(
    143145            /* translators: 1: Comments count, 2: Post title. */
     
    147149        );
    148150    } else {
     151        // Used in the HTML title tag.
    149152        $title = sprintf(
    150153            /* translators: %s: Post title. */
     
    155158} else {
    156159    $comments_count = wp_count_comments();
     160
    157161    if ( $comments_count->moderated > 0 ) {
     162        // Used in the HTML title tag.
    158163        $title = sprintf(
    159164            /* translators: %s: Comments count. */
     
    162167        );
    163168    } else {
     169        // Used in the HTML title tag.
    164170        $title = __( 'Comments' );
    165171    }
Note: See TracChangeset for help on using the changeset viewer.