kirki icon indicating copy to clipboard operation
kirki copied to clipboard

Google Fonts load twice

Open imthat opened this issue 6 years ago • 6 comments

Issue description:

Google fonts load twice in the front end, any one having the same issue?

WebFont.load({google:{families:['Muli:700,600:cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai']}});
WebFont.load({google:{families:['Muli:700,600:cyrillic,cyrillic-ext,devanagari,greek,greek-ext,khmer,latin,latin-ext,vietnamese,hebrew,arabic,bengali,gujarati,tamil,telugu,thai']}});

Version used:

(Did you try using the develop branch from github? There's a chance your issue has already been adressed there) 3.033

Using theme_mods or options?

theme_mods

Code to reproduce the issue (config + field(s))

Typography field

imthat avatar Jun 13 '18 10:06 imthat

@imthat do you by any chance have 2 different kirki configs defined on your theme?

aristath avatar Jun 20 '18 20:06 aristath

Here's my config setting:

Kirki::add_config( 'theme_id', array(
	'capability'    => 'edit_theme_options',
	'option_type'   => 'theme_mod',
));

function theme_kirki_configuration( $config ) {
	return wp_parse_args(array(
		'logo_image'   => '',
		'description'  => 'theme',
		'color_accent' => '#006799',
		'color_back'   => '#FFFFFF',
		'disable_loader' => true,
		'disable_output' => false,
	));
}
add_filter( 'kirki_config', 'theme_kirki_configuration' );

If only use global config without theme config, everything's okay. If only use theme config, or use them both, fonts will load twice. Kirki is bundled in a theme not as plugin.

Should I only use global config?

imthat avatar Jun 20 '18 21:06 imthat

can you send me a copy of your theme so that I may debug this?

aristath avatar Jun 20 '18 21:06 aristath

Theme file sent.

imthat avatar Jun 20 '18 22:06 imthat

how is the status of this issue? #2026

niklasp avatar Nov 21 '18 14:11 niklasp

how is the status of this issue?

Issue still exists, it is confirmed but doesn't actually cause any issues or impede performance in any way so it's not on the top of the long list of things to fix. It will get fixed, but only after a few other more serious bugs have been resolved.

aristath avatar Nov 21 '18 15:11 aristath