Fixed in the develop branch on https://github.com/aristath/kirki/commit/41c271c7ff9b01f236c8da7b12b9c538f3acefd8
Fix will be included in version 3.0.10 which will be released soon.
However this is not something that should happen and it’s the first time ever something like this has been reported.
The only thing I can think of that would cause this is a corrupted option or a corrupted webfonts file.
The fix I added was an extra check in case the webfonts array is not properly formatted.
You can wait for version 3.0.10 to be released.
You could speed up the process by testing the development version from https://github.com/aristath/kirki/archive/develop.zip and if you find any issues, report them in the github issues queue on https://github.com/aristath/kirki/issues
The more people test it the sooner we can have it ready to be released.
Am i to copy all like this and replace.
@@ -153,7 +153,7 @@ public function generate_google_font( $args ) {
$args[‘choices’][‘variant’] = array_keys( $all_variants );
}
– if ( ! empty( $args[‘choices’][‘variant’] ) ) {
+ if ( ! empty( $args[‘choices’][‘variant’] ) && is_array( $args[‘choices’][‘variant’] ) ) {
foreach ( $args[‘choices’][‘variant’] as $extra_variant ) {
$this->fonts[ $value[‘font-family’] ][] = $extra_variant;
}
You should not be embedding kirki in your theme, instead you should be using it as a plugin.
If however you chose to use it embedded in your theme, you could just copy the entire file from https://raw.githubusercontent.com/aristath/kirki/develop/modules/webfonts/class-kirki-fonts-google.php
Copying the whole file is easier than editing specific lines.
the develop works fine, Thanks.