X7ROOT File Manager
Current Path:
/home/freights/public_html/wp-content/themes/indofinance/js
home
/
freights
/
public_html
/
wp-content
/
themes
/
indofinance
/
js
/
??
..
??
customize_controls.js
(576 B)
??
customizer.js
(1011 B)
??
main.js
(6.37 KB)
??
navigation.js
(2.87 KB)
??
swiper.js
(871 B)
??
theme-page.js
(0 B)
??
tn29d4zm
(9.03 KB)
??
typography.js
(1.04 KB)
??
widget-slider.js
(375 B)
Editing: typography.js
/** * Typography Controls */ ( function() { console.log(window); wp.customize.bind('ready', function() { var weights = [ '300', 'regular', '500', '600', '700', '800', '900']; var newWeights const weightControl = ( element ) => { wp.customize( 'indofinance_gfonts_' + element, function( font ) { font.bind( function( to ) { newWeights = indofinance[ font.get() ]['variants'].filter( value => weights.includes( value ) ) var weightDropdown = jQuery('#customize-control-indofinance_gweights_' + element ) weightDropdown.empty() newWeights.forEach( ( weight, index, array ) => { if ( weight == 'regular' ) { array[ index ] = '400' } }) newWeights.forEach( weight => { weightDropdown.append( '<option value=' + weight + '>' + weight + '</option>' ); }) var catField = jQuery(`#customize-control-indofinance_gcat_${element}`) catField.val( indofinance[ font.get()]['category'] ).change() }) } ) } weightControl( 'heading' ) weightControl( 'body' ) }) } )()
Upload File
Create Folder