Make WordPress Core


Ignore:
Timestamp:
07/22/2021 01:51:58 PM (23 months 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/network/users.php

    r51189 r51475  
    3030            if ( $id > 1 ) {
    3131                $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays.
     32
     33                // Used in the HTML title tag.
    3234                $title             = __( 'Users' );
    3335                $parent_file       = 'users.php';
     36
    3437                require_once ABSPATH . 'wp-admin/admin-header.php';
     38
    3539                echo '<div class="wrap">';
    3640                confirm_delete_users( $_POST['allusers'] );
    3741                echo '</div>';
     42
    3843                require_once ABSPATH . 'wp-admin/admin-footer.php';
    3944            } else {
     
    6065                                    wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    6166                                }
     67
     68                                // Used in the HTML title tag.
    6269                                $title       = __( 'Users' );
    6370                                $parent_file = 'users.php';
     71
    6472                                require_once ABSPATH . 'wp-admin/admin-header.php';
     73
    6574                                echo '<div class="wrap">';
    6675                                confirm_delete_users( $_POST['allusers'] );
    6776                                echo '</div>';
     77
    6878                                require_once ABSPATH . 'wp-admin/admin-footer.php';
    6979                                exit;
     
    207217    exit;
    208218}
     219
     220// Used in the HTML title tag.
    209221$title       = __( 'Users' );
    210222$parent_file = 'users.php';
Note: See TracChangeset for help on using the changeset viewer.