<input type="text" name="mailusers_default_subject" style="width: 100%;" value="<?php echo format_to_edit(mailusers_get_default_subject()); ?> " size="80" /></td> </tr> <tr> <th><?php _e('Enhanced Recipient Selection', MAILUSERS_I18N_DOMAIN); ?> </th> <td> <input type="checkbox" name="mailusers_enhanced_recipient_selection" id="mailusers_enhanced_recipient_selection" value="true" <?php if (mailusers_get_enhanced_recipient_selection() == 'true') { echo 'checked="checked"'; } ?> ></input> <?php _e('Use jQuery enhanced Select boxes for recipient selection.', MAILUSERS_I18N_DOMAIN); ?> <br/> <i><small><?php _e('When enabled the <a href="http://harvesthq.github.io/chosen/">Chosen jQuery plugin</a> is applied to recipient selection lists.', MAILUSERS_I18N_DOMAIN); ?> </small></i> </td> </tr> <tr>
/** * mailusers_register_chosen() * * WordPress script registration for mailusers */ function mailusers_register_chosen() { if (mailusers_get_enhanced_recipient_selection()) { // Register the jQuery Chosen script from the plugin wp_register_script('mailusers-chosen', plugins_url(plugin_basename(dirname(__FILE__) . '/js/chosen/chosen.jquery.min.js')), array('jquery'), false, true); // Register the jQuery Chosen script from the plugin wp_register_script('mailusers', plugins_url(plugin_basename(dirname(__FILE__) . '/js/mailusers.js')), array('jquery', 'mailusers-chosen'), false, true); // Register the jQuery Chosen CSS from the plugin wp_register_style('mailusers-chosen', plugins_url(plugin_basename(dirname(__FILE__) . '/js/chosen/chosen.min.css'))); } }