Kirki: Disable output

Created on 27 Apr 2017  ·  3Comments  ·  Source: kirki-framework/kirki

Issue description:

Hi,

when 'disable_output' => true css still loads.

I think the problem is in class-kirki-modules-css.php
line 100

// Allow completely disabling Kirki CSS output.
if ( ( defined( 'KIRKI_NO_OUTPUT' ) && KIRKI_NO_OUTPUT ) || ( isset( $config['disable_output'] ) && true !== $config['disable_output'] ) ) {
    return;
}

true !== $config['disable_output']

should be

true === $config['disable_output']

Version used:

develop branch

Using theme_mods or options?

theme_mods

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

Most helpful comment

You're right, there was an error on that line. I just pushed a fix for that.

This seems to be working fine:

add_filter( 'kirki/config', function( $config ) {
    $config['disable_output'] = true;
    return $config;
});

As well as adding this line:

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

Both ways are valid, it's just a matter of preference

All 3 comments

Just tried that and it doesn't work.
Maybe I'm doing something wrong...

You're right, there was an error on that line. I just pushed a fix for that.

This seems to be working fine:

add_filter( 'kirki/config', function( $config ) {
    $config['disable_output'] = true;
    return $config;
});

As well as adding this line:

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

Both ways are valid, it's just a matter of preference

Works !

Thank You

Was this page helpful?
0 / 5 - 0 ratings