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

Code control: missing button text #1017

Closed
iliman opened this issue Jun 2, 2016 · 5 comments
Closed

Code control: missing button text #1017

iliman opened this issue Jun 2, 2016 · 5 comments

Comments

@iliman
Copy link
Contributor

iliman commented Jun 2, 2016

Issue description:

image

Version used:

2.3.4, last dev

Using theme_mods or options?

theme_mods

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

/**
 * Kirki configuration
 */
Kirki::add_config( 'll', array(
    'option_type'     => 'theme_mod',
    'capability'      => 'edit_theme_options',
) );

/**
 * Add the Advanced Options panel
 */
Kirki::add_panel( 'll_advanced', array(
    'priority'    => 200,
    'title'       => __( 'Advanced Options', 'll' ),
    'description' => __( 'Settings for advanced users', 'll' ),
) );

/**
 * Add the Custom CSS section (Advanced Options -> Custom CSS)
 */
Kirki::add_section( 'll_css', array(
    'title'      => __( 'Custom CSS', 'll' ),
    'panel'      => 'll_advanced',
    'capability' => 'edit_theme_options',
) );

//Add the custom-css control
Kirki::add_field( 'll', array(
    'type'        => 'code',
    'settings'    => 'll_custom_css',
    'description' => __( 'Please don\'t touch if you ain\'t sure what is this.', 'll' ),
    'section'     => 'll_css',
    'choices'     => array(
        'language'   => 'css',
        'theme'      => 'monokai',
    ),
) );
@iliman
Copy link
Contributor Author

iliman commented Jun 2, 2016

P.S. The editor control displays a button text.

@dariodev
Copy link

dariodev commented Jun 2, 2016

Add label in choices array

'choices'    => array(
    'label'     => __( 'Custom Style', 'themedomain' ),
    'language'  => 'css',
    'theme'     => 'monokai',
),

@iliman
Copy link
Contributor Author

iliman commented Jun 3, 2016

Yes, it's helped, thanks @dariodev.
But I think will be more correct to display some default value as it was before.

@x-bull
Copy link

x-bull commented Jun 3, 2016

Hi, yes the default value will be fine

@aristath
Copy link
Contributor

aristath commented Jun 5, 2016

fixed in the develop branch.

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

4 participants