Skip to content

Commit

Permalink
Set function to be specific for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWood committed Sep 30, 2016
1 parent b664c71 commit 82d2425
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public function get_settings_config() {
'id' => 'cat_list',
'name' => __( 'Category restrictions', 'content-warning-v2' ),
'desc' => __( 'Select categories that you would like to restrict with the dialog.', 'content-warning-v2' ),
'type' => 'select2',
'type' => 'select2_multi',
'options' => $this->get_cat_list()
),
),
Expand Down
10 changes: 5 additions & 5 deletions includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public function editor( $args = array() ) {
*
* @author JayWood
*/
public function select2( $args = array() ) {
public function select2_multi( $args = array() ) {
$args = $this->get_default_args( $args );

$field_id = $args['id'];
Expand All @@ -293,15 +293,15 @@ public function select2( $args = array() ) {
$option_value = get_option( $field_id, $field_id, $default );

?>
<select name="<?php echo $field_id; ?>" id="<?php echo $field_id; ?>" class="cwv2_select2">
<select name="<?php echo $field_id; ?>" id="<?php echo $field_id; ?>" class="cwv2_select2" 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; ?>
</select>
<?php




if ( ! empty( $description ) ) {
?><p class="description"><?php echo $description; ?></p><?php
}
}
}

0 comments on commit 82d2425

Please sign in to comment.