diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 4f0cf05265..3faa76cc7a 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -3897,8 +3897,12 @@ templateId = control.templateSelector; - // Use default content template when a standard HTML type is used and there isn't a more specific template existing. - if ( templateId === 'customize-control-' + control.params.type + '-content' && _.contains( standardTypes, control.params.type ) && ! document.getElementById( 'tmpl-' + templateId ) ) { + // 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. + if ( templateId === 'customize-control-' + control.params.type + '-content' && + _.contains( standardTypes, control.params.type ) && + ! document.getElementById( 'tmpl-' + templateId ) && + 0 === control.container.children().length ) + { templateId = 'customize-control-default-content'; } diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index c1eb1f31dd..54aeca9847 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -4019,6 +4019,7 @@ final class WP_Customize_Manager { <# }); #> >{{ inputAttrs.value }} <# } else if ( 'select' === data.type ) { #> + <# delete inputAttrs.type; #>