tts = array(); foreach ($vars as $var) { $attribute = explode('=', $var); /**This Results in array seperated by = sign */ foreach ($attribute as $key => $value) { //Filtering Empty Values generated with such variable texts one,two=,,,=xx=one,,==two if( empty($value) ) unset($attribute[$key]); } if( empty($attribute) ) continue; /**After Unsetting Empty values above, any empty array still remains, so this line is skipping that */ $attribute = array_values($attribute); //resetting index to start with zero $default_value = (count($attribute) > 1) ? $attribute[1] : ''; /**Default values of vars, if set any */ $default_atts[$attribute[0]] = $default_value; /**Setting Default Atts for shortcode_atts */ } return $default_atts; } else{ return array(); } } }