Render input issue when value has false value

Support General Render input issue when value has false value

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2088
    tandoigaitandoigai
    Participant

    I'm making an option for padding top of the page. I created an option, type = text but it always render empty string when I set padding to 0.

    After digging into your code, I found that it's an issue in your code:

    meta-box/inc/field.php file

    render_attributes function

    When we check if ( $value ) we can never render value "0". I hope you can modify it to

    if ( $value!== false && $value !== null ) in the next version

    Hope this helps

    #2090
    Anh TranAnh Tran
    Keymaster

    Hi, I already fixed that in the development version. It will be included in the next version.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Render input issue when value has false value’ is closed to new replies.