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

Resolve issue where we only get the first character of the label/value #486

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions helpers/cmb_Meta_Box_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,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