Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
<h3><?php _e( 'Vitamins', 'food_example_plugin' ); ?></h3>
<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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.