From 8a90b8691ff7a7cf511ec624c912aacb6dd2b30a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 22 Jul 2021 13:53:00 +0000 Subject: [PATCH] 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 `` tag on admin screens. Props ravipatel, hellofromTonya, sabernhardt, audrasjb, SergeyBiryukov. Fixes #53729. Built from https://develop.svn.wordpress.org/trunk@51475 git-svn-id: http://core.svn.wordpress.org/trunk@51086 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/about.php | 1 + wp-admin/admin.php | 3 ++- wp-admin/authorize-application.php | 1 + wp-admin/comment.php | 2 ++ wp-admin/credits.php | 1 + wp-admin/edit-comments.php | 6 ++++++ wp-admin/edit.php | 1 + wp-admin/export.php | 2 ++ wp-admin/freedoms.php | 1 + wp-admin/import.php | 1 + wp-admin/index.php | 1 + wp-admin/link-add.php | 1 + wp-admin/link-manager.php | 1 + wp-admin/link.php | 1 + wp-admin/media-new.php | 1 + wp-admin/media.php | 1 + wp-admin/ms-delete-site.php | 2 ++ wp-admin/my-sites.php | 1 + wp-admin/network.php | 2 ++ wp-admin/network/index.php | 1 + wp-admin/network/settings.php | 1 + wp-admin/network/site-info.php | 1 + wp-admin/network/site-new.php | 1 + wp-admin/network/site-settings.php | 1 + wp-admin/network/site-themes.php | 1 + wp-admin/network/site-users.php | 1 + wp-admin/network/sites.php | 1 + wp-admin/network/themes.php | 2 ++ wp-admin/network/upgrade.php | 1 + wp-admin/network/user-new.php | 1 + wp-admin/network/users.php | 12 ++++++++++++ wp-admin/options-discussion.php | 1 + wp-admin/options-general.php | 1 + wp-admin/options-media.php | 1 + wp-admin/options-permalink.php | 1 + wp-admin/options-reading.php | 1 + wp-admin/options-writing.php | 1 + wp-admin/options.php | 1 + wp-admin/plugin-editor.php | 1 + wp-admin/plugin-install.php | 1 + wp-admin/plugins.php | 2 ++ wp-admin/privacy.php | 1 + wp-admin/revision.php | 1 + wp-admin/theme-editor.php | 1 + wp-admin/theme-install.php | 1 + wp-admin/themes.php | 1 + wp-admin/tools.php | 1 + wp-admin/update-core.php | 2 ++ wp-admin/update.php | 10 ++++++++++ wp-admin/upload.php | 2 ++ wp-admin/user-edit.php | 2 ++ wp-admin/user-new.php | 1 + wp-admin/users.php | 6 ++++-- wp-admin/widgets.php | 1 + wp-includes/version.php | 2 +- 55 files changed, 93 insertions(+), 4 deletions(-) diff --git a/wp-admin/about.php b/wp-admin/about.php index 75d3635df9..5b65bd06d2 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -9,6 +9,7 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; +// Used in the HTML title tag. /* translators: Page title of the About WordPress page in the admin. */ $title = _x( 'About', 'page title' ); diff --git a/wp-admin/admin.php b/wp-admin/admin.php index 45849d6a17..d06890259e 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -334,9 +334,10 @@ if ( isset( $plugin_page ) ) { */ do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores + // Used in the HTML title tag. + $title = __( 'Import' ); $parent_file = 'tools.php'; $submenu_file = 'import.php'; - $title = __( 'Import' ); if ( ! isset( $_GET['noheader'] ) ) { require_once ABSPATH . 'wp-admin/admin-header.php'; diff --git a/wp-admin/authorize-application.php b/wp-admin/authorize-application.php index 0552aeadb2..1d56b47e7d 100644 --- a/wp-admin/authorize-application.php +++ b/wp-admin/authorize-application.php @@ -62,6 +62,7 @@ if ( isset( $_POST['action'] ) && 'authorize_application_password' === $_POST['a } } +// Used in the HTML title tag. $title = __( 'Authorize Application' ); $app_name = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : ''; diff --git a/wp-admin/comment.php b/wp-admin/comment.php index f2b3c32f3f..4c09a6085e 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -53,6 +53,7 @@ if ( isset( $_REQUEST['c'] ) ) { switch ( $action ) { case 'editcomment': + // Used in the HTML title tag. $title = __( 'Edit Comment' ); get_current_screen()->add_help_tab( @@ -96,6 +97,7 @@ switch ( $action ) { case 'approve': case 'trash': case 'spam': + // Used in the HTML title tag. $title = __( 'Moderate Comment' ); if ( ! $comment ) { diff --git a/wp-admin/credits.php b/wp-admin/credits.php index 460b722b76..65eb55792c 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -10,6 +10,7 @@ require_once __DIR__ . '/admin.php'; require_once __DIR__ . '/includes/credits.php'; +// Used in the HTML title tag. $title = __( 'Credits' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 38f2bdd80b..f54d0abd8f 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -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' ); } } diff --git a/wp-admin/edit.php b/wp-admin/edit.php index e05d3ce195..2b917b994d 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -232,6 +232,7 @@ if ( 'wp_block' === $post_type ) { wp_enqueue_style( 'wp-list-reusable-blocks' ); } +// Used in the HTML title tag. $title = $post_type_object->labels->name; if ( 'post' === $post_type ) { diff --git a/wp-admin/export.php b/wp-admin/export.php index 51acc7ed3c..df7e94541f 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -15,6 +15,8 @@ if ( ! current_user_can( 'export' ) ) { /** Load WordPress export API */ require_once ABSPATH . 'wp-admin/includes/export.php'; + +// Used in the HTML title tag. $title = __( 'Export' ); /** diff --git a/wp-admin/freedoms.php b/wp-admin/freedoms.php index be6fd6d65f..0a2d6ca241 100644 --- a/wp-admin/freedoms.php +++ b/wp-admin/freedoms.php @@ -15,6 +15,7 @@ if ( isset( $_GET['privacy-notice'] ) ) { exit; } +// Used in the HTML title tag. $title = __( 'Freedoms' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); diff --git a/wp-admin/import.php b/wp-admin/import.php index e732c55b8f..fe911f86c9 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -15,6 +15,7 @@ if ( ! current_user_can( 'import' ) ) { wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Import' ); get_current_screen()->add_help_tab( diff --git a/wp-admin/index.php b/wp-admin/index.php index 6c704cc2fe..4b4f149321 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -29,6 +29,7 @@ if ( wp_is_mobile() ) { wp_enqueue_script( 'jquery-touch-punch' ); } +// Used in the HTML title tag. $title = __( 'Dashboard' ); $parent_file = 'index.php'; diff --git a/wp-admin/link-add.php b/wp-admin/link-add.php index ab73d9b404..d8c98bb5c7 100644 --- a/wp-admin/link-add.php +++ b/wp-admin/link-add.php @@ -13,6 +13,7 @@ if ( ! current_user_can( 'manage_links' ) ) { wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Add New Link' ); $parent_file = 'link-manager.php'; diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index ff8dba12dc..47f0354776 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -46,6 +46,7 @@ if ( $doaction && isset( $_REQUEST['linkcheck'] ) ) { $wp_list_table->prepare_items(); +// Used in the HTML title tag. $title = __( 'Links' ); $this_file = 'link-manager.php'; $parent_file = $this_file; diff --git a/wp-admin/link.php b/wp-admin/link.php index 5494f9f15f..b978d87aab 100644 --- a/wp-admin/link.php +++ b/wp-admin/link.php @@ -108,6 +108,7 @@ switch ( $action ) { $parent_file = 'link-manager.php'; $submenu_file = 'link-manager.php'; + // Used in the HTML title tag. $title = __( 'Edit Link' ); $link_id = (int) $_GET['link_id']; diff --git a/wp-admin/media-new.php b/wp-admin/media-new.php index 97426512a4..94fa50ff3d 100644 --- a/wp-admin/media-new.php +++ b/wp-admin/media-new.php @@ -39,6 +39,7 @@ if ( $_POST ) { exit; } +// Used in the HTML title tag. $title = __( 'Upload New Media' ); $parent_file = 'upload.php'; diff --git a/wp-admin/media.php b/wp-admin/media.php index da63f27ea0..fe2e9a8617 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -45,6 +45,7 @@ switch ( $action ) { // No break. case 'edit': + // Used in the HTML title tag. $title = __( 'Edit Media' ); if ( empty( $errors ) ) { diff --git a/wp-admin/ms-delete-site.php b/wp-admin/ms-delete-site.php index c552f354f3..77246a4db7 100644 --- a/wp-admin/ms-delete-site.php +++ b/wp-admin/ms-delete-site.php @@ -35,8 +35,10 @@ if ( isset( $_GET['h'] ) && '' !== $_GET['h'] && false !== get_option( 'delete_b $blog = get_site(); $user = wp_get_current_user(); +// Used in the HTML title tag. $title = __( 'Delete Site' ); $parent_file = 'tools.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; echo '<div class="wrap">'; diff --git a/wp-admin/my-sites.php b/wp-admin/my-sites.php index 02b373d9a4..bd6dca670b 100644 --- a/wp-admin/my-sites.php +++ b/wp-admin/my-sites.php @@ -34,6 +34,7 @@ if ( 'updateblogsettings' === $action && isset( $_POST['primary_blog'] ) ) { } } +// Used in the HTML title tag. $title = __( 'My Sites' ); $parent_file = 'index.php'; diff --git a/wp-admin/network.php b/wp-admin/network.php index dd5ec30e0d..a358d0e980 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -49,9 +49,11 @@ if ( ! network_domain_check() && ( ! defined( 'WP_ALLOW_MULTISITE' ) || ! WP_ALL } if ( is_network_admin() ) { + // Used in the HTML title tag. $title = __( 'Network Setup' ); $parent_file = 'settings.php'; } else { + // Used in the HTML title tag. $title = __( 'Create a Network of WordPress Sites' ); $parent_file = 'tools.php'; } diff --git a/wp-admin/network/index.php b/wp-admin/network/index.php index 352744430b..29363780a4 100644 --- a/wp-admin/network/index.php +++ b/wp-admin/network/index.php @@ -17,6 +17,7 @@ if ( ! current_user_can( 'manage_network' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } +// Used in the HTML title tag. $title = __( 'Dashboard' ); $parent_file = 'index.php'; diff --git a/wp-admin/network/settings.php b/wp-admin/network/settings.php index edbac81b2e..fb19673e15 100644 --- a/wp-admin/network/settings.php +++ b/wp-admin/network/settings.php @@ -17,6 +17,7 @@ if ( ! current_user_can( 'manage_network_options' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } +// Used in the HTML title tag. $title = __( 'Network Settings' ); $parent_file = 'settings.php'; diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index 8f7f782445..b99f35ab20 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -122,6 +122,7 @@ if ( isset( $_GET['update'] ) ) { } } +// Used in the HTML title tag. /* translators: %s: Site title. */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); diff --git a/wp-admin/network/site-new.php b/wp-admin/network/site-new.php index 340e35c7bd..ff07c6ea9a 100644 --- a/wp-admin/network/site-new.php +++ b/wp-admin/network/site-new.php @@ -174,6 +174,7 @@ if ( isset( $_GET['update'] ) ) { } } +// Used in the HTML title tag. $title = __( 'Add New Site' ); $parent_file = 'sites.php'; diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php index ca1ed3fbd6..b669a5103f 100644 --- a/wp-admin/network/site-settings.php +++ b/wp-admin/network/site-settings.php @@ -79,6 +79,7 @@ if ( isset( $_GET['update'] ) ) { } } +// Used in the HTML title tag. /* translators: %s: Site title. */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index 14807b54f5..55d9961045 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -166,6 +166,7 @@ if ( isset( $_GET['action'] ) && 'update-site' === $_GET['action'] ) { add_thickbox(); add_screen_option( 'per_page' ); +// Used in the HTML title tag. /* translators: %s: Site title. */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); diff --git a/wp-admin/network/site-users.php b/wp-admin/network/site-users.php index b2d3f638af..54d8f5bd35 100644 --- a/wp-admin/network/site-users.php +++ b/wp-admin/network/site-users.php @@ -195,6 +195,7 @@ if ( isset( $_GET['action'] ) && 'update-site' === $_GET['action'] ) { add_screen_option( 'per_page' ); +// Used in the HTML title tag. /* translators: %s: Site title. */ $title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index bcbee04276..e51c60f814 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -17,6 +17,7 @@ if ( ! current_user_can( 'manage_sites' ) ) { $wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' ); $pagenum = $wp_list_table->get_pagenum(); +// Used in the HTML title tag. $title = __( 'Sites' ); $parent_file = 'sites.php'; diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index ddb6b867f4..09c15001f5 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -81,6 +81,7 @@ if ( $action ) { $themes = array(); } + // Used in the HTML title tag. $title = __( 'Update Themes' ); $parent_file = 'themes.php'; @@ -333,6 +334,7 @@ get_current_screen()->set_screen_reader_content( ) ); +// Used in the HTML title tag. $title = __( 'Themes' ); $parent_file = 'themes.php'; diff --git a/wp-admin/network/upgrade.php b/wp-admin/network/upgrade.php index 8b0194e6ce..12b88fbe92 100644 --- a/wp-admin/network/upgrade.php +++ b/wp-admin/network/upgrade.php @@ -12,6 +12,7 @@ require_once __DIR__ . '/admin.php'; require_once ABSPATH . WPINC . '/http.php'; +// Used in the HTML title tag. $title = __( 'Upgrade Network' ); $parent_file = 'upgrade.php'; diff --git a/wp-admin/network/user-new.php b/wp-admin/network/user-new.php index 191e9bdda1..c881dff2ac 100644 --- a/wp-admin/network/user-new.php +++ b/wp-admin/network/user-new.php @@ -98,6 +98,7 @@ if ( isset( $_GET['update'] ) ) { } } +// Used in the HTML title tag. $title = __( 'Add New User' ); $parent_file = 'users.php'; diff --git a/wp-admin/network/users.php b/wp-admin/network/users.php index 915b0d0958..fd79a33bca 100644 --- a/wp-admin/network/users.php +++ b/wp-admin/network/users.php @@ -29,12 +29,17 @@ if ( isset( $_GET['action'] ) ) { $id = (int) $_GET['id']; if ( $id > 1 ) { $_POST['allusers'] = array( $id ); // confirm_delete_users() can only handle arrays. + + // Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; + echo '<div class="wrap">'; confirm_delete_users( $_POST['allusers'] ); echo '</div>'; + require_once ABSPATH . 'wp-admin/admin-footer.php'; } else { wp_redirect( network_admin_url( 'users.php' ) ); @@ -59,12 +64,17 @@ if ( isset( $_GET['action'] ) ) { if ( ! current_user_can( 'delete_users' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 ); } + + // Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; + echo '<div class="wrap">'; confirm_delete_users( $_POST['allusers'] ); echo '</div>'; + require_once ABSPATH . 'wp-admin/admin-footer.php'; exit; @@ -206,6 +216,8 @@ if ( $pagenum > $total_pages && $total_pages > 0 ) { wp_redirect( add_query_arg( 'paged', $total_pages ) ); exit; } + +// Used in the HTML title tag. $title = __( 'Users' ); $parent_file = 'users.php'; diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index dbe37e720b..0ee931c9b0 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -12,6 +12,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Discussion Settings' ); $parent_file = 'options-general.php'; diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index aad04ced9b..dfc396f8d2 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -16,6 +16,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'General Settings' ); $parent_file = 'options-general.php'; /* translators: Date and time format for exact current time, mainly about timezones, see https://www.php.net/manual/datetime.format.php */ diff --git a/wp-admin/options-media.php b/wp-admin/options-media.php index 89e0baa67c..79f4389e88 100644 --- a/wp-admin/options-media.php +++ b/wp-admin/options-media.php @@ -13,6 +13,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Media Settings' ); $parent_file = 'options-general.php'; diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 52ee89c252..4275a4a2c6 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -13,6 +13,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Permalink Settings' ); $parent_file = 'options-general.php'; diff --git a/wp-admin/options-reading.php b/wp-admin/options-reading.php index 2ec5ea1a21..250000a3d7 100644 --- a/wp-admin/options-reading.php +++ b/wp-admin/options-reading.php @@ -13,6 +13,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Reading Settings' ); $parent_file = 'options-general.php'; diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index 5944124bce..e33c1df4f9 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -13,6 +13,7 @@ if ( ! current_user_can( 'manage_options' ) ) { wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Writing Settings' ); $parent_file = 'options-general.php'; diff --git a/wp-admin/options.php b/wp-admin/options.php index 049f15804a..019f9529c4 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -18,6 +18,7 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; +// Used in the HTML title tag. $title = __( 'Settings' ); $this_file = 'options.php'; $parent_file = 'options-general.php'; diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index f333b34882..36dce7795d 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -18,6 +18,7 @@ if ( ! current_user_can( 'edit_plugins' ) ) { wp_die( __( 'Sorry, you are not allowed to edit plugins for this site.' ) ); } +// Used in the HTML title tag. $title = __( 'Edit Plugins' ); $parent_file = 'plugins.php'; diff --git a/wp-admin/plugin-install.php b/wp-admin/plugin-install.php index 9c39d97ddb..0e01c44161 100644 --- a/wp-admin/plugin-install.php +++ b/wp-admin/plugin-install.php @@ -47,6 +47,7 @@ if ( $pagenum > $total_pages && $total_pages > 0 ) { exit; } +// Used in the HTML title tag. $title = __( 'Add Plugins' ); $parent_file = 'plugins.php'; diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 70abe322ed..373e1f8ad7 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -153,6 +153,7 @@ if ( $action ) { $plugins = array(); } + // Used in the HTML title tag. $title = __( 'Update Plugins' ); $parent_file = 'plugins.php'; @@ -597,6 +598,7 @@ get_current_screen()->set_screen_reader_content( ) ); +// Used in the HTML title tag. $title = __( 'Plugins' ); $parent_file = 'plugins.php'; diff --git a/wp-admin/privacy.php b/wp-admin/privacy.php index c377389ead..0eda132a9f 100644 --- a/wp-admin/privacy.php +++ b/wp-admin/privacy.php @@ -9,6 +9,7 @@ /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; +// Used in the HTML title tag. $title = __( 'Privacy' ); list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); diff --git a/wp-admin/revision.php b/wp-admin/revision.php index b77c7606b9..e63600b22c 100644 --- a/wp-admin/revision.php +++ b/wp-admin/revision.php @@ -108,6 +108,7 @@ switch ( $action ) { /* translators: %s: Post title. */ $h1 = sprintf( __( 'Compare Revisions of “%s”' ), $post_title ); $return_to_post = '<a href="' . $post_edit_link . '">' . __( '← Go to editor' ) . '</a>'; + // Used in the HTML title tag. $title = __( 'Revisions' ); $redirect = false; diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 18357c046a..572a2d82c4 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -18,6 +18,7 @@ if ( ! current_user_can( 'edit_themes' ) ) { wp_die( '<p>' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '</p>' ); } +// Used in the HTML title tag. $title = __( 'Edit Themes' ); $parent_file = 'themes.php'; diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 4d377d831a..4f0ba2ad66 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -21,6 +21,7 @@ if ( is_multisite() && ! is_network_admin() ) { exit; } +// Used in the HTML title tag. $title = __( 'Add Themes' ); $parent_file = 'themes.php'; diff --git a/wp-admin/themes.php b/wp-admin/themes.php index 2a230ee504..87b1b6db7a 100644 --- a/wp-admin/themes.php +++ b/wp-admin/themes.php @@ -123,6 +123,7 @@ if ( current_user_can( 'switch_themes' ) && isset( $_GET['action'] ) ) { } } +// Used in the HTML title tag. $title = __( 'Manage Themes' ); $parent_file = 'themes.php'; diff --git a/wp-admin/tools.php b/wp-admin/tools.php index d2c2061a0b..8095e4726b 100644 --- a/wp-admin/tools.php +++ b/wp-admin/tools.php @@ -39,6 +39,7 @@ if ( isset( $_GET['wp-privacy-policy-guide'] ) ) { /** WordPress Administration Bootstrap */ require_once __DIR__ . '/admin.php'; +// Used in the HTML title tag. $title = __( 'Tools' ); get_current_screen()->add_help_tab( diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index ae3924c9b2..6e23d66866 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -1136,6 +1136,7 @@ if ( 'upgrade-core' === $action ) { $url = 'update.php?action=update-selected&plugins=' . urlencode( implode( ',', $plugins ) ); $url = wp_nonce_url( $url, 'bulk-update-plugins' ); + // Used in the HTML title tag. $title = __( 'Update Plugins' ); require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -1176,6 +1177,7 @@ if ( 'upgrade-core' === $action ) { $url = 'update.php?action=update-selected-themes&themes=' . urlencode( implode( ',', $themes ) ); $url = wp_nonce_url( $url, 'bulk-update-themes' ); + // Used in the HTML title tag. $title = __( 'Update Themes' ); require_once ABSPATH . 'wp-admin/admin-header.php'; diff --git a/wp-admin/update.php b/wp-admin/update.php index 7980ea7a8b..a4a2abf8db 100644 --- a/wp-admin/update.php +++ b/wp-admin/update.php @@ -59,6 +59,7 @@ if ( isset( $_GET['action'] ) ) { check_admin_referer( 'upgrade-plugin_' . $plugin ); + // Used in the HTML title tag. $title = __( 'Update Plugin' ); $parent_file = 'plugins.php'; $submenu_file = 'plugins.php'; @@ -123,9 +124,11 @@ if ( isset( $_GET['action'] ) ) { wp_die( $api ); } + // Used in the HTML title tag. $title = __( 'Plugin Installation' ); $parent_file = 'plugins.php'; $submenu_file = 'plugin-install.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: Plugin name and version. */ @@ -153,9 +156,11 @@ if ( isset( $_GET['action'] ) ) { $file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' ); + // Used in the HTML title tag. $title = __( 'Upload Plugin' ); $parent_file = 'plugins.php'; $submenu_file = 'plugin-install.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: File name. */ @@ -206,9 +211,11 @@ if ( isset( $_GET['action'] ) ) { wp_enqueue_script( 'updates' ); + // Used in the HTML title tag. $title = __( 'Update Theme' ); $parent_file = 'themes.php'; $submenu_file = 'themes.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; $nonce = 'upgrade-theme_' . $theme; @@ -269,9 +276,11 @@ if ( isset( $_GET['action'] ) ) { wp_die( $api ); } + // Used in the HTML title tag. $title = __( 'Install Themes' ); $parent_file = 'themes.php'; $submenu_file = 'themes.php'; + require_once ABSPATH . 'wp-admin/admin-header.php'; /* translators: %s: Theme name and version. */ @@ -295,6 +304,7 @@ if ( isset( $_GET['action'] ) ) { $file_upload = new File_Upload_Upgrader( 'themezip', 'package' ); + // Used in the HTML title tag. $title = __( 'Upload Theme' ); $parent_file = 'themes.php'; $submenu_file = 'theme-install.php'; diff --git a/wp-admin/upload.php b/wp-admin/upload.php index d1de3561ca..fe7c9fdf21 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -76,6 +76,7 @@ if ( 'grid' === $mode ) { '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' ); + // Used in the HTML title tag. $title = __( 'Media Library' ); $parent_file = 'upload.php'; @@ -215,6 +216,7 @@ if ( $doaction ) { $wp_list_table->prepare_items(); +// Used in the HTML title tag. $title = __( 'Media Library' ); $parent_file = 'upload.php'; diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 4e8f2520cc..0cd381caf2 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -32,8 +32,10 @@ if ( wp_is_application_passwords_available_for_user( $user_id ) ) { } if ( IS_PROFILE_PAGE ) { + // Used in the HTML title tag. $title = __( 'Profile' ); } else { + // Used in the HTML title tag. /* translators: %s: User's display name. */ $title = __( 'Edit User %s' ); } diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index 76195c3f63..26da6a0ec4 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -245,6 +245,7 @@ Please click the following link to confirm the invite: } } +// Used in the HTML title tag. $title = __( 'Add New User' ); $parent_file = 'users.php'; diff --git a/wp-admin/users.php b/wp-admin/users.php index 133015be3b..c3450dfd4b 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -20,8 +20,10 @@ if ( ! current_user_can( 'list_users' ) ) { $wp_list_table = _get_list_table( 'WP_Users_List_Table' ); $pagenum = $wp_list_table->get_pagenum(); -$title = __( 'Users' ); -$parent_file = 'users.php'; + +// Used in the HTML title tag. +$title = __( 'Users' ); +$parent_file = 'users.php'; add_screen_option( 'per_page' ); diff --git a/wp-admin/widgets.php b/wp-admin/widgets.php index 88a58f59ba..100c62eb93 100644 --- a/wp-admin/widgets.php +++ b/wp-admin/widgets.php @@ -24,6 +24,7 @@ if ( ! current_theme_supports( 'widgets' ) ) { wp_die( __( 'The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please <a href="https://developer.wordpress.org/themes/functionality/widgets/">follow these instructions</a>.' ) ); } +// Used in the HTML title tag. $title = __( 'Widgets' ); $parent_file = 'themes.php'; diff --git a/wp-includes/version.php b/wp-includes/version.php index c5a2d5740e..254c43a08a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51474'; +$wp_version = '5.9-alpha-51475'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.