Function Reference/checked displaying checked='checked'
问题 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: 回答1: The last parameter of the checked() function is whether it's echo'd or not. Since it