Skip to content

Commit

Permalink
Fix select_advanced with multiple=true adds empty selected option (ht…
Browse files Browse the repository at this point in the history
…tps://metabox.io/support/topic/select-advance-clone-issue/). Add style for select2 to match WP admin style.
  • Loading branch information
Anh committed Apr 26, 2016
1 parent 6b03b3f commit 77613e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions css/select-advanced.css
Expand Up @@ -2,7 +2,12 @@
height: auto;
min-width: 200px;
}

#post-body .rwmb-select-all {
#wpbody .rwmb-select-all {
display: block;
margin-top: 5px;
}
}
#wpbody .select2-selection--single,
#wpbody .select2-selection--multiple,
.select2-dropdown {
border-color: #ddd;
}
1 change: 0 additions & 1 deletion inc/fields/select-advanced.php
Expand Up @@ -51,7 +51,6 @@ public static function walk( $options, $db_fields, $meta, $field )
self::render_attributes( $attributes )
);

$output .= '<option></option>';
$output .= $walker->walk( $options, $field['flatten'] ? - 1 : 0 );
$output .= '</select>';
$output .= self::get_select_all_html( $field );
Expand Down

0 comments on commit 77613e8

Please sign in to comment.