Make WordPress Core

Ticket #30738: 30738.4.diff

File 30738.4.diff, 1.6 KB (added by westonruter, 6 years ago)
  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index 4f0cf05265..39284d41d8 100644
     
    38973897
    38983898                        templateId = control.templateSelector;
    38993899
    3900                         // Use default content template when a standard HTML type is used and there isn't a more specific template existing.
    3901                         if ( templateId === 'customize-control-' + control.params.type + '-content' && _.contains( standardTypes, control.params.type ) && ! document.getElementById( 'tmpl-' + templateId ) ) {
     3900                        // Use default content template when a standard HTML type is used, there isn't a more specific template existing, and the control container is empty.
     3901                        if (
     3902                                templateId === 'customize-control-' + control.params.type + '-content'
     3903                                &&
     3904                                _.contains( standardTypes, control.params.type )
     3905                                &&
     3906                                ! document.getElementById( 'tmpl-' + templateId )
     3907                                &&
     3908                                0 === control.container.children().length
     3909                        ) {
    39023910                                templateId = 'customize-control-default-content';
    39033911                        }
    39043912
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index c1eb1f31dd..54aeca9847 100644
    final class WP_Customize_Manager { 
    40194019                                                        <# }); #>
    40204020                                                >{{ inputAttrs.value }}</textarea>
    40214021                                        <# } else if ( 'select' === data.type ) { #>
     4022                                                <# delete inputAttrs.type; #>
    40224023                                                <select
    40234024                                                        <# _.each( _.extend( inputAttrs ), function( value, key ) { #>
    40244025                                                                {{{ key }}}="{{ value }}"