WordPress.org

Make WordPress Core

Ticket #31650: 31650.diff

File 31650.diff, 14.6 KB (added by obenland, 5 years ago)
  • src/wp-admin/css/colors/_admin.scss

     
    8383
    8484/* List tables */
    8585
    86 .wrap .add-new-h2:hover,
     86.wrap .add-new-h2:hover, /* Deprecated */
     87.wrap .page-title-action:hover,
    8788#add-new-comment a:hover,
    8889.tablenav .tablenav-pages a:hover,
    8990.tablenav .tablenav-pages a:focus {
  • src/wp-admin/css/common.css

     
    595595        padding-left: 25px;
    596596}
    597597
    598 .wrap .add-new-h2,
    599 .wrap .add-new-h2:active {
     598.wrap .add-new-h2, /* Deprecated */
     599.wrap .add-new-h2:active, /* Deprecated */
     600.wrap .page-title-action,
     601.wrap .page-title-action:active {
    600602        margin-left: 4px;
    601603        padding: 4px 8px;
    602604        position: relative;
     
    611613        font-size: 13px;
    612614}
    613615
    614 .wrap .add-new-h2:hover {
     616.wrap .add-new-h2:hover, /* Deprecated */
     617.wrap .page-title-action:hover {
    615618        background: #00a0d2;
    616619        color: #fff;
    617620}
     
    31663169                display: none !important;
    31673170        }
    31683171
    3169         .wrap .add-new-h2, .wrap .add-new-h2:active {
     3172        .wrap .add-new-h2, /* Deprecated */
     3173        .wrap .add-new-h2:active, /* Deprecated */
     3174        .wrap .page-title-action,
     3175        .wrap .page-title-action:active {
    31703176                padding: 10px 15px;
    31713177                font-size: 14px;
    31723178                white-space: nowrap;
  • src/wp-admin/edit-form-advanced.php

     
    417417<h1><?php
    418418echo esc_html( $title );
    419419if ( isset( $post_new_file ) && current_user_can( $post_type_object->cap->create_posts ) )
    420         echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
     420        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    421421?></h1>
    422422<?php if ( $notice ) : ?>
    423423<div id="notice" class="notice notice-warning"><p id="has-newer-autosave"><?php echo $notice ?></p></div>
  • 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="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h1>
     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>
    7474
    7575<?php if ( isset( $_GET['added'] ) ) : ?>
    7676<div id="message" class="updated notice is-dismissible"><p><?php _e('Link added.'); ?></p></div>
  • src/wp-admin/edit.php

     
    286286<h1><?php
    287287echo esc_html( $post_type_object->labels->name );
    288288if ( current_user_can( $post_type_object->cap->create_posts ) )
    289         echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="add-new-h2">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
     289        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    290290if ( ! empty( $_REQUEST['s'] ) )
    291291        printf( ' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() );
    292292?></h1>
  • 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="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a> <?php
     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
    7373if ( !empty($_REQUEST['s']) )
    7474        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
    7575</h1>
  • src/wp-admin/media.php

     
    107107<?php
    108108echo esc_html( $title );
    109109if ( current_user_can( 'upload_files' ) ) { ?>
    110         <a href="media-new.php" class="add-new-h2"><?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 } ?>
    112112</h1>
    113113
  • src/wp-admin/nav-menus.php

     
    566566                <?php
    567567                        if ( current_user_can( 'customize' ) ) {
    568568                                printf(
    569                                         ' <a class="add-new-h2 hide-if-no-customize" href="%1$s">%2$s</a>',
     569                                        ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
    570570                                        esc_url( add_query_arg(
    571571                                                array(
    572572                                                        array( 'autofocus' => array( 'panel' => 'nav_menus' ) ),
  • src/wp-admin/network/sites.php

     
    251251<h1><?php _e( 'Sites' ); ?>
    252252
    253253<?php if ( current_user_can( 'create_sites') ) : ?>
    254         <a href="<?php echo network_admin_url('site-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
     254        <a href="<?php echo network_admin_url('site-new.php'); ?>" class="page-title-action"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
    255255<?php endif; ?>
    256256
    257257<?php if ( isset( $_REQUEST['s'] ) && $_REQUEST['s'] ) {
  • 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="add-new-h2"><?php echo esc_html_x('Add New', 'theme'); ?></a><?php }
     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 }
    265265if ( $s )
    266266        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
    267267</h1>
  • src/wp-admin/network/users.php

     
    311311<div class="wrap">
    312312        <h1><?php esc_html_e( 'Users' );
    313313        if ( current_user_can( 'create_users') ) : ?>
    314                 <a href="<?php echo network_admin_url('user-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a><?php
     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
    315315        endif;
    316316
    317317        if ( !empty( $usersearch ) )
  • src/wp-admin/plugin-install.php

     
    105105                        $href = self_admin_url( 'plugin-install.php?tab=upload' );
    106106                        $text = __( 'Upload Plugin' );
    107107                }
    108                 echo ' <a href="' . $href . '" class="upload add-new-h2">' . $text . '</a>';
     108                echo ' <a href="' . $href . '" class="upload page-title-action">' . $text . '</a>';
    109109        }
    110110        ?>
    111111</h1>
  • src/wp-admin/plugins.php

     
    448448<div class="wrap">
    449449<h1><?php echo esc_html( $title );
    450450if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
    451  <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
     451 <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
    452452<?php }
    453453if ( $s )
    454454        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $s ) ); ?>
  • src/wp-admin/theme-install.php

     
    117117         */
    118118        $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
    119119        if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) {
    120                 echo ' <a href="#" class="upload add-new-h2">' . __( 'Upload Theme' ) . '</a>';
    121                 echo ' <a href="#" class="browse-themes add-new-h2">' . _x( 'Browse', 'themes' ) . '</a>';
     120                echo ' <a href="#" class="upload page-title-action">' . __( 'Upload Theme' ) . '</a>';
     121                echo ' <a href="#" class="browse-themes page-title-action">' . _x( 'Browse', 'themes' ) . '</a>';
    122122        }
    123123        ?></h1>
    124124
  • src/wp-admin/themes.php

     
    127127        <h1><?php esc_html_e( 'Themes' ); ?>
    128128                <span class="title-count theme-count"><?php echo count( $themes ); ?></span>
    129129        <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    130                 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js add-new-h2"><?php echo esc_html_x( 'Add New', 'Add new theme' ); ?></a>
     130                <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>
    131131        <?php endif; ?>
    132132        </h1>
    133133<?php
  • src/wp-admin/upload.php

     
    7575                <?php
    7676                echo esc_html( $title );
    7777                if ( current_user_can( 'upload_files' ) ) { ?>
    78                         <a href="media-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
     78                        <a href="media-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php
    7979                }
    8080                ?>
    8181                </h1>
     
    210210<?php
    211211echo esc_html( $title );
    212212if ( current_user_can( 'upload_files' ) ) { ?>
    213         <a href="media-new.php" class="add-new-h2"><?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}
    215215if ( ! empty( $_REQUEST['s'] ) )
    216216        printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
  • src/wp-admin/user-edit.php

     
    207207echo esc_html( $title );
    208208if ( ! IS_PROFILE_PAGE ) {
    209209        if ( current_user_can( 'create_users' ) ) { ?>
    210                 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     210                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
    211211        <?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
    212                 <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     212                <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    213213        <?php }
    214214} ?>
    215215</h1>
  • src/wp-admin/users.php

     
    447447<?php
    448448echo esc_html( $title );
    449449if ( current_user_can( 'create_users' ) ) { ?>
    450         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user' ); ?></a>
     450        <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' ) ) { ?>
    452         <a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
     452        <a href="user-new.php" class="page-title-action"><?php echo esc_html_x( 'Add Existing', 'user' ); ?></a>
    453453<?php }
    454454
    455455if ( $usersearch )
  • src/wp-admin/widgets.php

     
    320320        echo esc_html( $title );
    321321        if ( current_user_can( 'customize' ) ) {
    322322                printf(
    323                         ' <a class="add-new-h2 hide-if-no-customize" href="%1$s">%2$s</a>',
     323                        ' <a class="page-title-action hide-if-no-customize" href="%1$s">%2$s</a>',
    324324                        esc_url( add_query_arg(
    325325                                array(
    326326                                        array( 'autofocus' => array( 'panel' => 'widgets' ) ),
  • src/wp-includes/js/media/views/frame/manage.js

     
    4141                this.$window = $( window );
    4242                this.$adminBar = $( '#wpadminbar' );
    4343                this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );
    44                 $( document ).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) );
     44                $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );
    4545
    4646                // Ensure core and media grid view UI is enabled.
    4747                this.$el.addClass('wp-core-ui');
  • src/wp-includes/js/media-grid.js

     
    663663                this.$window = $( window );
    664664                this.$adminBar = $( '#wpadminbar' );
    665665                this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) );
    666                 $( document ).on( 'click', '.add-new-h2', _.bind( this.addNewClickHandler, this ) );
     666                $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );
    667667
    668668                // Ensure core and media grid view UI is enabled.
    669669                this.$el.addClass('wp-core-ui');