Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font Size and Line Height are not saved in Array in Typography filed - v3.0.10 #1521

Closed
dariodev opened this issue Sep 3, 2017 · 2 comments

Comments

@dariodev
Copy link

dariodev commented Sep 3, 2017

Typography filed in customizer does not show default values for Font Size and Line Height. When I enter values in these fields the change is instantly visible in the Customizer, but after Save & Publish the values are not saved.

Version used latest Develop branch
Using theme_mods

Here is example field:

Kirki::add_field( 'theme_config', array(
	'type'        => 'typography',
	'settings'    => 'nav_typography',
	'section'     => 'menu_typography',
	'priority'    => 25,
	'default'     => array(
		'font-family'    => 'Roboto',
		'line-height'    => '1.4',
		'variant'        => '500',
		'subsets'        => array( 'latin' ),
		'text-transform' => 'none',
		'letter-spacing' => '0',
		'font-size'      => '16px',
	),
	'transport' => 'auto',
	'output' => array(
		array(
			'element' => '.sm-simple a',
		),
	),
) );

and here is the array that is saved after all fields are saved (tried many times):

Array ( [font-family] => Roboto [variant] => 500 [subsets] => Array ( [0] => latin ) [text-transform] => uppercase [letter-spacing] => 1px [font-weight] => 500 [font-style] => normal ) 

EDIT: I tried with Kirki added in the theme and activated as plugin, result is the same for both ways - v3.0.10 does not save those values.
After that I wanted to check how the latest stable version from wp.org 3.0.9 works. With this version I also tried both ways, activated as plugin and bundled in theme - this version works both ways.

@aristath
Copy link
Contributor

aristath commented Oct 5, 2017

fixed.

@dariodev
Copy link
Author

Thank you, sir :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants