Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27006, comment 5


Ignore:
Timestamp:
02/06/2014 10:36:49 PM (12 years ago)
Author:
chriseverson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27006, comment 5

    initial v1  
    11Replying to [comment:4 nacin]:
    22> Replying to [comment:3 chriseverson]:
    3 > > Just submitted a patch. Next step will be to look into the root of the issue in the {{{checked()}}}  function.
    4 >
    5 > Thanks for the patch, chriseverson!
    6 >
    7 > The issue is that checked() is explicit — it wants true === true, not just 'on' == true. (Or more accurately, it converts both to a string and then does a comparison. 'on' does not equal '1'.) checked() isn't the problem here.
    83>
    94> Rather, our ugly code that sets this $new_user_send_password variable simply sets it to the value of `$_POST['send_password']` if it's set, or false if it's not. Checkboxes without values in the HTML end up receiving 'on' as a value.