I am currently working on a wordpress options page, checking if options are checked.
When i check with the following code the correct check boxes are selected, but next to the checkbox i get the following:
checked='checked'
Here is my code:
echo '<input name="wwo_enable_'.$lrole.'" type="checkbox" value="1" '.checked( '1', get_option( 'wwo_enable_'.$lrole ) ).' />';
And a screen shot to show what i mean:
The last parameter of the checked() function is whether it’s echo’d or not. Since it’s true by default you need to add the third parameter as false.
Should be able to switch this:
To this: