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

Array to string conversion when clicking reset button #1477

Closed
carasmo opened this issue Jul 24, 2017 · 2 comments
Closed

Array to string conversion when clicking reset button #1477

carasmo opened this issue Jul 24, 2017 · 2 comments

Comments

@carasmo
Copy link

carasmo commented Jul 24, 2017

Issue description:

Using a couple of dimension fields with default values. Click reset
screen shot 2017-07-24 at 4 51 41 pm
and I get Notice: Array to string conversion in /.../wp-content/plugins/kirki/modules/css/class-kirki-output.php on line 265

It does not reset the values to the default values, instead it empties them but you only discover this on re-load. So there's nothing there. In the past, don't know which version, the values reset to the default values.

Version used:

3.0.9

Using theme_mods or options?

theme_mod

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

    Theme_Kirki::add_field('theme_prefix', array(
        'settings' => 'logo_height,
        'label' => esc_attr__( 'Logo Height.', 'text-domain'),
        'description' => esc_attr__( 'This height is for small viewports.', 'text-domain'),
        'section' => 'nosh_pro_branding_section',
        'type' => 'dimension',
        'transport' => 'postMessage',
        'priority' => 99,
        'default' => '100px',
        'output' => array(
            array(
                'element' => '.logo > a',
                'property' => 'max-height',
            ),
        ),
        'active_callback' => array(
            array(
                'setting' => 'blog_title_text_or_logo',
                'operator' => '==',
                'value' => 'image',
            ),
        ),
    ));

@aristath
Copy link
Contributor

Fixed

@carasmo
Copy link
Author

carasmo commented Jul 25, 2017

Thanks!

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