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

multicolor field RESET to default not working totally (color in the field are not resetting) #916

Closed
thatvideowebguy opened this issue Apr 21, 2016 · 3 comments

Comments

@thatvideowebguy
Copy link

thatvideowebguy commented Apr 21, 2016

Issue description:

When you click to reset button , the magic append , colors are reseted to default
but the colors within the multicolor field aren't reseted.
and you can see [object Object] in each color field.

Version used:

develop branch from github

Using theme_mods or options?

theme_mods

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

Kirki::add_field( '_s_theme', array(
    'type'        => 'multicolor',
    'settings'    => 'link_color',
    'label'       => esc_attr__( 'Couleurs des liens', 'my_textdomain' ),
    'section'     => 'color',
    'priority'    => 10,
    'choices'     => array(
        'link'    => esc_attr__( 'Couleur', 'my_textdomain' ),
        'hover'   => esc_attr__( 'Survol', 'my_textdomain' ),
        'active'  => esc_attr__( 'Actif', 'my_textdomain' ),
    ),
    'default'     => array(
        'link'    => '#0088cc',
        'hover'   => '#00aaff',
        'active'  => '#00ffff',
    ),
) );

<?php
$defaults = array(
    'link'    => '#0088cc',
    'hover'   => '#00aaff',
    'active'  => '#00ffff',
);
$colors = get_theme_mod( 'link_color', $defaults );
echo '<style>';
echo '#content a { color: ' . $colors['link'] . '!important; }';
echo '#content a:hover { color: ' . $colors['hover'] . '!important; }';
echo '#content a:active { color: ' . $colors['active'] . '!important; }';
echo '</style>';
?>
@aristath aristath added the bug label Apr 21, 2016
@aristath
Copy link
Contributor

This is still a work in progress.
Marking for the 2.4 version 👍

@willi-dev
Copy link

hello..
i have the same issue about multicolor reseted value.
is it still in progress? will be release for 2.4 version?

thanks.

@aristath
Copy link
Contributor

Fixed in 3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants