Skip to content

Commit

Permalink
Update CustomizerController.php
Browse files Browse the repository at this point in the history
Array values supported when rendering css.
  • Loading branch information
amostajo committed Feb 13, 2020
1 parent 8e07cb3 commit b472ad3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion addon/Controllers/CustomizerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ public static function print_style( &$config, $setting_id, $style, $value, $medi
$value = $value[0];
}
// Print
printf( $style, $value );
if ( is_array( $value ) ) {
foreach ( $value as $key => $data ) {
$style = str_replace( '{' . $key . '}', $data, $style );
}
print( $style );
} else {
printf( $style, $value );
}
}
/**
* Registers customizer customizations.
Expand Down

0 comments on commit b472ad3

Please sign in to comment.