Skip to content

Commit

Permalink
Merge pull request #11 from AyeCode/master
Browse files Browse the repository at this point in the history
0.1.31
  • Loading branch information
kprajapatii authored Oct 12, 2020
2 parents 426ae56 + 04b0550 commit 9b5fc61
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ayecode-ui-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
add_action('after_setup_theme', function () {
global $ayecode_ui_version,$ayecode_ui_file_key;
$this_version = "0.1.30";
$this_version = "0.1.31";
if(version_compare($this_version , $ayecode_ui_version, '>')){
$ayecode_ui_version = $this_version ;
$ayecode_ui_file_key = wp_hash( __FILE__ );
Expand Down
4 changes: 4 additions & 0 deletions change-log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= 0.1.31 =
* Multi-select not always adding [] to name attribute - FIXED
* Multi-select not checking if values is_array - FIXED

= 0.1.30 =
* Changes for theme check - CHANGED

Expand Down
2 changes: 1 addition & 1 deletion includes/class-aui.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AUI {
*
* @var string $ver The current version number.
*/
public static $ver = '0.1.30';
public static $ver = '0.1.31';

public static $options = null;

Expand Down
2 changes: 1 addition & 1 deletion includes/components/class-aui-component-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static function name($text,$multiple = false){
$output = '';

if($text){
$is_multiple = strpos($text, '[]') !== false ? '[]' : '';
$is_multiple = strpos($text, '[]') !== false || (strpos($text, '[]') === false && $multiple ) ? '[]' : '';
$output = ' name="'.sanitize_html_class($text).$is_multiple.'" ';
}

Expand Down
2 changes: 1 addition & 1 deletion includes/components/class-aui-component-input.php
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ public static function select($args = array()){
} else {
$option_label = isset($name['label']) ? $name['label'] : '';
$option_value = isset($name['value']) ? $name['value'] : '';
if(!empty($args['multiple']) && !empty($args['value'])){
if(!empty($args['multiple']) && !empty($args['value']) && is_array($args['value']) ){
$selected = in_array($option_value, stripslashes_deep($args['value'])) ? "selected" : "";
} elseif(!empty($args['value'])) {
$selected = selected($option_value,stripslashes_deep($args['value']), false);
Expand Down

0 comments on commit 9b5fc61

Please sign in to comment.