Skip to content

Commit

Permalink
fixes #951
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed May 12, 2016
1 parent 1c0a2f2 commit 556c23d
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions assets/js/functions/set-setting-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,30 +126,39 @@ function kirkiSetSettingValue( setting, value ) {
if ( undefined !== value['font-family'] ) {

$select = jQuery( wp.customize.control( setting ).container.find( '.font-family select' ) ).selectize();
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value['font-family'], true );
if ( 'undefined' !== typeof select ) {
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value['font-family'], true );
}

}

if ( undefined !== value.variant ) {

$select = jQuery( wp.customize.control( setting ).container.find( '.variant select' ) ).selectize();
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value.variant, true );
if ( 'undefined' !== typeof select ) {
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value.variant, true );
}

}

if ( undefined !== value.subsets ) {

$select = jQuery( wp.customize.control( setting ).container.find( '.subset select' ) ).selectize();
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value.subset, true );
if ( 'undefined' !== typeof select ) {
selectize = $select[0].selectize;

// Update the value visually in the control
selectize.setValue( value.subset, true );
}

}

Expand Down

0 comments on commit 556c23d

Please sign in to comment.