WordPress.org

Make WordPress Core

Ticket #26601: 26601.10.patch

File 26601.10.patch, 20.4 KB (added by afercia, 4 years ago)
  • src/wp-admin/css/common.css

     
    583583
    584584.wrap h1,
    585585.wrap h2 {
     586        display: inline-block;
    586587        font-size: 23px;
    587588        font-weight: 400;
    588         padding: 9px 15px 4px 0;
     589        padding: 9px 7px 4px 0;
    589590        line-height: 29px;
    590591}
    591592
     
    592593.subtitle {
    593594        color: #777;
    594595        font-size: 14px;
    595         padding-left: 25px;
     596        padding-left: 20px;
    596597}
    597598
    598599.wrap .add-new-h2, /* deprecated */
     
    599600.wrap .add-new-h2:active, /* deprecated */
    600601.wrap .page-title-action,
    601602.wrap .page-title-action:active {
    602         margin-left: 4px;
    603         padding: 4px 8px;
     603        display: inline-block;
    604604        position: relative;
    605605        top: -3px;
     606        border: none;
     607        margin-bottom: 6px;
     608        padding: 4px 8px;
    606609        text-decoration: none;
    607         border: none;
    608610        -webkit-border-radius: 2px;
    609611        border-radius: 2px;
    610612        background: #e0e0e0;
     
    620622}
    621623
    622624.wrap h1.long-header {
     625        display: block; /* post revisions screen */
    623626        padding-right: 0;
    624627}
    625628
     
    990993.title-count {
    991994        display: inline;
    992995        top: -3px;
    993         margin-left: 5px;
    994         margin-right: 20px;
     996        margin-right: 25px;
    995997}
    996998
    997999.filter-items {
  • src/wp-admin/css/themes.css

     
    1313}
    1414
    1515.themes-php .wrap h1 {
    16         float: left;
    1716        margin-bottom: 15px;
    1817}
    1918
  • src/wp-admin/edit-comments.php

     
    140140?>
    141141
    142142<div class="wrap">
     143<div class="header">
    143144<h1><?php
    144 if ( $post_id )
    145         echo sprintf( __( 'Comments on &#8220;%s&#8221;' ),
     145if ( $post_id ) {
     146        printf( __( 'Comments on &#8220;%s&#8221;' ),
    146147                sprintf( '<a href="%s">%s</a>',
    147148                        get_edit_post_link( $post_id ),
    148149                        wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '&hellip;' )
    149150                )
    150151        );
    151 else
     152} else {
    152153        _e( 'Comments' );
    153 
    154 if ( isset($_REQUEST['s']) && $_REQUEST['s'] )
    155         echo '<span class="subtitle">' . sprintf( __( 'Search results for &#8220;%s&#8221;' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' ) ) . '</span>'; ?>
    156 </h1>
    157 
     154} ?></h1>
    158155<?php
     156if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
     157        echo '<span class="subtitle">' . sprintf( __( 'Search results for &#8220;%s&#8221;' ), wp_html_excerpt( esc_html( wp_unslash( $_REQUEST['s'] ) ), 50, '&hellip;' ) ) . '</span>';
     158}
     159?>
     160</div>
     161<?php
    159162if ( isset( $_REQUEST['error'] ) ) {
    160163        $error = (int) $_REQUEST['error'];
    161164        $error_msg = '';
  • src/wp-admin/edit-form-advanced.php

     
    414414?>
    415415
    416416<div class="wrap">
    417 <h1><?php
    418 echo esc_html( $title );
    419 if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
     417<div class="header">
     418<h1><?php echo esc_html( $title ); ?></h1>
     419<?php if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) ) {
    420420        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    421 ?></h1>
     421} ?>
     422</div>
     423
    422424<?php if ( $notice ) : ?>
    423425<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
    424426<?php endif; ?>
  • src/wp-admin/edit-link-form.php

     
    7070?>
    7171
    7272<div class="wrap">
    73 <h1><?php echo esc_html( $title ); ?>  <a href="link-add.php" class="page-title-action"><?php echo esc_html_x('Add New', 'link'); ?></a></h1>
     73<div class="header">
     74        <h1><?php echo esc_html( $title ); ?></h1>
     75        <a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
     76</div>
    7477
    7578<?php if ( isset( $_GET['added'] ) ) : ?>
    7679<div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
  • src/wp-admin/edit-tags.php

     
    312312?>
    313313
    314314<div class="wrap nosubsub">
    315 <h1><?php echo esc_html( $title );
    316 if ( !empty($_REQUEST['s']) )
    317         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
    318 </h1>
     315<div class="header">
     316<h1><?php echo esc_html( $title ); ?></h1><?php
     317if ( ! empty( $_REQUEST['s'] ) ) {
     318        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
     319} ?>
     320</div>
    319321
    320322<?php if ( $message ) : ?>
    321323<div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
  • src/wp-admin/edit.php

     
    283283require_once( ABSPATH . 'wp-admin/admin-header.php' );
    284284?>
    285285<div class="wrap">
    286 <h1><?php
    287 echo esc_html( $post_type_object->labels->name );
    288 if ( current_user_can( $post_type_object->cap->create_posts ) )
     286<div class="header">
     287<h1><?php echo esc_html( $post_type_object->labels->name ); ?></h1>
     288<?php
     289if ( current_user_can( $post_type_object->cap->create_posts ) ) {
    289290        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    290 if ( ! empty( $_REQUEST['s'] ) )
    291         printf( ' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() );
    292 ?></h1>
     291}
     292if ( ! empty( $_REQUEST['s'] ) ) {
     293        printf( ' <span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
     294}
     295?>
     296</div>
    293297
    294298<?php
    295299// If we have a bulk message to issue:
  • src/wp-admin/js/common.js

     
    370370        }
    371371
    372372        // Move .notice, .updated and .error alert boxes. Don't move boxes designed to be inline.
    373         $firstHeading = $( '.wrap > h1:first' );
     373        $firstHeading = $( '.wrap > h1:first, .wrap > .header:first' );
    374374
    375         // Back compatibility: if there is no H1, apply to first H2.
     375        // Back compatibility: if there is no H1 or div.header, apply to first H2.
    376376        if ( ! $firstHeading.length ) {
    377377                $firstHeading = $( '.wrap h2:first' );
    378378        }
  • src/wp-admin/js/theme.js

     
    8484        },
    8585
    8686        // Defines search element container
    87         searchContainer: $( '#wpbody h1:first' ),
     87        searchContainer: $( '#wpbody .header:first' ),
    8888
    8989        // Search input and view
    9090        // for current theme collection
  • src/wp-admin/link-manager.php

     
    6969?>
    7070
    7171<div class="wrap nosubsub">
    72 <h1><?php echo esc_html( $title ); ?> <a href="link-add.php" class="page-title-action"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
    73 if ( !empty($_REQUEST['s']) )
    74         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
    75 </h1>
     72<div class="header">
     73<h1><?php echo esc_html( $title ); ?></h1>
     74<a href="link-add.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'link' ); ?></a>
     75<?php
     76if ( ! empty( $_REQUEST['s'] ) ) {
     77        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
     78} ?>
     79</div>
    7680
    7781<?php
    7882if ( isset($_REQUEST['deleted']) ) {
  • src/wp-admin/media.php

     
    103103?>
    104104
    105105<div class="wrap">
    106 <h1>
     106<div class="header">
     107<h1><?php echo esc_html( $title ); ?></h1>
    107108<?php
    108 echo esc_html( $title );
    109109if ( current_user_can( 'upload_files' ) ) { ?>
    110         <a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a>
     110        <a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a>
    111111<?php } ?>
    112 </h1>
     112</div>
    113113
    114114<form method="post" class="media-upload-form" id="media-single-form">
    115115<p class="submit" style="padding-bottom: 0;">
  • src/wp-admin/nav-menus.php

     
    558558require_once( ABSPATH . 'wp-admin/admin-header.php' );
    559559?>
    560560<div class="wrap">
     561        <div class="header">
    561562        <h1 class="nav-tab-wrapper">
    562563                <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>
    563564                <?php if ( $num_locations && $menu_count ) : ?>
     
    579580                        }
    580581                ?>
    581582        </h1>
     583        </div>
    582584        <?php
    583585        foreach( $messages as $message ) :
    584586                echo $message . "\n";
  • src/wp-admin/network/sites.php

     
    248248?>
    249249
    250250<div class="wrap">
    251 <h1><?php _e( 'Sites' ); ?>
     251<div class="header">
     252<h1><?php _e( 'Sites' ); ?></h1>
    252253
    253254<?php if ( current_user_can( 'create_sites') ) : ?>
    254255        <a href="<?php echo network_admin_url('site-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
     
    257258<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
    258259        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
    259260} ?>
    260 </h1>
     261</div>
    261262
    262263<?php echo $msg; ?>
    263264
  • src/wp-admin/network/themes.php

     
    261261?>
    262262
    263263<div class="wrap">
    264 <h1><?php echo esc_html( $title ); if ( current_user_can('install_themes') ) { ?> <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }
    265 if ( $s )
    266         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
    267 </h1>
     264<div class="header">
     265<h1><?php echo esc_html( $title ); ?></h1>
     266<?php
     267if ( current_user_can( 'install_themes' ) ) : ?>
     268        <a href="theme-install.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'theme' ); ?></a><?php
     269endif;
    268270
     271if ( $s ) {
     272        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
     273}
     274?>
     275</div>
     276
    269277<?php
    270278if ( isset( $_GET['enabled'] ) ) {
    271279        $enabled = absint( $_GET['enabled'] );
  • src/wp-admin/network/users.php

     
    309309}
    310310        ?>
    311311<div class="wrap">
    312         <h1><?php esc_html_e( 'Users' );
     312        <div class="header">
     313        <h1><?php esc_html_e( 'Users' ); ?></h1>
     314        <?php
    313315        if ( current_user_can( 'create_users') ) : ?>
    314                 <a href="<?php echo network_admin_url('user-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
     316                <a href="<?php echo network_admin_url( 'user-new.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
    315317        endif;
    316318
    317         if ( !empty( $usersearch ) )
    318         printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
     319        if ( ! empty( $usersearch ) ) {
     320                printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
     321        }
    319322        ?>
    320         </h1>
     323        </div>
    321324
    322325        <?php $wp_list_table->views(); ?>
    323326
  • src/wp-admin/plugin-install.php

     
    9494include(ABSPATH . 'wp-admin/admin-header.php');
    9595?>
    9696<div class="wrap">
    97 <h1>
     97<div class="header">
     98        <h1><?php echo esc_html( $title ); ?></h1>
    9899        <?php
    99         echo esc_html( $title );
    100100        if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_plugins' ) ) {
    101101                if ( $tab === 'upload' ) {
    102102                        $href = self_admin_url( 'plugin-install.php' );
     
    108108                echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>';
    109109        }
    110110        ?>
    111 </h1>
     111</div>
    112112
    113113<?php
    114114if ( $tab !== 'upload' ) {
  • src/wp-admin/plugins.php

     
    446446<?php endif; ?>
    447447
    448448<div class="wrap">
    449 <h1><?php echo esc_html( $title );
    450 if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
    451  <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
     449<div class="header">
     450<h1><?php echo esc_html( $title ); ?></h1>
     451<?php
     452if ( ( ! is_multisite() || is_network_admin() ) && current_user_can( 'install_plugins' ) ) { ?>
     453        <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'plugin' ); ?></a>
    452454<?php }
    453 if ( $s )
    454         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
    455 </h1>
     455if ( $s ) {
     456        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $s ) );
     457}
     458 ?>
     459</div>
    456460
    457461<?php
    458462/**
  • src/wp-admin/theme-install.php

     
    102102
    103103?>
    104104<div class="wrap">
    105         <h1><?php
    106         echo esc_html( $title );
    107 
     105        <div class="header">
     106        <h1><?php echo esc_html( $title ); ?></h1>
     107        <?php
    108108        /**
    109109         * Filter the tabs shown on the Add Themes screen.
    110110         *
     
    120120                echo ' <a href="#" class="upload page-title-action">' . __( 'Upload Theme' ) . '</a>';
    121121                echo ' <a href="#" class="browse-themes page-title-action">' . _x( 'Browse', 'themes' ) . '</a>';
    122122        }
    123         ?></h1>
     123        ?>
     124        </div>
    124125
    125126        <div class="upload-theme">
    126127        <?php install_themes_upload(); ?>
  • src/wp-admin/themes.php

     
    124124?>
    125125
    126126<div class="wrap">
    127         <h1><?php esc_html_e( 'Themes' ); ?>
     127<div class="header">
     128        <h1><?php esc_html_e( 'Themes' ); ?></h1>
    128129                <span class="title-count theme-count"><?php echo count( $themes ); ?></span>
    129130        <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    130131                <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>
    131132        <?php endif; ?>
    132         </h1>
    133133<?php
    134134if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
    135135<div id="message1" class="updated notice is-dismissible"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
     
    200200        }
    201201
    202202?>
    203 
     203</div>
    204204<div class="theme-browser">
    205205        <div class="themes">
    206206
  • src/wp-admin/upload.php

     
    7171        require_once( ABSPATH . 'wp-admin/admin-header.php' );
    7272        ?>
    7373        <div class="wrap" id="wp-media-grid" data-search="<?php _admin_search_query() ?>">
    74                 <h1>
     74                <div class="header">
     75                <h1><?php echo esc_html( $title ); ?></h1>
    7576                <?php
    76                 echo esc_html( $title );
    7777                if ( current_user_can( 'upload_files' ) ) { ?>
    7878                        <a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
    7979                }
    8080                ?>
    81                 </h1>
     81                </div>
    8282                <div class="error hide-if-js">
    8383                        <p><?php _e( 'The grid view for the Media Library requires JavaScript. <a href="upload.php?mode=list">Switch to the list view</a>.' ); ?></p>
    8484                </div>
     
    206206?>
    207207
    208208<div class="wrap">
    209 <h1>
     209<div class="header">
     210<h1><?php echo esc_html( $title ); ?></h1>
    210211<?php
    211 echo esc_html( $title );
    212212if ( current_user_can( 'upload_files' ) ) { ?>
    213         <a href="media-new.php" class="page-title-action"><?php echo esc_html_x('Add New', 'file'); ?></a><?php
     213        <a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
    214214}
    215 if ( ! empty( $_REQUEST['s'] ) )
    216         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
    217 </h1>
     215if ( ! empty( $_REQUEST['s'] ) ) {
     216        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', get_search_query() );
     217} ?>
     218</div>
    218219
    219220<?php
    220221$message = '';
  • src/wp-admin/user-edit.php

     
    202202<?php endif; ?>
    203203
    204204<div class="wrap" id="profile-page">
    205 <h1>
     205<div class="header">
     206<h1><?php echo esc_html( $title ); ?></h1>
    206207<?php
    207 echo esc_html( $title );
    208208if ( ! IS_PROFILE_PAGE ) {
    209209        if ( current_user_can( 'create_users' ) ) { ?>
    210210                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     
    212212                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    213213        <?php }
    214214} ?>
    215 </h1>
     215</div>
    216216<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post" novalidate="novalidate"<?php
    217217        /**
    218218         * Fires inside the your-profile form tag on the user editing screen.
  • src/wp-admin/users.php

     
    443443} ?>
    444444
    445445<div class="wrap">
    446 <h1>
     446<div class="header">
     447<h1><?php echo esc_html( $title );?></h1>
    447448<?php
    448 echo esc_html( $title );
    449449if ( current_user_can( 'create_users' ) ) { ?>
    450450        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
    451451<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
    452452        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    453453<?php }
     454if ( $usersearch ) {
     455        printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( $usersearch ) );
     456}
     457?>
     458</div>
    454459
    455 if ( $usersearch )
    456         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $usersearch ) ); ?>
    457 </h1>
    458 
    459460<?php $wp_list_table->views(); ?>
    460461
    461462<form method="get">
  • src/wp-admin/widgets.php

     
    315315require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
    316316
    317317<div class="wrap">
    318 <h1>
     318<div class="header">
     319<h1><?php echo esc_html( $title ); ?></h1>
    319320<?php
    320         echo esc_html( $title );
    321321        if ( current_user_can( 'customize' ) ) {
    322322                printf(
    323323                        ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
     
    332332                );
    333333        }
    334334?>
    335 </h1>
     335</div>
    336336
    337337<?php if ( isset($_GET['message']) && isset($messages[$_GET['message']]) ) { ?>
    338338<div id="message" class="updated notice is-dismissible"><p><?php echo $messages[$_GET['message']]; ?></p></div>