$shortcode ) { $return = ''; // Shortcode has atts if ( count( $shortcode['atts'] ) && $shortcode['atts'] ) { foreach ( $shortcode['atts'] as $attr_name => $attr_info ) { $prefix = isset( $attr_info['prefix'] ) ? sprintf( '%s', $attr_info['prefix'] ) : null; $return .= '

'; $return .= ''; $return .= ''.$attr_info['tip'].''; // Select if ( isset( $attr_info['values'] ) ) { // Select multiple if ('select_multiple' == $attr_info['type']) { $return .= ''; } $i = 0; foreach ( $attr_info['values'] as $attr_value ) { $attr_value_selected = ( $attr_info['default'] == $attr_value ) ? ' selected="selected"' : ''; $return .= ''; $i++; } $return .= ''; } else { $attr_field_type = isset( $attr_info['type'] ) ? $attr_info['type'] : 'text'; // image upload if ( 'media_upload' == $attr_info['type'] ) { $return .= ''; $return .= ''; } elseif ( 'color' == $attr_info['type'] ) { $return .= ''; } elseif ( 'text_area' == $attr_info['type'] ) { $return .= '