Skip to content

Instantly share code, notes, and snippets.

@Mamaduka
Created August 20, 2012 12:16
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 Mamaduka/3403629 to your computer and use it in GitHub Desktop.
Save Mamaduka/3403629 to your computer and use it in GitHub Desktop.
Snippet for WPSE
<?php
// Setting Field with multiple checkboxes
function mamaduka_settings_field() {
$options = get_option( 'georgian_keyboard_options' );
?>
<input name="georgian_keyboard_options[user-element-on-comment]" type="checkbox" id="georgian_keyboard_options[user-element-on-comment]" value="1" <?php checked( 1, $options['user-element-on-comment'] ); ?> />
<span><?php _e( 'Use Georgian when writing in comment field', 'georgiankeyboard' ); ?></span>
<br />
<input name="georgian_keyboard_options[user-element-on-author]" type="checkbox" id="georgian_keyboard_options[user-element-on-author]" value="1" <?php checked( 1, $options['user-element-on-author'] ); ?> />
<span><?php _e( 'Use Georgian when writing in author field', 'georgiankeyboard' ); ?></span>
<br />
<input name="georgian_keyboard_options[user-element-on-search]" type="checkbox" id="georgian_keyboard_options[user-element-on-search]" value="1" <?php checked( 1, $options['user-element-on-search'] ); ?> />
<span><?php _e( 'Use Georgian when writing in search field', 'georgiankeyboard' ); ?></span>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment