Cleanup
This commit is contained in:
parent
b3f70bb7b5
commit
877a8491ad
|
@ -88,7 +88,9 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
if ( thislocale[ key ].placeholder ) {
|
if ( thislocale[ key ].placeholder ) {
|
||||||
field.find( 'input' ).attr( 'placeholder', thislocale[ key ].placeholder );
|
field.find( 'input' ).attr( 'placeholder', thislocale[ key ].placeholder );
|
||||||
// Use the i18n label as a placeholder if there is no label element or i18n placeholder.
|
field.find( '.select2-selection__placeholder' ).text( thislocale[ key ].placeholder );
|
||||||
|
|
||||||
|
// Use the i18n label as a placeholder if there is no label element and no i18n placeholder.
|
||||||
} else if ( thislocale[ key ].label && ! field.find( 'label' ).length ) {
|
} else if ( thislocale[ key ].label && ! field.find( 'label' ).length ) {
|
||||||
field.find( 'input' ).attr( 'placeholder', thislocale[ key ].label );
|
field.find( 'input' ).attr( 'placeholder', thislocale[ key ].label );
|
||||||
field.find( '.select2-selection__placeholder' ).text( thislocale[ key ].label );
|
field.find( '.select2-selection__placeholder' ).text( thislocale[ key ].label );
|
||||||
|
|
Loading…
Reference in New Issue