public
Last active

Snippet for WPSE

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<?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
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.