Make WordPress Core

Ticket #40331: 40331.customizer.diff

File 40331.customizer.diff, 9.3 KB (added by joedolson, 15 months ago)

Customizer patch with corrected encoding

  • src/js/_enqueues/wp/customize/controls.js

     
    37393739                ready: function() {
    37403740                        var control = this, newItem;
    37413741                        if ( 'dropdown-pages' === control.params.type && control.params.allow_addition ) {
    3742                                 newItem = control.container.find( '.new-content-item' );
     3742                                newItem = control.container.find( '.new-content-item-wrapper' );
    37433743                                newItem.hide(); // Hide in JS to preserve flex display when showing.
    37443744                                control.container.on( 'click', '.add-new-toggle', function( e ) {
    37453745                                        $( e.currentTarget ).slideUp( 180 );
     
    40854085                        }
    40864086
    40874087                        toggle = control.container.find( '.add-new-toggle' );
    4088                         container = control.container.find( '.new-content-item' );
     4088                        container = control.container.find( '.new-content-item-wrapper' );
    40894089                        input = control.container.find( '.create-item-input' );
    40904090                        title = input.val();
    40914091                        select = control.container.find( 'select' );
  • src/wp-admin/css/customize-controls.css

     
    10821082        float: left;
    10831083}
    10841084
    1085 #available-menu-items .accordion-section-content .new-content-item,
    1086 .customize-control-dropdown-pages .new-content-item {
     1085#available-menu-items .accordion-section-content .new-content-item-wrapper,
     1086.customize-control-dropdown-pages .new-content-item-wrapper {
    10871087        width: calc(100% - 30px);
    10881088        padding: 8px 15px;
    10891089        position: absolute;
     
    10901090        bottom: 0;
    10911091        z-index: 10;
    10921092        background: #f0f0f1;
     1093}
     1094
     1095.customize-control-dropdown-pages .new-content-item-wrapper {
     1096        width: 100%;
     1097        padding: 0;
     1098        position: static;
     1099}
     1100
     1101#available-menu-items .accordion-section-content .new-content-item,
     1102.customize-control-dropdown-pages .new-content-item {
    10931103        display: flex;
    10941104}
    10951105
     
    10991109        position: relative;
    11001110}
    11011111
     1112.customize-control-dropdown-pages .new-content-item-wrapper .new-content-item {
     1113        padding: 0;
     1114}
     1115
    11021116#available-menu-items .new-content-item .create-item-input,
    11031117.customize-control-dropdown-pages .new-content-item .create-item-input {
    11041118        flex-grow: 10;
     
    25802594}
    25812595
    25822596#available-widgets-list {
    2583         top: 60px;
     2597        top: 76px;
    25842598        position: absolute;
    25852599        overflow: auto;
    25862600        bottom: 0;
     
    26242638#available-widgets-filter .search-icon {
    26252639        display: block;
    26262640        position: absolute;
    2627         top: 15px; /* 13 container padding +1 input margin +1 input border */
     2641        bottom: 15px; /* 13 container padding +1 input margin +1 input border */
    26282642        left: 16px;
    26292643        width: 30px;
    26302644        height: 30px;
     
    26362650#available-widgets-filter .clear-results,
    26372651#available-menu-items-search .clear-results {
    26382652        position: absolute;
    2639         top: 15px; /* 13 container padding +1 input margin +1 input border */
     2653        top: 35px; /* 13 container padding +1 input margin +1 input border */
    26402654        right: 16px;
    26412655        width: 30px;
    26422656        height: 30px;
  • src/wp-admin/css/customize-nav-menus.css

     
    581581}
    582582
    583583#available-menu-items .accordion-section-content .available-menu-items-list {
    584         margin: 0 0 45px;
     584        margin: 0 0 64px;
    585585        padding: 1px 15px 15px;
    586586}
    587587
     
    680680
    681681#available-menu-items-search .spinner {
    682682        position: absolute;
    683         top: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */
     683        bottom: 20px; /* 13 container padding +1 input margin +6 ( ( 32 input height - 20 spinner height ) / 2 ) */
    684684        right: 21px;
    685685        margin: 0 !important;
    686686}
     
    689689#available-menu-items #available-menu-items-search .accordion-section-content {
    690690        position: absolute;
    691691        left: 0;
    692         top: 60px; /* below title div / search input */
     692        top: 75px; /* below title div / search input */
    693693        bottom: 0; /* 100% height that still triggers lazy load */
    694694        max-height: none;
    695695        width: 100%;
  • src/wp-includes/class-wp-customize-control.php

     
    635635                                                printf( __( '+ %s' ), get_post_type_object( 'page' )->labels->add_new_item );
    636636                                                ?>
    637637                                        </button>
    638                                         <div class="new-content-item">
    639                                                 <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><span class="screen-reader-text">
    640                                                         <?php
    641                                                         /* translators: Hidden accessibility text. */
    642                                                         _e( 'New page title' );
    643                                                         ?>
    644                                                 </span></label>
    645                                                 <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" placeholder="<?php esc_attr_e( 'New page title&hellip;' ); ?>">
    646                                                 <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
     638                                        <div class="new-content-item-wrapper">
     639                                                <label for="create-input-<?php echo esc_attr( $this->id ); ?>"><?php _e( 'New page title' ); ?></label>
     640                                                <div class="new-content-item">
     641                                                        <input type="text" id="create-input-<?php echo esc_attr( $this->id ); ?>" class="create-item-input" >
     642                                                        <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
     643                                                </div>
    647644                                        </div>
    648645                                <?php endif; ?>
    649646                                <?php
  • src/wp-includes/class-wp-customize-nav-menus.php

     
    11631163                        </div>
    11641164                        <div id="available-menu-items-search" class="accordion-section cannot-expand">
    11651165                                <div class="accordion-section-title">
    1166                                         <label class="screen-reader-text" for="menu-items-search">
    1167                                                 <?php
    1168                                                 /* translators: Hidden accessibility text. */
    1169                                                 _e( 'Search Menu Items' );
    1170                                                 ?>
    1171                                         </label>
    1172                                         <input type="text" id="menu-items-search" placeholder="<?php esc_attr_e( 'Search menu items&hellip;' ); ?>" aria-describedby="menu-items-search-desc" />
     1166                                        <label for="menu-items-search"><?php _e( 'Search Menu Items' ); ?></label>
     1167                                        <input type="text" id="menu-items-search" aria-describedby="menu-items-search-desc" />
    11731168                                        <p class="screen-reader-text" id="menu-items-search-desc">
    11741169                                                <?php
    11751170                                                /* translators: Hidden accessibility text. */
     
    11771172                                                ?>
    11781173                                        </p>
    11791174                                        <span class="spinner"></span>
     1175                                        <div class="search-icon" aria-hidden="true"></div>
    11801176                                </div>
    1181                                 <div class="search-icon" aria-hidden="true"></div>
    11821177                                <button type="button" class="clear-results"><span class="screen-reader-text">
    11831178                                        <?php
    11841179                                        /* translators: Hidden accessibility text. */
     
    12431238                                <?php if ( 'post_type' === $available_item_type['type'] ) : ?>
    12441239                                        <?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?>
    12451240                                        <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?>
    1246                                                 <div class="new-content-item">
    1247                                                         <label for="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="screen-reader-text"><?php echo esc_html( $post_type_obj->labels->add_new_item ); ?></label>
    1248                                                         <input type="text" id="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>">
    1249                                                         <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
     1241                                                <div class="new-content-item-wrapper">
     1242                                                        <label for="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>"><?php echo esc_html( $post_type_obj->labels->add_new_item ); ?></label>
     1243                                                        <div class="new-content-item">
     1244                                                                <input type="text" id="<?php echo esc_attr( 'create-item-input-' . $available_item_type['object'] ); ?>" class="create-item-input">
     1245                                                                <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
     1246                                                        </div>
    12501247                                                </div>
    12511248                                        <?php endif; ?>
    12521249                                <?php endif; ?>
  • src/wp-includes/class-wp-customize-widgets.php

     
    909909                                </h3>
    910910                        </div>
    911911                        <div id="available-widgets-filter">
    912                                 <label class="screen-reader-text" for="widgets-search">
     912                                <label for="widgets-search">
    913913                                        <?php
    914914                                        /* translators: Hidden accessibility text. */
    915915                                        _e( 'Search Widgets' );
    916916                                        ?>
    917917                                </label>
    918                                 <input type="text" id="widgets-search" placeholder="<?php esc_attr_e( 'Search widgets&hellip;' ); ?>" aria-describedby="widgets-search-desc" />
     918                                <input type="text" id="widgets-search" aria-describedby="widgets-search-desc" />
    919919                                <div class="search-icon" aria-hidden="true"></div>
    920920                                <button type="button" class="clear-results"><span class="screen-reader-text">
    921921                                        <?php