Make WordPress Core

Ticket #40331: 40331.6.diff

File 40331.6.diff, 5.2 KB (added by joedolson, 11 months ago)

Updated patch for themes search fields

  • src/js/_enqueues/wp/theme.js

     
    9696        },
    9797
    9898        // Defines search element container.
    99         searchContainer: $( '.search-form' ),
     99        searchContainer: $( '.search-form .search-box' ),
    100100
    101101        // Search input and view
    102102        // for current theme collection.
     
    118118                // Render and append after screen title.
    119119                view.render();
    120120                this.searchContainer
    121                         .append( $.parseHTML( '<label class="screen-reader-text" for="wp-filter-search-input">' + l10n.search + '</label>' ) )
     121                        .append( $.parseHTML( '<label for="wp-filter-search-input">' + l10n.search + '</label>' ) )
    122122                        .append( view.el )
    123123                        .on( 'submit', function( event ) {
    124124                                event.preventDefault();
     
    13591359        searching: false,
    13601360
    13611361        attributes: {
    1362                 placeholder: l10n.searchPlaceholder,
    13631362                type: 'search',
    13641363                'aria-describedby': 'live-search-desc'
    13651364        },
  • src/wp-admin/css/themes.css

     
    1919        clear: both;
    2020}
    2121
    22 .themes-php:not(.network-admin) .wrap h1 {
    23         margin-bottom: 15px;
    24 }
    25 
    2622.themes-php .wrap h1 .button {
    2723        margin-left: 20px;
    2824}
     
    2925
    3026/* Search form */
    3127.themes-php .search-form {
    32         display: inline;
     28        display: inline-flex;
     29        align-items: center;
     30        position: relative;
     31        top: 0;
     32        gap: .5rem;
     33        width: 100%;
     34        justify-content: end;
    3335}
    3436
    3537.themes-php .wp-filter-search {
    3638        position: relative;
    37         top: -2px;
    38         left: 20px;
    3939        margin: 0;
    4040        width: 280px;
    4141}
     
    955955                clear: both;
    956956                left: 0;
    957957                right: 0;
    958                 margin: -5px 0 20px;
    959958                width: 100%;
    960959                max-width: 280px;
    961960        }
  • src/wp-admin/network/site-themes.php

     
    237237<p><?php _e( 'Network enabled themes are not shown on this screen.' ); ?></p>
    238238
    239239<form method="get">
    240 <?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
     240<?php $wp_list_table->search_box( __( 'Search installed themes' ), 'theme' ); ?>
    241241<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
    242242</form>
    243243
  • src/wp-admin/network/themes.php

     
    460460?>
    461461
    462462<form method="get">
    463 <?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
     463<?php $wp_list_table->search_box( __( 'Search installed themes' ), 'theme' ); ?>
    464464</form>
    465465
    466466<?php
  • src/wp-admin/theme-install.php

     
    5656                'l10n'            => array(
    5757                        'addNew'              => __( 'Add New Theme' ),
    5858                        'search'              => __( 'Search Themes' ),
    59                         'searchPlaceholder'   => __( 'Search themes...' ), // Placeholder (no ellipsis).
    6059                        'upload'              => __( 'Upload Theme' ),
    6160                        'back'                => __( 'Back' ),
    6261                        'error'               => sprintf(
     
    217216
    218217                <button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button>
    219218
    220                 <form class="search-form"></form>
     219                <form class="search-form"><p class="search-box"></p></form>
    221220
    222221                <div class="favorites-form">
    223222                        <?php
  • src/wp-admin/themes.php

     
    232232                ),
    233233                'l10n'     => array(
    234234                        'addNew'            => __( 'Add New Theme' ),
    235                         'search'            => __( 'Search Installed Themes' ),
    236                         'searchPlaceholder' => __( 'Search installed themes...' ), // Placeholder (no ellipsis).
     235                        'search'            => __( 'Search installed themes' ),
    237236                        /* translators: %d: Number of themes. */
    238237                        'themesFound'       => __( 'Number of Themes found: %d' ),
    239238                        'noThemesFound'     => __( 'No themes found. Try a different search.' ),
     
    252251        <h1 class="wp-heading-inline"><?php esc_html_e( 'Themes' ); ?>
    253252                <span class="title-count theme-count"><?php echo ! empty( $_GET['search'] ) ? __( '&hellip;' ) : count( $themes ); ?></span>
    254253        </h1>
    255 
    256254        <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    257255                <a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html__( 'Add New Theme' ); ?></a>
    258256        <?php endif; ?>
     257        <hr class="wp-header-end">
     258        <form class="search-form search-themes"><p class="search-box"></p></form>
    259259
    260         <form class="search-form"></form>
    261 
    262         <hr class="wp-header-end">
    263260<?php
    264261if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
    265262        wp_admin_notice(