Make WordPress Core

Ticket #53729: 53729.3.diff

File 53729.3.diff, 26.3 KB (added by SergeyBiryukov, 5 years ago)
  • src/wp-admin/_index.php

     
    2929        wp_enqueue_script( 'jquery-touch-punch' );
    3030}
    3131
     32// Used in the HTML title tag.
    3233$title       = __( 'Dashboard' );
    3334$parent_file = 'index.php';
    3435
  • src/wp-admin/about.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once __DIR__ . '/admin.php';
    1111
     12// Used in the HTML title tag.
    1213/* translators: Page title of the About WordPress page in the admin. */
    1314$title = _x( 'About', 'page title' );
    1415
  • src/wp-admin/admin.php

     
    334334         */
    335335        do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    336336
     337        // Used in the HTML title tag.
     338        $title        = __( 'Import' );
    337339        $parent_file  = 'tools.php';
    338340        $submenu_file = 'import.php';
    339         $title        = __( 'Import' );
    340341
    341342        if ( ! isset( $_GET['noheader'] ) ) {
    342343                require_once ABSPATH . 'wp-admin/admin-header.php';
  • src/wp-admin/authorize-application.php

     
    6262        }
    6363}
    6464
     65// Used in the HTML title tag.
    6566$title = __( 'Authorize Application' );
    6667
    6768$app_name    = ! empty( $_REQUEST['app_name'] ) ? $_REQUEST['app_name'] : '';
  • src/wp-admin/comment.php

     
    5353switch ( $action ) {
    5454
    5555        case 'editcomment':
     56                // Used in the HTML title tag.
    5657                $title = __( 'Edit Comment' );
    5758
    5859                get_current_screen()->add_help_tab(
     
    9697        case 'approve':
    9798        case 'trash':
    9899        case 'spam':
     100                // Used in the HTML title tag.
    99101                $title = __( 'Moderate Comment' );
    100102
    101103                if ( ! $comment ) {
  • src/wp-admin/credits.php

     
    1010require_once __DIR__ . '/admin.php';
    1111require_once __DIR__ . '/includes/credits.php';
    1212
     13// Used in the HTML title tag.
    1314$title = __( 'Credits' );
    1415
    1516list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
  • src/wp-admin/edit-comments.php

     
    138138if ( $post_id ) {
    139139        $comments_count      = wp_count_comments( $post_id );
    140140        $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' );
     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. */
    144146                        __( 'Comments (%1$s) on “%2$s”' ),
     
    146148                        $draft_or_post_title
    147149                );
    148150        } else {
     151                // Used in the HTML title tag.
    149152                $title = sprintf(
    150153                        /* translators: %s: Post title. */
    151154                        __( 'Comments on “%s”' ),
     
    154157        }
    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. */
    160165                        __( 'Comments (%s)' ),
     
    161166                        number_format_i18n( $comments_count->moderated )
    162167                );
    163168        } else {
     169                // Used in the HTML title tag.
    164170                $title = __( 'Comments' );
    165171        }
    166172}
  • src/wp-admin/edit.php

     
    232232        wp_enqueue_style( 'wp-list-reusable-blocks' );
    233233}
    234234
     235// Used in the HTML title tag.
    235236$title = $post_type_object->labels->name;
    236237
    237238if ( 'post' === $post_type ) {
  • src/wp-admin/export.php

     
    1515
    1616/** Load WordPress export API */
    1717require_once ABSPATH . 'wp-admin/includes/export.php';
     18
     19// Used in the HTML title tag.
    1820$title = __( 'Export' );
    1921
    2022/**
  • src/wp-admin/freedoms.php

     
    1515        exit;
    1616}
    1717
     18// Used in the HTML title tag.
    1819$title = __( 'Freedoms' );
    1920
    2021list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
  • src/wp-admin/import.php

     
    1515        wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) );
    1616}
    1717
     18// Used in the HTML title tag.
    1819$title = __( 'Import' );
    1920
    2021get_current_screen()->add_help_tab(
  • src/wp-admin/link-add.php

     
    1313        wp_die( __( 'Sorry, you are not allowed to add links to this site.' ) );
    1414}
    1515
     16// Used in the HTML title tag.
    1617$title       = __( 'Add New Link' );
    1718$parent_file = 'link-manager.php';
    1819
  • src/wp-admin/link-manager.php

     
    4646
    4747$wp_list_table->prepare_items();
    4848
     49// Used in the HTML title tag.
    4950$title       = __( 'Links' );
    5051$this_file   = 'link-manager.php';
    5152$parent_file = $this_file;
  • src/wp-admin/link.php

     
    108108
    109109                $parent_file  = 'link-manager.php';
    110110                $submenu_file = 'link-manager.php';
     111                // Used in the HTML title tag.
    111112                $title        = __( 'Edit Link' );
    112113
    113114                $link_id = (int) $_GET['link_id'];
  • src/wp-admin/media-new.php

     
    3939        exit;
    4040}
    4141
     42// Used in the HTML title tag.
    4243$title       = __( 'Upload New Media' );
    4344$parent_file = 'upload.php';
    4445
  • src/wp-admin/media.php

     
    4545
    4646                // No break.
    4747        case 'edit':
     48                // Used in the HTML title tag.
    4849                $title = __( 'Edit Media' );
    4950
    5051                if ( empty( $errors ) ) {
  • src/wp-admin/ms-delete-site.php

     
    3535$blog = get_site();
    3636$user = wp_get_current_user();
    3737
     38// Used in the HTML title tag.
    3839$title       = __( 'Delete Site' );
    3940$parent_file = 'tools.php';
     41
    4042require_once ABSPATH . 'wp-admin/admin-header.php';
    4143
    4244echo '<div class="wrap">';
  • src/wp-admin/my-sites.php

     
    3434        }
    3535}
    3636
     37// Used in the HTML title tag.
    3738$title       = __( 'My Sites' );
    3839$parent_file = 'index.php';
    3940
  • src/wp-admin/network.php

     
    4949}
    5050
    5151if ( is_network_admin() ) {
     52        // Used in the HTML title tag.
    5253        $title       = __( 'Network Setup' );
    5354        $parent_file = 'settings.php';
    5455} else {
     56        // Used in the HTML title tag.
    5557        $title       = __( 'Create a Network of WordPress Sites' );
    5658        $parent_file = 'tools.php';
    5759}
  • src/wp-admin/network/index.php

     
    1717        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    1818}
    1919
     20// Used in the HTML title tag.
    2021$title       = __( 'Dashboard' );
    2122$parent_file = 'index.php';
    2223
  • src/wp-admin/network/settings.php

     
    1717        wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    1818}
    1919
     20// Used in the HTML title tag.
    2021$title       = __( 'Network Settings' );
    2122$parent_file = 'settings.php';
    2223
  • src/wp-admin/network/site-info.php

     
    122122        }
    123123}
    124124
     125// Used in the HTML title tag.
    125126/* translators: %s: Site title. */
    126127$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
    127128
  • src/wp-admin/network/site-new.php

     
    174174        }
    175175}
    176176
     177// Used in the HTML title tag.
    177178$title       = __( 'Add New Site' );
    178179$parent_file = 'sites.php';
    179180
  • src/wp-admin/network/site-settings.php

     
    7979        }
    8080}
    8181
     82// Used in the HTML title tag.
    8283/* translators: %s: Site title. */
    8384$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
    8485
  • src/wp-admin/network/site-themes.php

     
    166166add_thickbox();
    167167add_screen_option( 'per_page' );
    168168
     169// Used in the HTML title tag.
    169170/* translators: %s: Site title. */
    170171$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
    171172
  • src/wp-admin/network/site-users.php

     
    195195
    196196add_screen_option( 'per_page' );
    197197
     198// Used in the HTML title tag.
    198199/* translators: %s: Site title. */
    199200$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) );
    200201
  • src/wp-admin/network/sites.php

     
    1717$wp_list_table = _get_list_table( 'WP_MS_Sites_List_Table' );
    1818$pagenum       = $wp_list_table->get_pagenum();
    1919
     20// Used in the HTML title tag.
    2021$title       = __( 'Sites' );
    2122$parent_file = 'sites.php';
    2223
  • src/wp-admin/network/themes.php

     
    8181                                $themes = array();
    8282                        }
    8383
     84                        // Used in the HTML title tag.
    8485                        $title       = __( 'Update Themes' );
    8586                        $parent_file = 'themes.php';
    8687
     
    333334        )
    334335);
    335336
     337// Used in the HTML title tag.
    336338$title       = __( 'Themes' );
    337339$parent_file = 'themes.php';
    338340
  • src/wp-admin/network/upgrade.php

     
    1212
    1313require_once ABSPATH . WPINC . '/http.php';
    1414
     15// Used in the HTML title tag.
    1516$title       = __( 'Upgrade Network' );
    1617$parent_file = 'upgrade.php';
    1718
  • src/wp-admin/network/user-new.php

     
    9898        }
    9999}
    100100
     101// Used in the HTML title tag.
    101102$title       = __( 'Add New User' );
    102103$parent_file = 'users.php';
    103104
  • src/wp-admin/network/users.php

     
    2929                        $id = (int) $_GET['id'];
    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 {
    4045                                wp_redirect( network_admin_url( 'users.php' ) );
     
    5964                                                                if ( ! current_user_can( 'delete_users' ) ) {
    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;
    7080
     
    206216        wp_redirect( add_query_arg( 'paged', $total_pages ) );
    207217        exit;
    208218}
     219
     220// Used in the HTML title tag.
    209221$title       = __( 'Users' );
    210222$parent_file = 'users.php';
    211223
  • src/wp-admin/options-discussion.php

     
    1212        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1313}
    1414
     15// Used in the HTML title tag.
    1516$title       = __( 'Discussion Settings' );
    1617$parent_file = 'options-general.php';
    1718
  • src/wp-admin/options-general.php

     
    1616        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1717}
    1818
     19// Used in the HTML title tag.
    1920$title       = __( 'General Settings' );
    2021$parent_file = 'options-general.php';
    2122/* translators: Date and time format for exact current time, mainly about timezones, see https://www.php.net/manual/datetime.format.php */
  • src/wp-admin/options-media.php

     
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414}
    1515
     16// Used in the HTML title tag.
    1617$title       = __( 'Media Settings' );
    1718$parent_file = 'options-general.php';
    1819
  • src/wp-admin/options-permalink.php

     
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414}
    1515
     16// Used in the HTML title tag.
    1617$title       = __( 'Permalink Settings' );
    1718$parent_file = 'options-general.php';
    1819
  • src/wp-admin/options-reading.php

     
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414}
    1515
     16// Used in the HTML title tag.
    1617$title       = __( 'Reading Settings' );
    1718$parent_file = 'options-general.php';
    1819
  • src/wp-admin/options-writing.php

     
    1313        wp_die( __( 'Sorry, you are not allowed to manage options for this site.' ) );
    1414}
    1515
     16// Used in the HTML title tag.
    1617$title       = __( 'Writing Settings' );
    1718$parent_file = 'options-general.php';
    1819
  • src/wp-admin/options.php

     
    1818/** WordPress Administration Bootstrap */
    1919require_once __DIR__ . '/admin.php';
    2020
     21// Used in the HTML title tag.
    2122$title       = __( 'Settings' );
    2223$this_file   = 'options.php';
    2324$parent_file = 'options-general.php';
  • src/wp-admin/plugin-editor.php

     
    1818        wp_die( __( 'Sorry, you are not allowed to edit plugins for this site.' ) );
    1919}
    2020
     21// Used in the HTML title tag.
    2122$title       = __( 'Edit Plugins' );
    2223$parent_file = 'plugins.php';
    2324
  • src/wp-admin/plugin-install.php

     
    4747        exit;
    4848}
    4949
     50// Used in the HTML title tag.
    5051$title       = __( 'Add Plugins' );
    5152$parent_file = 'plugins.php';
    5253
  • src/wp-admin/plugins.php

     
    153153                                $plugins = array();
    154154                        }
    155155
     156                        // Used in the HTML title tag.
    156157                        $title       = __( 'Update Plugins' );
    157158                        $parent_file = 'plugins.php';
    158159
     
    597598        )
    598599);
    599600
     601// Used in the HTML title tag.
    600602$title       = __( 'Plugins' );
    601603$parent_file = 'plugins.php';
    602604
  • src/wp-admin/privacy.php

     
    99/** WordPress Administration Bootstrap */
    1010require_once __DIR__ . '/admin.php';
    1111
     12// Used in the HTML title tag.
    1213$title = __( 'Privacy' );
    1314
    1415list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
  • src/wp-admin/revision.php

     
    108108                /* translators: %s: Post title. */
    109109                $h1             = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $post_title );
    110110                $return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Go to editor' ) . '</a>';
     111                // Used in the HTML title tag.
    111112                $title          = __( 'Revisions' );
    112113
    113114                $redirect = false;
  • src/wp-admin/theme-editor.php

     
    1818        wp_die( '<p>' . __( 'Sorry, you are not allowed to edit templates for this site.' ) . '</p>' );
    1919}
    2020
     21// Used in the HTML title tag.
    2122$title       = __( 'Edit Themes' );
    2223$parent_file = 'themes.php';
    2324
  • src/wp-admin/theme-install.php

     
    2121        exit;
    2222}
    2323
     24// Used in the HTML title tag.
    2425$title       = __( 'Add Themes' );
    2526$parent_file = 'themes.php';
    2627
  • src/wp-admin/themes.php

     
    123123        }
    124124}
    125125
     126// Used in the HTML title tag.
    126127$title       = __( 'Manage Themes' );
    127128$parent_file = 'themes.php';
    128129
  • src/wp-admin/tools.php

     
    3939/** WordPress Administration Bootstrap */
    4040require_once __DIR__ . '/admin.php';
    4141
     42// Used in the HTML title tag.
    4243$title = __( 'Tools' );
    4344
    4445get_current_screen()->add_help_tab(
  • src/wp-admin/update-core.php

     
    11361136        $url = 'update.php?action=update-selected&plugins=' . urlencode( implode( ',', $plugins ) );
    11371137        $url = wp_nonce_url( $url, 'bulk-update-plugins' );
    11381138
     1139        // Used in the HTML title tag.
    11391140        $title = __( 'Update Plugins' );
    11401141
    11411142        require_once ABSPATH . 'wp-admin/admin-header.php';
     
    11761177        $url = 'update.php?action=update-selected-themes&themes=' . urlencode( implode( ',', $themes ) );
    11771178        $url = wp_nonce_url( $url, 'bulk-update-themes' );
    11781179
     1180        // Used in the HTML title tag.
    11791181        $title = __( 'Update Themes' );
    11801182
    11811183        require_once ABSPATH . 'wp-admin/admin-header.php';
  • src/wp-admin/update.php

     
    5959
    6060                check_admin_referer( 'upgrade-plugin_' . $plugin );
    6161
     62                // Used in the HTML title tag.
    6263                $title        = __( 'Update Plugin' );
    6364                $parent_file  = 'plugins.php';
    6465                $submenu_file = 'plugins.php';
     
    123124                        wp_die( $api );
    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
    131134                /* translators: %s: Plugin name and version. */
     
    153156
    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
    161166                /* translators: %s: File name. */
     
    206211
    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
    214221                $nonce = 'upgrade-theme_' . $theme;
     
    269276                        wp_die( $api );
    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
    277286                /* translators: %s: Theme name and version. */
     
    295304
    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';
    300310                $submenu_file = 'theme-install.php';
  • src/wp-admin/upload.php

     
    7676                '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
    7777        );
    7878
     79        // Used in the HTML title tag.
    7980        $title       = __( 'Media Library' );
    8081        $parent_file = 'upload.php';
    8182
     
    215216
    216217$wp_list_table->prepare_items();
    217218
     219// Used in the HTML title tag.
    218220$title       = __( 'Media Library' );
    219221$parent_file = 'upload.php';
    220222
  • src/wp-admin/user-edit.php

     
    3232}
    3333
    3434if ( IS_PROFILE_PAGE ) {
     35        // Used in the HTML title tag.
    3536        $title = __( 'Profile' );
    3637} else {
     38        // Used in the HTML title tag.
    3739        /* translators: %s: User's display name. */
    3840        $title = __( 'Edit User %s' );
    3941}
  • src/wp-admin/user-new.php

     
    245245        }
    246246}
    247247
     248// Used in the HTML title tag.
    248249$title       = __( 'Add New User' );
    249250$parent_file = 'users.php';
    250251
  • src/wp-admin/users.php

     
    2020
    2121$wp_list_table = _get_list_table( 'WP_Users_List_Table' );
    2222$pagenum       = $wp_list_table->get_pagenum();
    23 $title         = __( 'Users' );
    24 $parent_file   = 'users.php';
    2523
     24// Used in the HTML title tag.
     25$title       = __( 'Users' );
     26$parent_file = 'users.php';
     27
    2628add_screen_option( 'per_page' );
    2729
    2830// Contextual help - choose Help on the top right of admin panel to preview this.
  • src/wp-admin/widgets.php

     
    2424        wp_die( __( 'The theme you are currently using isn&#8217;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>.' ) );
    2525}
    2626
     27// Used in the HTML title tag.
    2728$title       = __( 'Widgets' );
    2829$parent_file = 'themes.php';
    2930