mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-28 11:50:25 +08:00
1.0.1
This commit is contained in:
parent
b14ccb1b03
commit
7e3774b663
168 changed files with 2453 additions and 2788 deletions
|
@ -830,7 +830,13 @@ kirki = jQuery.extend( kirki, {
|
|||
} );
|
||||
|
||||
element.on( 'change keyup paste click', function() {
|
||||
kirki.setting.set( control.id, jQuery( this ).val() );
|
||||
var val = jQuery( this ).val();
|
||||
if ( isNaN( val ) ) {
|
||||
val = parseFloat( val, 10 );
|
||||
val = ( isNaN( val ) ) ? 0 : val;
|
||||
jQuery( this ).attr( 'value', val );
|
||||
}
|
||||
kirki.setting.set( control.id, val );
|
||||
} );
|
||||
}
|
||||
|
||||
|
@ -899,7 +905,7 @@ kirki = jQuery.extend( kirki, {
|
|||
previewImage = jsonImg.url;
|
||||
|
||||
if ( ! _.isUndefined( jsonImg.sizes ) ) {
|
||||
previewImg = jsonImg.sizes.full.url;
|
||||
previewImage = jsonImg.sizes.full.url;
|
||||
if ( ! _.isUndefined( jsonImg.sizes.medium ) ) {
|
||||
previewImage = jsonImg.sizes.medium.url;
|
||||
} else if ( ! _.isUndefined( jsonImg.sizes.thumbnail ) ) {
|
||||
|
@ -3170,7 +3176,6 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
|
|||
control.renderFontSelector();
|
||||
control.renderBackupFontSelector();
|
||||
control.renderVariantSelector();
|
||||
control.localFontsCheckbox();
|
||||
|
||||
// Font-size.
|
||||
if ( 'undefined' !== typeof control.params.default['font-size'] ) {
|
||||
|
@ -3568,22 +3573,6 @@ wp.customize.controlConstructor['kirki-typography'] = wp.customize.kirkiDynamicC
|
|||
};
|
||||
},
|
||||
|
||||
localFontsCheckbox: function() {
|
||||
var control = this,
|
||||
checkboxContainer = control.container.find( '.kirki-host-font-locally' ),
|
||||
checkbox = control.container.find( '.kirki-host-font-locally input' ),
|
||||
checked = jQuery( checkbox ).is( ':checked' );
|
||||
|
||||
if ( control.setting._value && control.setting._value.downloadFont ) {
|
||||
jQuery( checkbox ).attr( 'checked', 'checked' );
|
||||
}
|
||||
|
||||
jQuery( checkbox ).on( 'change', function() {
|
||||
checked = jQuery( checkbox ).is( ':checked' );
|
||||
control.saveValue( 'downloadFont', checked );
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
* Saves the value.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue