We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When setting multiple on true (by types select and chosen), nothing happends. Here is a quick fix, it might not be perfect, but it does work.
Add this under line 19 in meta-boxe.php $multiple = isset($field['multiple']) ? $field['multiple'] : null;
$multiple = isset($field['multiple']) ? $field['multiple'] : null;
Then replace the code between line 67 and 75:
// select, chosen case 'select': case 'chosen': if(isset($multiple)) : // multiple echo '<select name="' . esc_attr($name) . '[]" multiple id="' . esc_attr($id) . '"', $type == 'chosen' ? ' class="chosen"' : '', '>'; foreach ($options as $option) : if(is_array($meta) && in_array($option['value'], $meta)) : echo '<option selected value="' . $option['value'] . '">' . $option['label'] . '</option>'; else : echo '<option value="' . $option['value'] . '">' . $option['label'] . '</option>'; endif; endforeach; echo '</select>'; else : // normal select echo '<select name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '"' , $type == 'chosen' ? ' class="chosen"' : '' , isset( $multiple ) && $multiple == true ? ' multiple="multiple"' : '' , '> <option value="">Select One</option>'; // Select One foreach ( $options as $option ) echo '<option' . selected( $meta, $option['value'], false ) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>'; echo '</select><br />' . $desc; endif; break;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When setting multiple on true (by types select and chosen), nothing happends. Here is a quick fix, it might not be perfect, but it does work.
Add this under line 19 in meta-boxe.php
$multiple = isset($field['multiple']) ? $field['multiple'] : null;
Then replace the code between line 67 and 75:
The text was updated successfully, but these errors were encountered: