When using Standard Fonts and the output parameter, we're getting the error:
Notice: Array to string conversion in /kirki/modules/css/field/class-kirki-output-field-typography.php on line 65
Generated CSS:
font-family: Array;
develop branch
Can you post the code you're using?
I'll deal with all typography issues this weekend so having some code to test against would make things easier 馃憤
Sure!
But there's really nothing special:
Kirki::add_field( 'theme_name_theme_mod', array(
'type' => 'typography',
'settings' => 'typography_headings',
'label' => esc_html__( 'Heading', 'text-domain' ),
'section' => 'typography_headings',
'default' => array(
'font-family' => 'Montserrat',
'variant' => '600',
'subsets' => array( 'latin-ext' ),
),
'priority' => 10,
'output' => array(
array(
'element' => 'h1, h2, h3, h4, h5, h6',
),
),
) );
Same mistake
Fixed.
Thanks for reporting this!
I've just tested it, and seems there's an issue with switching font-weight for standard fonts. The weight doesn't get changed :(
For reproducing the issue, try changing between weights in Serif, then switch to Sans-Serif and change font-weights.
@hellor0bot I just tested it and can't replicate the issue you're describing
I've just added transport: auto to all typography fields and removed line breaks in the element parameter and it's working fine now.
By the way, transport: auto on typography fields is so awesome. Great job!
Nope, the issue is still there and I can't debug it :(
All fonts appear in the Customizer correctly with transport set to auto, however after saving a former (or incorrect) variant is displayed on the front-end.
The issue is related to all fonts, not standard ones, as I'd thought before.
Should be ok now.
Just checked it. All is good. Thanks a lot!