Customize: Prevent using default template for a base control when it has content rendered on the server.

Also prevent invalid `type` attribute from being added to a `select` element.

See #30738.
Fixes #42286.


git-svn-id: https://develop.svn.wordpress.org/trunk@41952 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Weston Ruter
2017-10-20 03:29:30 +00:00
parent d204ba3c00
commit 620eb3052c
2 changed files with 7 additions and 2 deletions
@@ -4019,6 +4019,7 @@ final class WP_Customize_Manager {
<# }); #>
>{{ inputAttrs.value }}</textarea>
<# } else if ( 'select' === data.type ) { #>
<# delete inputAttrs.type; #>
<select
<# _.each( _.extend( inputAttrs ), function( value, key ) { #>
{{{ key }}}="{{ value }}"