Code Monkey home page Code Monkey logo

Comments (6)

 avatar commented on May 29, 2024

Please try v1.3.2 ( you can check the Updates page ) and let us know if the bug is still there.

from unyson.

 avatar commented on May 29, 2024

thanks, options are coming now from default values. but without styles, only checkboxes. (i am not updating framework-customizations folder, so maybe it is related to me.)

also there is second issue , my first checkbox default value is false, second checkbox value is true.
i check first and make it true, check second and make it false. and save.

on refresh, my two checkboxes are true valued. if it is true, it is not saving it to db.

from unyson.

 avatar commented on May 29, 2024

but without styles, only checkboxes

Sorry, please update to v1.3.3

my first checkbox default value is false, second checkbox value is true.
i check first and make it true, check second and make it false. and save.

on refresh, my two checkboxes are true valued

I can't reproduce that. Maybe you can give us the options array you are using.

from unyson.

 avatar commented on May 29, 2024
'wpml_switcher' => array(
    'label' => __('Language Selector Visibility', 'pudeco'),
    'desc' => __('Toggle language selector of the header on or off ( WPML Required )', 'pudeco'),
    'type' => 'switch',
    'value' => 'false',
    'left-choice' => array(
        'value' => 'false',
        'label' => __('False', 'fw'),
    ),
    'right-choice' => array(
        'value' => 'true',
        'label' => __('True', 'fw'),
    ),
),
'woocommerce_switcher' => array(
    'label' => __('Shopping Cart Visibility', 'pudeco'),
    'desc' => __('Toggle shopping cart on or off ( WooCommerce Required )', 'pudeco'),
    'type' => 'switch',
    'value' => 'true',
    'left-choice' => array(
        'value' => 'false',
        'label' => __('False', 'fw'),
    ),
    'right-choice' => array(
        'value' => 'true',
        'label' => __('True', 'fw'),
    ),
),

from unyson.

 avatar commented on May 29, 2024

thanks,
with style fix, second issue is also fixed.

from unyson.

MikeiLL avatar MikeiLL commented on May 29, 2024

@pudeco Thank you for sharing your code. I actually found a bug in it which is that whereas:

'wpml_switcher' => array(
    'label' => __('Language Selector Visibility', 'pudeco'),
    'desc' => __('Toggle language selector of the header on or off ( WPML Required )', 'pudeco'),
    'type' => 'switch',
)

returns a php boolean value (1, 0), the above code returns a string. So that in the view, $atts['wpml_switcher'] would not be able to be used to test for a true value (because the string 'false' is true. Substituting 1 for 'true' and 0 for 'false' instead is working for me.

from unyson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.