Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Resolve issue where we only get the first character of the label/valu…
Browse files Browse the repository at this point in the history
…e. Props @mustardBees. Closes #486
  • Loading branch information
jtsternberg committed Mar 26, 2014
1 parent 8202eb5 commit 8f7da54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helpers/cmb_Meta_Box_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ public function concat_options( $args = array(), $method = 'list_input' ) {
foreach ( $options as $option_key => $option ) {

// Check for the "old" way
$opt_label = isset( $option['name'] ) ? $option['name'] : $option;
$opt_value = isset( $option['value'] ) ? $option['value'] : $option_key;
$opt_label = is_array( $option ) && array_key_exists( 'name', $option ) ? $option['name'] : $option;
$opt_value = is_array( $option ) && array_key_exists( 'value', $option ) ? $option['value'] : $option_key;
$selected = $value == $opt_value;

if ( ! empty( $args ) ) {
Expand Down

0 comments on commit 8f7da54

Please sign in to comment.