• Resolved neralex

    (@neralex)


    Hey!

    After the upgade from verion 3.1.9 to 4.0.22 the hidden kirki-inline-styles are shown again.

    In versions 3.1.9 exists a global, which allows to hide it completele. But it doesn’t work anymore in version 4x.

    if ( ! defined( 'KIRKI_NO_OUTPUT' ) ) {
    	define( 'KIRKI_NO_OUTPUT', true );
    }

    After some research I found a old answer on Github, where it recommended to use the following way to hide it. https://github.com/kirki-framework/kirki/issues/276#issuecomment-184450469

    Kirki::add_config( 'my_theme', array(
        'capability'     => 'edit_theme_options',
        'option_type'    => 'theme_mod',
        'option_name'    => '',
        'disable_output' => true,
    ) );

    This hides the styles but not the style-tag itself, it is always there but empty. How can I hide it too?

    <style id="kirki-inline-styles"></style>

    Thanks in advance
    N

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter neralex

    (@neralex)

    …anybody out there?

    David Vongries

    (@davidvongries)

    Hi,

    We are going to look into this asap. Time is a bit rare at the moment.

    Thank you for your patience.

    Best,
    David

    David Vongries

    (@davidvongries)

    Hi @neralex,

    this behaviour is intentional. The styletag is still being created as it will have the necessary CSS for typography related fields, for instance when fonts are loaded.

    Best,
    David

    Thread Starter neralex

    (@neralex)

    Okay, but how can I override it in a child-theme, where I don’t use the Typographie related fields from the main-theme? This is a bug in v4, which doesn’t exists in 3.x and this overrides embedded font-families of the child-theme. You will find simular reported issues in your Support-forum…

    • This reply was modified 3 years ago by neralex.
    • This reply was modified 3 years ago by neralex.
    David Vongries

    (@davidvongries)

    Let me correct what I said. We’re currently looking into this and I can confirm that KIRKI_NO_OUTPUT does not affect the frontend output currently (which it should).

    Regarding the config above, Kirki 4 doesn’t use the config any more (but backwards compatibility for that is in place). That being said, setting disable_output to true in the config should prevent any styles from being printed.

    I’m not 100% sure wether to print or not print the style tag when output is disabled as from what I remember it’s used to display typography related styles.

    David Vongries

    (@davidvongries)

    Okay, here’s what we do ??

    KIRKI_NO_OUTPUT will work as expected with the next update. This was a bug.

    In addition to that, we are implementing a check to not output the style tag if no typography related settings exist. Win-win ??

    Thank you for reporting this!

    Thread Starter neralex

    (@neralex)

    Thank you! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘disable kirki-inline-styles’ is closed to new replies.