WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/22/2021 01:51:58 PM (4 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/update.php

    r48417 r51475  
    6060        check_admin_referer( 'upgrade-plugin_' . $plugin );
    6161
     62        // Used in the HTML title tag.
    6263        $title        = __( 'Update Plugin' );
    6364        $parent_file  = 'plugins.php';
     
    124125        }
    125126
     127        // Used in the HTML title tag.
    126128        $title        = __( 'Plugin Installation' );
    127129        $parent_file  = 'plugins.php';
    128130        $submenu_file = 'plugin-install.php';
     131
    129132        require_once ABSPATH . 'wp-admin/admin-header.php';
    130133
     
    154157        $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' );
    155158
     159        // Used in the HTML title tag.
    156160        $title        = __( 'Upload Plugin' );
    157161        $parent_file  = 'plugins.php';
    158162        $submenu_file = 'plugin-install.php';
     163
    159164        require_once ABSPATH . 'wp-admin/admin-header.php';
    160165
     
    207212        wp_enqueue_script( 'updates' );
    208213
     214        // Used in the HTML title tag.
    209215        $title        = __( 'Update Theme' );
    210216        $parent_file  = 'themes.php';
    211217        $submenu_file = 'themes.php';
     218
    212219        require_once ABSPATH . 'wp-admin/admin-header.php';
    213220
     
    270277        }
    271278
     279        // Used in the HTML title tag.
    272280        $title        = __( 'Install Themes' );
    273281        $parent_file  = 'themes.php';
    274282        $submenu_file = 'themes.php';
     283
    275284        require_once ABSPATH . 'wp-admin/admin-header.php';
    276285
     
    296305        $file_upload = new File_Upload_Upgrader( 'themezip', 'package' );
    297306
     307        // Used in the HTML title tag.
    298308        $title        = __( 'Upload Theme' );
    299309        $parent_file  = 'themes.php';
Note: See TracChangeset for help on using the changeset viewer.