You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: array_key_exists(): The first argument should be either a string or an integer in /Applications/AMPPS/www/wp/wp-content/plugins/kirki/includes/class-kirki-fonts.php on line 229
Warning: strpos() expects parameter 1 to be string, array given in /Applications/AMPPS/www/wp/wp-content/plugins/kirki/includes/output/property/class-kirki-output-property-font-family.php on line 49
Issue description:
I'm using typography option, and receiving
Warning: array_key_exists(): The first argument should be either a string or an integer in /Applications/AMPPS/www/wp/wp-content/plugins/kirki/includes/class-kirki-fonts.php on line 229
Warning: strpos() expects parameter 1 to be string, array given in /Applications/AMPPS/www/wp/wp-content/plugins/kirki/includes/output/property/class-kirki-output-property-font-family.php on line 49
Version used:
Used both development and production 2.3.2
Using theme_mods or options?
theme_mod
Code to reproduce the issue (config + field(s))
Kirki::add_section( 'sweipe_typography_section', array(
'title' => esc_html__( 'Typography', 'sweipe' ),
'priority' => 160,
'capability' => 'edit_theme_options',
) );
Kirki::add_config( 'sweipe_typography', array(
'capability' => 'edit_theme_options',
'option_type' => 'theme_mod',
'option_name' => 'sweipe_typography',
) );
Kirki::add_field( 'sweipe_typography', array(
'type' => 'typography',
'settings' => 'sweipe_base_font',
'label' => esc_html__( 'Body Fonts', 'sweipe' ),
'section' => 'sweipe_typography_section',
'default' => array(
'font-family' => 'Roboto',
'variant' => 'regular',
'font-size' => '14px',
'line-height' => '2.1',
'letter-spacing' => '0',
'subsets' => array( 'latin' ),
'color' => '#666666',
'text-transform' => 'none',
'text-align' => 'left'
),
'priority' => 20,
'output' => array(
array(
'element' => 'body',
'property' => 'font-family',
),
),
'transport' => 'postMessage',
'js_vars' => array(
array(
'element' => 'body',
'function' => 'css',
'property' => 'font-family',
),
)
) );
Kirki::add_field( 'sweipe_typography', array(
'type' => 'typography',
'settings' => 'sweipe_headings_font',
'label' => esc_html__( 'Heading Fonts', 'sweipe' ),
'section' => 'sweipe_typography_section',
'default' => array(
'font-family' => 'Roboto',
'variant' => '500',
'line-height' => '1.4',
'subsets' => array( 'latin' ),
'color' => '#212121'
),
'priority' => 20,
'output' => array(
array(
'element' => 'h1,h2,h3,h4,h5,h6,h7',
'property' => 'font-family',
),
),
'transport' => 'postMessage',
'js_vars' => array(
array(
'element' => 'h1,h2,h3,h4,h5,h6,h7',
'function' => 'css',
'property' => 'font-family',
),
)
) );
The text was updated successfully, but these errors were encountered: