Skip to content

Instantly share code, notes, and snippets.

@carlodaniele
Last active February 7, 2016 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlodaniele/ae3803cee6c559c63fd4 to your computer and use it in GitHub Desktop.
Save carlodaniele/ae3803cee6c559c63fd4 to your computer and use it in GitHub Desktop.
<h3><?php _e( 'Vitamins', 'food_example_plugin' ); ?></h3>
<p>
<input type="checkbox" name="vitamins[]" value="Vitamin A" <?php checked( ( in_array( 'Vitamin A', $current_vitamins ) ) ? 'Vitamin A' : '', 'Vitamin A' ); ?> />Vitamin A <br />
<input type="checkbox" name="vitamins[]" value="Thiamin (B1)" <?php checked( ( in_array( 'Thiamin (B1)', $current_vitamins ) ) ? 'Thiamin (B1)' : '', 'Thiamin (B1)' ); ?> />Thiamin (B1) <br />
<!-- more vitamins here -->
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment