Skip to content

Commit

Permalink
Use chosen drop downs in Bundle options. #965
Browse files Browse the repository at this point in the history
  • Loading branch information
pippinsplugins committed Dec 23, 2013
1 parent c0ee82b commit a4878de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/admin/downloads/metabox.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function edd_render_product_row( $product_id = 0, $post_id ) {

?>
<td>
<?php echo EDD()->html->product_dropdown( '_edd_bundled_products[]', $product_id ); ?>
<?php echo EDD()->html->product_dropdown( '_edd_bundled_products[]', $product_id, false, true ); ?>
</td>

<?php do_action( 'edd_product_table_row', $product_id, $post_id ); ?>
Expand Down
6 changes: 3 additions & 3 deletions includes/class-edd-html-elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function select( $args = array() ) {
if( $args['multiple'] ) {
$multiple = ' MULTIPLE';
} else {
$miltiple = '';
$multiple = '';
}

$output = '<select name="' . esc_attr( $args[ 'name' ] ) . '" id="' . esc_attr( sanitize_key( str_replace( '-', '_', $args[ 'name' ] ) ) ) . '" class="edd-select ' . esc_attr( $args[ 'class'] ) . '"' . $multiple . '>';
Expand All @@ -233,7 +233,7 @@ public function select( $args = array() ) {
if( $args['multiple'] ) {
$selected = selected( true, in_array( 0, $args['selected'] ), false );
} else {
$selected = selected( $args['selected'], $key, false );
$selected = selected( $args['selected'], 0, false );
}
$output .= '<option value="all"' . $selected . '>' . esc_html( $args[ 'show_option_all' ] ) . '</option>';
}
Expand All @@ -242,7 +242,7 @@ public function select( $args = array() ) {
if( $args['multiple'] ) {
$selected = selected( true, in_array( -1, $args['selected'] ), false );
} else {
$selected = selected( $args['selected'], $key, false );
$selected = selected( $args['selected'], -1, false );
}
$output .= '<option value="-1"' . $selected . '>' . esc_html( $args[ 'show_option_none' ] ) . '</option>';
}
Expand Down

0 comments on commit a4878de

Please sign in to comment.