Use select2 for category selects now - #45
This commit is contained in:
@ -75,7 +75,10 @@ class CWV2_Admin {
|
||||
wp_enqueue_media();
|
||||
}
|
||||
|
||||
wp_enqueue_script( 'cwv2-admin', $this->plugin->url( "js/admin{$this->plugin->min}.js" ), array( 'jquery' ), $this->plugin->version, true );
|
||||
wp_enqueue_style( 'select2', $this->plugin->url( "lib/select2-4.0.3/css/select2{$this->plugin->min}.css" ), false, '4.0.3' );
|
||||
wp_enqueue_script( 'select2', $this->plugin->url( "lib/select2-4.0.3/js/select2{$this->plugin->min}.js" ), array( 'jquery' ), '4.0.3', true );
|
||||
|
||||
wp_enqueue_script( 'cwv2-admin', $this->plugin->url( "js/admin{$this->plugin->min}.js" ), array( 'select2' ), $this->plugin->version, true );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -293,7 +293,7 @@ class CWV2_Settings {
|
||||
$option_value = get_option( $field_id, $field_id, $default );
|
||||
|
||||
?>
|
||||
<select name="<?php echo $field_id; ?>" id="<?php echo $field_id; ?>" class="cwv2_select2" multiple="multiple">
|
||||
<select name="<?php echo $field_id; ?>" id="<?php echo $field_id; ?>" class="cwv2_select2 widefat" multiple="multiple">
|
||||
<?php foreach ( $options as $k => $v ) : ?>
|
||||
<option value="<?php echo $k; ?>" <?php $this->selected_array( $option_value, $k ); ?>><?php echo $v; ?></option>
|
||||
<?php endforeach; ?>
|
||||
|
Reference in New Issue
Block a user