We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When adding a Dimensions type field with default values and output as root css variables, the default values are overwritten with a null value.
5.0.0
theme_mods
options
Nothing
new \Kirki\Field\Dimensions( array( "description" => "", "priority" => 9999, "default" => array( "Vertical" => "20px", "Horizontal" => "20px" ), "capability" => "iris_manage_customizer", "option_type" => "option", "kirki_config" => "iris_customize_config", "label" => "Marges internes", "section" => "iris-section-main-button", "output" => array( array( "element" => ":root", "property" => "--iris--button--padding-y", "choice" => "Vertical", "context" => array( "editor", "front" ), ), array( "element" => ":root", "property" => "--iris--button--padding-x", "choice" => "Horizontal", "context" => array( "editor", "front" ) ) ), "settings" => "iris_customize_option_button_padding", "required" => array() ) );
In the init method of the kirki/kirki-packages/field-dimensions/src/Dimensions.php file, I tested two fixes from line 80:
init
kirki/kirki-packages/field-dimensions/src/Dimensions.php
new \Kirki\Field\Generic( wp_parse_args( array( + 'settings' => $args['settings'] . '-kirki-generic', 'type' => 'kirki-generic', 'default' => '', 'wrapper_opts' => array( 'gap' => 'small', ), 'sanitize_callback' => isset( $args['sanitize_callback'] ) ? $args['sanitize_callback'] : array( __CLASS__, 'sanitize' ), 'choices' => array( 'type' => 'hidden', 'parent_type' => 'kirki-dimensions', ), ), $args ) );
OR
new \Kirki\Field\Generic( wp_parse_args( array( 'type' => 'kirki-generic', + 'default' => isset( $args['default'] ) ? $args['default'] : '', 'wrapper_opts' => array( 'gap' => 'small', ), 'sanitize_callback' => isset( $args['sanitize_callback'] ) ? $args['sanitize_callback'] : array( __CLASS__, 'sanitize' ), 'choices' => array( 'type' => 'hidden', 'parent_type' => 'kirki-dimensions', ), ), $args ) );
Looking forward to a resolution, thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue description:
When adding a Dimensions type field with default values and output as root css variables, the default values are overwritten with a null value.
Version used:
5.0.0
Using
theme_mods
oroptions
?options
PHP error messages that might be related
JS error messages that might be related
Code to reproduce the issue (config + field(s))
In the
init
method of thekirki/kirki-packages/field-dimensions/src/Dimensions.php
file, I tested two fixes from line 80:OR
Looking forward to a resolution, thank you!
The text was updated successfully, but these errors were encountered: