This is because you have used the checked()
function, which echoes its value, inside another echo statement. If you are adding a value to a string you need the function to return
a value. This can be done by setting the third argument, $echo
, to false
:
echo '<lable for="zoom_activity_state"> <input type="checkbox" name="zoom_activity_state" value="' . $zoom_activity_state . '" class="widefat" ' . checked($zoom_activity_state, true, false) . '/> Is comming soon?</lable>';
You’ve also spelt <label>
incorrectly:
echo '<label for="zoom_activity_state"> <input type="checkbox" name="zoom_activity_state" value="' . $zoom_activity_state . '" class="widefat" ' . checked($zoom_activity_state, true, false) . '/> Is comming soon?</label>';