This commit is contained in:
Alexander Agnarson 2020-02-25 18:04:54 +01:00
parent 62def2a89b
commit 7ad333b360
167 changed files with 2955 additions and 2493 deletions

View file

@ -6,7 +6,7 @@
* @category Modules
* @author Ari Stathopoulos (@aristath)
* @copyright Copyright (c) 2019, Ari Stathopoulos (@aristath)
* @license https://opensource.org/licenses/MIT
* @license https://opensource.org/licenses/MIT
* @since 3.0.28
*/
@ -90,6 +90,11 @@ class Kirki_Modules_CSS_Vars {
continue;
}
$val = Kirki_Values::get_value( $args['kirki_config'], $id );
if ( isset( $args['type'] ) && in_array( $args['type'], array( 'typography', 'kirki-typography' ), true ) ) {
if ( isset( $val['font-weight'] ) && 'regular' === $val['font-weight'] ) {
$val['font-weight'] = '400';
}
}
foreach ( $args['css_vars'] as $css_var ) {
if ( isset( $css_var[2] ) && is_array( $val ) && isset( $val[ $css_var[2] ] ) ) {
$this->vars[ $css_var[0] ] = str_replace( '$', $val[ $css_var[2] ], $css_var[1] );