示例#1
0
			<h2>' . __('Magic Grid Settings', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</h2>
			<form method="POST" action="">
				<input type="hidden" name="update_settings" value="Y" />';
$tab_title = '<ul>';
foreach ($pw_woo_ad_search_grid_options_part as $option_part) {
    $tab_title .= '<li><a href="#' . $option_part['id'] . '">' . $option_part['title'] . '</a></li>';
}
$tab_title .= '</ul>';
echo '<div id="pw_woo_ad_search_tabs">' . $tab_title;
foreach ($pw_woo_ad_search_grid_options_part as $option_part) {
    echo '<div id="' . $option_part['id'] . '">';
    echo '<table class="form-table">';
    $this_part_variable = ${$option_part}['variable'];
    foreach ($this_part_variable as $field) {
        if (isset($field['dependency'])) {
            echo pw_woo_ad_search_dependency($field['id'], $field['dependency']);
        }
        // get value of this field if it exists for this post
        $meta = get_option($field['id']);
        // begin a table row with
        $style = '';
        if ($field['type'] == 'notype') {
            $style = 'style="border-bottom:solid 1px #ccc"';
        }
        echo '<tr class="' . $field['id'] . '_field" ' . $style . '> 
		
					<th><label for="' . $field['id'] . '">' . $field['label'] . '</label></th> 
					<td>';
        switch ($field['type']) {
            case 'notype':
                echo '<span class="description">' . $field['desc'] . '</span>';
function ad_search_grid_layout_setting()
{
    global $ad_search_grid_layout_setting, $post;
    // Use nonce for verification
    $html = '<input type="hidden" name="show_custom_meta_box_woo_ad_search_grid_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />';
    // Begin the field table and loop
    $html .= '<table class="form-table" id="pw_woo_ad_search_frontend_setting">';
    foreach ($ad_search_grid_layout_setting as $field) {
        //IF FAVORITE STICKY DISABLED
        if (($field['id'] == __PW_WOO_AD_SEARCH_FIELDS_PERFIX__ . 'show_favorite' || $field['id'] == __PW_WOO_AD_SEARCH_FIELDS_PERFIX__ . 'favorite_icon_color') && get_option(__PW_WOO_AD_SEARCH_FIELDS_PERFIX__ . 'option_enable_favorite_use') == '') {
            continue;
        }
        if (isset($field['dependency'])) {
            $html .= pw_woo_ad_search_dependency($field['id'], $field['dependency']);
        }
        // get value of this field if it exists for this post
        $meta = get_post_meta($post->ID, $field['id'], true);
        // begin a table row with
        $style = '';
        if ($field['type'] == 'notype') {
            $style = 'style="border-bottom:solid 1px #ccc"';
        }
        $html .= '<tr class="' . $field['id'] . '_field" ' . $style . '> 

						<th><label for="' . $field['id'] . '">' . $field['label'] . '</label></th> 
						<td>';
        switch ($field['type']) {
            case 'notype':
                $html .= '<span class="description">' . $field['desc'] . '</span>';
                break;
            case 'text':
                $html .= '<input type="text" name="' . $field['id'] . '" id="' . $field['id'] . '" value="' . $meta . '" />
								<br /><span class="description">' . $field['desc'] . '</span>	';
                break;
            case 'radio':
                foreach ($field['options'] as $option) {
                    $html .= '<input type="radio" name="' . $field['id'] . '" value="' . $option['value'] . '" ' . checked($meta, $option['value'], 0) . ' ' . $option['checked'] . ' /> 
											<label for="' . $option['value'] . '">' . $option['label'] . '</label><br><br>';
                }
                break;
            case 'select':
                $html .= '<select name="' . $field['id'] . '" id="' . $field['id'] . '" style="width: 170px;">';
                foreach ($field['options'] as $option) {
                    $html .= '<option ' . selected($meta, $option['value'], 0) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
                }
                $html .= '</select><br /><span class="description">' . $field['desc'] . '</span>';
                break;
            case 'numeric':
                $default_value = isset($field['value']) ? $field['value'] : "";
                $html .= '
								<input type="number" name="' . $field['id'] . '" id="' . $field['id'] . '" value="' . ($meta == '' ? $default_value : $meta) . '" size="30" class="width_170" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />
	';
                $html .= '
									<br /><span class="description">' . $field['desc'] . '</span>';
                break;
            case 'checkbox':
                if (isset($field['options']) && is_array($field['options'])) {
                    foreach ($field['options'] as $option) {
                        $checked = '';
                        if (is_array($meta) && in_array($option['value'], $meta)) {
                            $checked = 'checked';
                        }
                        $html .= '<input type="checkbox" name="' . $field['id'] . '[]" value="' . $option['value'] . '" ' . $checked . ' /> 
												<label for="' . $option['value'] . '">' . $option['label'] . '</label><br><br>';
                    }
                } else {
                    $html .= '<input type="checkbox" name="' . $field['id'] . '" id="' . $field['id'] . '" ' . checked($meta, "on", 0) . '"/>';
                }
                $html .= '<br /><span class="description">' . $field['desc'] . '</span>';
                break;
            case 'icon_type':
                $html .= '<input type="hidden" id="' . $field['id'] . '_font_icon" name="' . $field['id'] . '" value="' . $meta . '"/>';
                $html .= '<div class="' . $field['id'] . ' pw_iconpicker_grid" id="benefit_image_icon">';
                $html .= (include __PW_ROOT_WOO_AD_SEARCH__ . '/includes/font-awesome.php');
                $html .= '</div>';
                $output = '
								<script type="text/javascript"> 
									jQuery(document).ready(function(jQuery){';
                if ($meta == '') {
                    $meta = "fa-none";
                }
                $output .= 'jQuery( ".' . $field['id'] . ' .' . $meta . '" ).siblings( ".active" ).removeClass( "active" );
										jQuery( ".' . $field['id'] . ' .' . $meta . '" ).addClass("active");';
                $output .= '
										jQuery(".' . $field['id'] . ' i").click(function(){
											var val=(jQuery(this).attr("class").split(" ")[0]!="fa-none" ? jQuery(this).attr("class").split(" ")[0]:"");
											jQuery("#' . $field['id'] . '_font_icon").val(val);
											jQuery(this).siblings( ".active" ).removeClass( "active" );
											jQuery(this).addClass("active");
										});
									});
								</script>';
                $html .= $output;
                break;
            case 'pw_custom_search_fields':
                $html .= '
									<label class="pw_showhide" for="displayProduct-title"><input name="' . $field['id'] . '[add_cart]" type="checkbox" ' . (is_array($meta) && in_array("add_cart", $meta) ? "CHECKED" : "") . ' value="add_cart" id="pw_add_cart_btn">' . __('Add to Cart', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-title"><input name="' . $field['id'] . '[title]" type="checkbox" ' . (is_array($meta) && in_array("title", $meta) ? "CHECKED" : "") . ' value="title">' . __('Title', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-excerpt"><input name="' . $field['id'] . '[excerpt]" type="checkbox" ' . (is_array($meta) && in_array("excerpt", $meta) ? "CHECKED" : "") . ' value="excerpt" class="displayProduct-eneble">' . __('Excerpt', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' 
									</label>                                    
									
									<label class="pw_showhide" for="displayProduct-image"><input name="' . $field['id'] . '[thumbnail]" type="checkbox" ' . (is_array($meta) && in_array("thumbnail", $meta) ? "CHECKED" : "") . ' value="thumbnail" class="displayProduct-eneble">' . __('Image', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>                            
									
									<label class="pw_showhide" for="displayProduct-price"><input name="' . $field['id'] . '[price]" type="checkbox" ' . (is_array($meta) && in_array("price", $meta) ? "CHECKED" : "") . ' value="price" class="displayProduct-eneble">' . __('Price', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>                            
									
									<label class="pw_showhide" for="displayProduct-star"><input name="' . $field['id'] . '[star]" type="checkbox" ' . (is_array($meta) && in_array("star", $meta) ? "CHECKED" : "") . ' value="star" class="displayProduct-eneble">' . __('Star', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>                                    
									
									<label class="pw_showhide" for="displayProduct-sku"><input name="' . $field['id'] . '[sku]" type="checkbox" ' . (is_array($meta) && in_array("sku", $meta) ? "CHECKED" : "") . ' value="sku">' . __('SKU', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-metacategory"><input name="' . $field['id'] . '[category]" type="checkbox" ' . (is_array($meta) && in_array("category", $meta) ? "CHECKED" : "") . ' value="category">' . __('Category', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-metatag"><input name="' . $field['id'] . '[tag]" type="checkbox" ' . (is_array($meta) && in_array("tag", $meta) ? "CHECKED" : "") . ' value="tag">' . __('Tag', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-featured"><input name="' . $field['id'] . '[featured]" type="checkbox" ' . (is_array($meta) && in_array("featured", $meta) ? "CHECKED" : "") . ' value="featured" class="displayProduct-eneble">' . __('Featured', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									<label class="pw_showhide" for="displayProduct-sale"><input name="' . $field['id'] . '[sale]" type="checkbox" ' . (is_array($meta) && in_array("sale", $meta) ? "CHECKED" : "") . ' value="sale" class="displayProduct-eneble">' . __('Sale', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									
									<label class="pw_showhide" for="displayProduct-outofstock"><input name="' . $field['id'] . '[out_stock]" type="checkbox" ' . (is_array($meta) && in_array("stock_status", $meta) ? "CHECKED" : "") . ' value="stock_status">' . __('Stock Status', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>

								';
                break;
            case 'font_select':
                $html .= '
								<select name="' . $field['id'] . '" id="' . $field['id'] . '">                                                <option value="Droid+Sans">Droid Sans</option>                                                <option value="Source+Sans+Pro">Source Sans Pro</option>                                                <option value="Source+Sans+Pro">Nixie One</option>                                                <option value="Signika+Negative">Signika Negative</option>                                                <option value="Lato">Lato</option>                                                <option value="Lora">Lora</option>                                                <option value="PT+Sans+Narrow">PT Sans Narrow</option>                                                <option value="Ubuntu">Ubuntu</option>                                                <option value="Contrail+One">Contrail One</option>                                                <option value="Bitter">Bitter</option>                                                <option value="Lobster">Lobster</option>                                                <option value="Shadows+Into+Light">Shadows Into Light</option>                                                <option value="Libre+Baskerville">Libre Baskerville</option>                                                <option value="Open+Sans">Open Sans</option>                                                <option value="Open+Sans+Condensed">Open Sans Condensed</option>                                                <option value="Varela+Round">Varela Round</option>                                                <option value="Cinzel">Cinzel</option>                                                <option value="Comfortaa">Comfortaa</option>                                                <option value="Doppio+One">Doppio+One</option>                                        </select>
								';
                break;
            case 'color_picker':
                $default_value = isset($field['value']) ? $field['value'] : "#fc5b5b";
                $html .= '<div class="medium-lbl-cnt">
										<label for="' . $field['id'] . '-color" class="full-label">' . $field['label'] . '</label><input name="' . $field['id'] . '" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="' . ($meta != '' ? $meta : $default_value) . '" data-default-color="' . $default_value . '">
									 </div>';
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>
								';
                break;
            case 'pw_custom_color_set':
                $html .= '
								<a class="set-color" rel="theme1"><span style="background-color:#fc5b5b"></span><span style="background-color:#27872b"></span><span style="background-color:#8224e3"></span><span style="background-color:#d34dd6"></span><span style="background-color:#1e1e1e"></span><span style="background-color:#c44f46"></span><span style="background-color:#50a9e0"></span><span style="background-color:#bf4465"></span><span style="background-color:#4a74ce"></span><span style="background-color:#262626"></span></a>
								
								<a class="set-color" rel="theme2"><span style="background-color:#4bcd36"></span><span style="background-color:#28cedb"></span><span style="background-color:#96ffdd"></span><span style="background-color:#dda6a6"></span><span style="background-color:#fff600"></span><span style="background-color:#afff4f"></span><span style="background-color:#fd6af0"></span><span style="background-color:#fd6a70"></span><span style="background-color:#ffffff"></span><span style="background-color:#ffb73a"></span></a>
								
								<a class="set-color" rel="theme8"><span style="background-color:#1abc9c"></span><span style="background-color:#2ecc71"></span><span style="background-color:#3498db"></span><span style="background-color:#9b59b6"></span><span style="background-color:#34495e"></span><span style="background-color:#16a085"></span><span style="background-color:#e74c3c"></span><span style="background-color:#e67e22"></span><span style="background-color:#c0392b"></span><span style="background-color:#7f8c8d"></span></a>
								
								<a class="set-color" rel="theme8"><span style="background-color:#95a5a6"></span><span style="background-color:#ffffff"></span><span style="background-color:#bdc3c7"></span><span style="background-color:#ecf0f1"></span><span style="background-color:#f39c12"></span><span style="background-color:#f1c40f"></span><span style="background-color:#96ffdd"></span><span style="background-color:#afff4f"></span><span style="background-color:#7f8c8d"></span><span style="background-color:#e8c0df"></span></a>
								<br />
								';
                $html .= '
								<input name="' . $field['id'] . '[c0]" id="color_set_0" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c0']) . '" data-default-color="#fc5b5b">			
								
								<input name="' . $field['id'] . '[c1]" id="color_set_1" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c1']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c2]" id="color_set_2" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c2']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c3]" id="color_set_3" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c3']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c4]" id="color_set_4" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c4']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c5]" id="color_set_5" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c5']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c6]" id="color_set_6" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c6']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c7]" id="color_set_7" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c7']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c8]" id="color_set_8" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c8']) . '" data-default-color="#fc5b5b">
								
								<input name="' . $field['id'] . '[c9]" id="color_set_9" type="text" class="color_set wp_ad_picker_color" value="' . ($meta == '' ? "#fc5b5b" : $meta['c9']) . '" data-default-color="#fc5b5b">
								
								';
                $html .= '
								<script type="text/javascript">
								
									function hexc(colorval) {
										var parts = colorval.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);
										delete(parts[0]);
										for (var i = 1; i <= 3; ++i) {
											parts[i] = parseInt(parts[i]).toString(16);
											if (parts[i].length == 1) parts[i] = "0" + parts[i];
										}
										color = "#" + parts.join("");
										return color;
									}
									
									jQuery(document).ready(function($) {   
										jQuery(".set-color").click(function(){
											jQuery(this).find("span").each(function(index, elem){
												var $color=hexc(jQuery(elem).css("backgroundColor"));
												jQuery("#color_set_"+index).val($color);
												jQuery("#color_set_"+index).wpColorPicker("color",$color);
											});
										});
									});
								</script>
								';
                break;
            case 'pw_custom_border_set':
                if (!isset($meta['color'])) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
											<input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="#dddddd" data-default-color="#dddddd">
										  </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
											<input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										  </div>';
                }
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>';
                $border_type = array('solid', 'dotted', 'dashed', 'none', 'hidden', 'double', 'groove', 'ridge', 'inset', 'outset', 'initial', 'inherit');
                $html .= '
								<div class="medium-lbl-cnt">
									<label for="' . $field['id'] . '" class="full-label">' . __('Type', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									<select name="' . $field['id'] . '[type]" id="' . $field['id'] . '">';
                foreach ($border_type as $b_type) {
                    if (is_array($meta)) {
                        $html .= '<option value="' . $b_type . '" ' . selected($b_type, $meta['type'], 0) . '>' . $b_type . '</option>';
                    } else {
                        $html .= '<option value="' . $b_type . '" >' . $b_type . '</option>';
                    }
                }
                $html .= '</select>
								</div>';
                $html .= '
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Top', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </label>
									<input type="number" name="' . $field['id'] . '[top]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['top']) . '" size="1"  min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </span>
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Right', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[right]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['right']) . '" size="1" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '  </span>
								</div>	
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Bottom', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[bottom]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['bottom']) . '" size="1" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span> 
								</div>
								<div class="small-lbl-cnt">								
									<label for="' . $field['id'] . '" class="small-label">' . __('Left', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[left]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['left']) . '" size="1" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>';
                break;
            case "pw_custom_border_radius_set":
                $html .= '
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Top', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[top]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['top']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span> 
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Right', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[right]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['right']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Bottom', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[bottom]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['bottom']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Left', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[left]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['left']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>';
                break;
            case "pw_custom_padding_set":
                $html .= '
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Top', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[top]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['top']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
								<div class="small-lbl-cnt"> 
									<label for="' . $field['id'] . '" class="small-label">' . __('Right', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[right]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['right']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Bottom', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[bottom]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['bottom']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Left', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[left]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['left']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
	';
                break;
            case "pw_custom_margin_set":
                $html .= '
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Top', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[top]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['top']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Right', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[right]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['right']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Bottom', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[bottom]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['bottom']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
								</div>
								<div class="small-lbl-cnt">
									<label for="' . $field['id'] . '" class="small-label">' . __('Left', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[left]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['left']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>';
                break;
                /*case "pw_custom_overlay_set":
                							{
                								if(!isset($meta['color']))
                								{
                									$html.= '<label for="'.$field['id'].'-color">'.__('Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[color]" id="'.$field['id'].'-color" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">';
                									$html.= '<label for="'.$field['id'].'-hover">'.__('Hover Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[hcolor]" id="'.$field['id'].'-hover" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">';
                								}
                								else{
                									$html.= '<label for="'.$field['id'].'-color">'.__('Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[color]" id="'.$field['id'].'" type="text" class="wp_ad_picker_color" value="'.$meta['color'].'" data-default-color="#'.$meta['color'].'">';	
                									$html.= '<label for="'.$field['id'].'-hover">'.__('Hover Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[hcolor]" id="'.$field['id'].'" type="text" class="wp_ad_picker_color" value="'.$meta['hcolor'].'" data-default-color="#'.$meta['hcolor'].'">';	
                								}
                								$html.= '
                								<script type="text/javascript">
                									jQuery(document).ready(function($) {   
                										//jQuery(".wp_ad_picker_color").wpColorPicker();
                									});
                								</script>
                								<br />';
                								
                								$html.= '
                								<label for="'.$field['id'].'">- '.__('Opacity',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<input type="number" name="'.$field['id'].'[opacity]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['opacity']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="'.__('Only Digits!',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'" class="input-text qty text" /> - 
                								<label for="'.$field['id'].'">'.__('Effect',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<select name="'.$field['id'].'[effect]" id="'.$field['id'].'" class="vc_border-style"><option value="solid">Effect 1</option><option value="solid">Effect 2</option><option value="dotted">Effect 3</option><option value="dashed">Effect 4</option><option value="none">Effect 5</option><option value="hidden">Effect 6</option><option value="double">Effect 7</option><option value="groove">Effect 8</option></select> <br />
                								Padding :
                								<label for="'.$field['id'].'" class="small-label">'.__('Top',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<input type="number" name="'.$field['id'].'[padding-top]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-top']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
                								<label for="'.$field['id'].'" class="small-label">'.__('Right',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<input type="number" name="'.$field['id'].'[padding-right]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-right']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
                								
                								<label for="'.$field['id'].'" class="small-label">'.__('Bottom',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<input type="number" name="'.$field['id'].'[padding-bottom]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-bottom']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
                								
                								<label for="'.$field['id'].'" class="small-label">'.__('Left',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
                								<input type="number" name="'.$field['id'].'[padding-left]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-left']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'
                	';
                							}
                							break;
                							*/
            /*case "pw_custom_overlay_set":
            							{
            								if(!isset($meta['color']))
            								{
            									$html.= '<label for="'.$field['id'].'-color">'.__('Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[color]" id="'.$field['id'].'-color" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">';
            									$html.= '<label for="'.$field['id'].'-hover">'.__('Hover Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[hcolor]" id="'.$field['id'].'-hover" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">';
            								}
            								else{
            									$html.= '<label for="'.$field['id'].'-color">'.__('Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[color]" id="'.$field['id'].'" type="text" class="wp_ad_picker_color" value="'.$meta['color'].'" data-default-color="#'.$meta['color'].'">';	
            									$html.= '<label for="'.$field['id'].'-hover">'.__('Hover Color',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label><input name="'.$field['id'].'[hcolor]" id="'.$field['id'].'" type="text" class="wp_ad_picker_color" value="'.$meta['hcolor'].'" data-default-color="#'.$meta['hcolor'].'">';	
            								}
            								$html.= '
            								<script type="text/javascript">
            									jQuery(document).ready(function($) {   
            										//jQuery(".wp_ad_picker_color").wpColorPicker();
            									});
            								</script>
            								<br />';
            								
            								$html.= '
            								<label for="'.$field['id'].'">- '.__('Opacity',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<input type="number" name="'.$field['id'].'[opacity]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['opacity']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="'.__('Only Digits!',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'" class="input-text qty text" /> - 
            								<label for="'.$field['id'].'">'.__('Effect',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<select name="'.$field['id'].'[effect]" id="'.$field['id'].'" class="vc_border-style"><option value="solid">Effect 1</option><option value="solid">Effect 2</option><option value="dotted">Effect 3</option><option value="dashed">Effect 4</option><option value="none">Effect 5</option><option value="hidden">Effect 6</option><option value="double">Effect 7</option><option value="groove">Effect 8</option></select> <br />
            								Padding :
            								<label for="'.$field['id'].'" class="small-label">'.__('Top',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<input type="number" name="'.$field['id'].'[padding-top]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-top']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
            								<label for="'.$field['id'].'" class="small-label">'.__('Right',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<input type="number" name="'.$field['id'].'[padding-right]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-right']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
            								
            								<label for="'.$field['id'].'" class="small-label">'.__('Bottom',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<input type="number" name="'.$field['id'].'[padding-bottom]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-bottom']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'  
            								
            								<label for="'.$field['id'].'" class="small-label">'.__('Left',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'</label>
            								<input type="number" name="'.$field['id'].'[padding-left]" id="'.$field['id'].'" value="'.($meta=='' ? "0":$meta['padding-left']).'" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" />'.__('px',__PW_WOO_AD_SEARCH_TEXTDOMAIN__).'
            	';
            							}
            							break;
            							*/
            case "pw_custom_font_set":
                if (!isset($meta['color'])) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#333333" data-default-color="#333333">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[hcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">
										  </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[hcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['hcolor'] . '" data-default-color="#' . $meta['hcolor'] . '">
										  </div>';
                }
                $html .= '<div class="medium-lbl-cnt">
										<label for="' . $field['id'] . '" class="full-label">' . __('Size', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
										<input type="number" name="' . $field['id'] . '[size]" id="' . $field['id'] . '" value="' . ($meta == '' ? "13" : $meta['size']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
									  </div>
									  <div class="medium-lbl-cnt">
										<label for="' . $field['id'] . '" class="full-label">' . __('Font Family', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
										<select name="' . $field['id'] . '[font-family]" id="' . $field['id'] . '-family"><option value="inherit">Inherit</option>' . pw_woo_ad_get_google_fonts(isset($meta['font-family']) ? $meta['font-family'] : '') . '</select>
										<script type="text/javascript">
											function pw_search_isNumber(n) {
											  return !isNaN(parseFloat(n)) && isFinite(n);
											}
											jQuery(document).ready(function(){
												
												if(jQuery("#' . $field['id'] . '-family").val()!="inherit")
												{
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery("#' . $field['id'] . '-family").val()+"\\" />");	
													var $font_family=jQuery("#' . $field['id'] . '-family").val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
													}
													
													jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
												}
												
												jQuery("#' . $field['id'] . '-family").change(function(){
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery(this).val()+"\\" />");	
													
													var $font_family=jQuery(this).val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery(this).find(":selected").text());
													}
												});
												
											});
										
										</script>
										<p class="pw-check-font-' . $field['id'] . '-family">Grumpy wizards make toxic brew for the evil Queen and Jack.</p>
									  </div>';
                break;
            case "pw_custom_general_font_set":
                if (!isset($meta['color'])) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#333333" data-default-color="#333333">
										  </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										</div>';
                }
                $html .= '<div class="medium-lbl-cnt">
										<label for="' . $field['id'] . '" class="full-label">' . __('Size', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
										<input type="number" name="' . $field['id'] . '[size]" id="' . $field['id'] . '" value="' . ($meta == '' ? "13" : $meta['size']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
									  </div>
									  <div class="medium-lbl-cnt">
									  	<label for="' . $field['id'] . '" class="full-label">' . __('Font Family', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>								
										<select name="' . $field['id'] . '[font-family]" id="' . $field['id'] . '-family"><option value="inherit">Inherit</option>' . pw_woo_ad_get_google_fonts(isset($meta['font-family']) ? $meta['font-family'] : '') . '</select>
										
										
										<script type="text/javascript">
											function pw_search_isNumber(n) {
										  		return !isNaN(parseFloat(n)) && isFinite(n);
											}
											jQuery(document).ready(function(){
												
											
												if(jQuery("#' . $field['id'] . '-family").val()!="inherit")
												{
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery("#' . $field['id'] . '-family").val()+"\\" />");	
													var $font_family=jQuery("#' . $field['id'] . '-family").val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
													}
													
													jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
												}
												
												jQuery("#' . $field['id'] . '-family").change(function(){
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery(this).val()+"\\" />");	
													
													var $font_family=jQuery(this).val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery(this).find(":selected").text());
													}
												});
												
											});
										
										</script>
										<p class="pw-check-font-' . $field['id'] . '-family">Grumpy wizards make toxic brew for the evil Queen and Jack.</p>
									  </div>';
                break;
            case "pw_custom_banner_font_set":
                if (!isset($meta['color'])) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-BgColor" class="full-label">' . __('Background Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bgcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#81af3f" data-default-color="#81af3f">
										  </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-BgColor" class="full-label">' . __('Background Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bgcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['bgcolor'] . '" data-default-color="#' . $meta['bgcolor'] . '">
										</div>';
                }
                $html .= '
								<div class="medium-lbl-cnt">
									<label for="' . $field['id'] . '" class="full-label">' . __('Size', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<input type="number" name="' . $field['id'] . '[size]" id="' . $field['id'] . '" value="' . ($meta == '' ? "13" : $meta['size']) . '" size="1" style="width:50px" min="0" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="' . __('Only Digits!', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
								</div>
								<div class="medium-lbl-cnt">
									<label for="' . $field['id'] . '" class="full-label">' . __('Font Family', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
									<select name="' . $field['id'] . '[font-family]" id="' . $field['id'] . '-family"><option value="inherit">Inherit</option>' . pw_woo_ad_get_google_fonts(isset($meta['font-family']) ? $meta['font-family'] : '') . '</select>
									
									<script type="text/javascript">
											function pw_search_isNumber(n) {
												return !isNaN(parseFloat(n)) && isFinite(n);
											}
											jQuery(document).ready(function(){
												
												if(jQuery("#' . $field['id'] . '-family").val()!="inherit")
												{
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery("#' . $field['id'] . '-family").val()+"\\" />");	
													var $font_family=jQuery("#' . $field['id'] . '-family").val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
													}
													
													jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery("#' . $field['id'] . '-family").find(":selected").text());
												}
												
												jQuery("#' . $field['id'] . '-family").change(function(){
													jQuery("head").append("<link rel=\\"stylesheet\\" href=\\"http://fonts.googleapis.com/css?family="+jQuery(this).val()+"\\" />");	
													
													var $font_family=jQuery(this).val();
													var $font_arr=$font_family.split(":");
													if($font_arr.length>0 && pw_search_isNumber($font_arr[1]))
													{
														$font_weight=$font_arr[1];
														$font_name=$font_arr[0].replace("+"," ");
														jQuery(".pw-check-font-' . $field['id'] . '-family").css({"font-family":$font_name,"font-weight":$font_weight});
													}else
													{
														jQuery(".pw-check-font-' . $field['id'] . '-family").css("font-family",jQuery(this).find(":selected").text());
													}
												});
												
											});
										
										</script>
										<p class="pw-check-font-' . $field['id'] . '-family">Grumpy wizards make toxic brew for the evil Queen and Jack.</p>
								</div>';
                break;
            case "pw_custom_box_shadow_set":
                if (is_array($meta)) {
                    $html .= '
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Horizontal Length', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[hor-len]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['hor-len']) . '" size="1" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </span>
										</div>	
										<div class="medium-lbl-cnt"> 
											<label for="' . $field['id'] . '" class="full-label">' . __('Vertical Length', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[ver-len]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['ver-len']) . '" size="1" style="width:50px" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . ' </span> 
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Blur Radius', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[blur-radius]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['blur-radius']) . '" size="1" style="width:50px" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '  </span>
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Spread Radius', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[spread-radius]" id="' . $field['id'] . '" value="' . ($meta == '' ? "0" : $meta['spread-radius']) . '" size="1" style="width:50px" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Shadow Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Opacity', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[opacity]" id="' . $field['id'] . '">
												<option value="0.1" ' . selected($meta['opacity'], '0.1', 0) . '>0.1</option>
												<option value="0.2" ' . selected($meta['opacity'], '0.2', 0) . '>0.2</option>
												<option value="0.3" ' . selected($meta['opacity'], '0.3', 0) . '>0.3</option>
												<option value="0.4" ' . selected($meta['opacity'], '0.4', 0) . '>0.4</option>
												<option value="0.5" ' . selected($meta['opacity'], '0.5', 0) . '>0.5</option>
												<option value="0.6" ' . selected($meta['opacity'], '0.6', 0) . '>0.6</option>
												<option value="0.7" ' . selected($meta['opacity'], '0.7', 0) . '>0.7</option>
												<option value="0.8" ' . selected($meta['opacity'], '0.8', 0) . '>0.8</option>
												<option value="0.9" ' . selected($meta['opacity'], '0.9', 0) . '>0.9</option>
												<option value="1" ' . selected($meta['opacity'], '1', 0) . '>1</option>
											</select>
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Type', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[type]" id="' . $field['id'] . '">
												<option value="outline" ' . selected($meta['type'], 'outline', 0) . '>Outline</option>
												<option value="inset" ' . selected($meta['type'], 'inset', 0) . '>Inset</option>
											</select>
										</div>
									<span class="description">' . $field['desc'] . '</span>
									';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Horizontal Length', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[hor-len]" id="' . $field['id'] . '" size="1" style="width:50px" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>  
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Vertical Length', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[ver-len]" id="' . $field['id'] . '"  size="1" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
										</div>  
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Blur Radius', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[blur-radius]" id="' . $field['id'] . '"  size="1"  pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
										</div>
										<div class="medium-lbl-cnt">  
											<label for="' . $field['id'] . '" class="full-label">' . __('Spread Radius', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<input type="number" name="' . $field['id'] . '[spread-radius]" id="' . $field['id'] . '"  size="1" style="width:50px" pattern="[-+]?[0-9]*[.,]?[0-9]+" title="Only Digits!" class="input-text qty text" /><span class="input-unit">' . __('px', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</span>
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Shadow Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Opacity', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[opacity]" id="' . $field['id'] . '">
												<option value="0.1">0.1</option>
												<option value="0.2">0.2</option>
												<option value="0.3">0.3</option>
												<option value="0.4">0.4</option>
												<option value="0.5">0.5</option>
												<option value="0.6">0.6</option>
												<option value="0.7">0.7</option>
												<option value="0.8">0.8</option>
												<option value="0.9">0.9</option>
												<option value="1">1</option>
											</select>
									
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Type', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[type]" id="' . $field['id'] . '">
												<option value="outline" >Outline</option>
												<option value="inset" >Inset</option>
											</select>
										</div>
									<span class="description">' . $field['desc'] . '</span>
									';
                }
                break;
            case "pw_custom_box_background_set":
                if (!is_array($meta)) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-from]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										</div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-to]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										 </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-from]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color-from'] . '" data-default-color="#' . $meta['color-from'] . '">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-to]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color-to'] . '" data-default-color="#' . $meta['color-to'] . '">
										  </div>';
                }
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>

								';
                break;
            case "pw_custom_box_background_overlay_set":
                if (!is_array($meta)) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-from]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										</div>
									
									<div class="medium-lbl-cnt">
										<label for="' . $field['id'] . '" class="full-label">' . __('Opacity', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
										<select name="' . $field['id'] . '[opacity]" id="' . $field['id'] . '">
											<option value="0.1" >0.1</option>
											<option value="0.2" >0.2</option>
											<option value="0.3" >0.3</option>
											<option value="0.4" >0.4</option>
											<option value="0.5" >0.5</option>
											<option value="0.6" >0.6</option>
											<option value="0.7" >0.7</option>
											<option value="0.8" >0.8</option>
											<option value="0.9" >0.9</option>
											<option value="1" >1</option>
										</select>
									</div>
									';
                } else {
                    $html .= '<div class="medium-lbl-cnt" >
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color-from]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color-from'] . '" data-default-color="#' . $meta['color-from'] . '">
										</div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '" class="full-label">' . __('Opacity', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[opacity]" id="' . $field['id'] . '">
												<option value="0.1" ' . selected($meta['opacity'], '0.1', 0) . '>0.1</option>
												<option value="0.2" ' . selected($meta['opacity'], '0.2', 0) . '>0.2</option>
												<option value="0.3" ' . selected($meta['opacity'], '0.3', 0) . '>0.3</option>
												<option value="0.4" ' . selected($meta['opacity'], '0.4', 0) . '>0.4</option>
												<option value="0.5" ' . selected($meta['opacity'], '0.5', 0) . '>0.5</option>
												<option value="0.6" ' . selected($meta['opacity'], '0.6', 0) . '>0.6</option>
												<option value="0.7" ' . selected($meta['opacity'], '0.7', 0) . '>0.7</option>
												<option value="0.8" ' . selected($meta['opacity'], '0.8', 0) . '>0.8</option>
												<option value="0.9" ' . selected($meta['opacity'], '0.9', 0) . '>0.9</option>
												<option value="1" ' . selected($meta['opacity'], '1', 0) . '>1</option>
											</select>
										</div>';
                }
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>

								';
                break;
            case "upload":
                $image = '';
                $image = __PW_WOO_AD_SEARCH_URL__ . '/assets/images/pw-transparent.gif';
                if ($meta) {
                    $image = wp_get_attachment_image_src($meta, 'medium');
                    $image = $image[0];
                }
                $html .= '<input name="' . $field['id'] . '" id="' . $field['id'] . '" type="hidden" class="custom_upload_image" value="' . (isset($meta) ? $meta : '') . '" /> 
										<img src="' . $image . '" class="custom_preview_image" alt="" />
										<input name="btn_' . $field['id'] . '" class="pw_woo_search_upload_image_button button" type="button" value="' . __('Choose Image', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '" />
										<button type="button" class="pw_woo_ad_search_remove_image_button button">' . __('Remove image', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</button>';
                break;
            case "pw_custom_btn_set":
                if (!is_array($meta)) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Background Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bg-color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">
										</div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Background Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bg-hcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#fc5b5b" data-default-color="#fc5b5b">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Text Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[text-color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Text Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[text-hcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#ffffff" data-default-color="#ffffff">
										 </div>
										<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Type', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[type]" id="' . $field['id'] . '">
												<option value="outline-btn" >' . __('Outline Button', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</option>
												<option value="back-btn">' . __('Background Button', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</option>
											</select>
										</div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Background Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bg-color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['bg-color'] . '" data-default-color="#' . $meta['bg-color'] . '">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Background Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[bg-hcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['bg-hcolor'] . '" data-default-color="#' . $meta['bg-hcolor'] . '">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Text Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[text-color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['text-color'] . '" data-default-color="#' . $meta['text-color'] . '">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Text Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[text-hcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['text-hcolor'] . '" data-default-color="#' . $meta['text-hcolor'] . '">
										 </div>
										 <div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Type', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label>
											<select name="' . $field['id'] . '[type]" id="' . $field['id'] . '">
												<option value="outline-btn" ' . selected("outline-btn", $meta['type'], 0) . '>' . __('Outline Button', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</option>
												<option value="back-btn" ' . selected("back-btn", $meta['type'], 0) . '>' . __('Back Button', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</option>
											</select>
										</div>
									';
                }
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>

								';
                break;
            case "pw_favorite_color_set":
                if (!is_array($meta)) {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#333333" data-default-color="#333333">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[hcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#212121" data-default-color="#212121">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-active-color" class="full-label">' . __('Active Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[active-color]" id="' . $field['id'] . '-color" type="text" class="wp_ad_picker_color" value="#81af3f" data-default-color="#81af3f">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-active-hover" class="full-label">' . __('Active Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[active-hcolor]" id="' . $field['id'] . '-hover" type="text" class="wp_ad_picker_color" value="#212121" data-default-color="#212121">
										 </div>';
                } else {
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-color" class="full-label">' . __('Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['color'] . '" data-default-color="#' . $meta['color'] . '">
										 </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-hover" class="full-label">' . __('Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[hcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['hcolor'] . '" data-default-color="#' . $meta['hcolor'] . '">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-active-color" class="full-label">' . __('Active Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[active-color]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['active-color'] . '" data-default-color="#' . $meta['active-color'] . '">
										  </div>';
                    $html .= '<div class="medium-lbl-cnt">
											<label for="' . $field['id'] . '-active-hover" class="full-label">' . __('Active Hover Color', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</label><input name="' . $field['id'] . '[active-hcolor]" id="' . $field['id'] . '" type="text" class="wp_ad_picker_color" value="' . $meta['active-hcolor'] . '" data-default-color="#' . $meta['active-hcolor'] . '">
										  </div>';
                }
                $html .= '
								<script type="text/javascript">
									jQuery(document).ready(function($) {   
										//jQuery(".wp_ad_picker_color").wpColorPicker();
									});
								</script>

								';
                break;
            case 'preset_frontend':
                $html .= '
								<div class="build_query_loading_back"><div id="build_query_loading" ><i class="fa fa-refresh fa-spin"></i> ' . __('Please Wait to Load Data ... !', __PW_WOO_AD_SEARCH_TEXTDOMAIN__) . '</div></div>';
                $html .= '<div>';
                $html .= (include __PW_ROOT_WOO_AD_SEARCH__ . '/includes/preset-frontend.php');
                $html .= '</div>';
                $output = '
								<script type="text/javascript"> 
									function hexc(colorval) {
										var parts = colorval.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);
										delete(parts[0]);
										for (var i = 1; i <= 3; ++i) {
											parts[i] = parseInt(parts[i]).toString(16);
											if (parts[i].length == 1) parts[i] = "0" + parts[i];
										}
										color = "#" + parts.join("");
										return color;
									}
									jQuery(document).ready(function(jQuery){
										jQuery(".' . $field['id'] . '").find(".link-icon").click(function(e){
											e.preventDefault();
											var $filename=jQuery(this).attr("data-name")+".xml";
											var $source_type="from_xml";
											if(jQuery(this).attr("data-name")=="")
											{
												var $filename=jQuery(this).attr("data-id");
												$source_type="from_database";
											}
											
											jQuery(".build_query_loading_back").show();
											jQuery.post(
												ajaxurl,
												{
													action       : "pw_woo_ad_search_preset_frontend",
													xml_filename : $filename,
													source_type	 : $source_type	
												},
												function(response){
													
													jQuery("input:checkbox[name*=\\"item_fields\\"]").each(function(i){
														jQuery(this).prop("checked", false);
													});
													
													jQuery.each(response, function (key, data) {
														if(jQuery.isPlainObject(data))
														{
															//confirm("array - "+key);
															jQuery.each(data, function (keys, data) {
																var element_type=jQuery("[name=\\""+key+"["+keys+"]\\"]").prop("tagName");
																var element_type=typeof element_type !== "undefined" ? element_type.toLowerCase() : "";
																if(element_type=="input")
																{
																	element_type=jQuery("input[name=\\""+key+"["+keys+"]\\"]").attr("type");
																}
																//confirm(key+"---"+element_type);
	
																switch(element_type)
																{
																	case "text":
																		jQuery("input[name=\\""+key+"["+keys+"]\\"]").val(data);
																		if(jQuery("input[name=\\""+key+"["+keys+"]\\"]").hasClass("wp_ad_picker_color")){
																			jQuery("input[name=\\""+key+"["+keys+"]\\"]").wpColorPicker("color",data);
																			
																		}
																	break;
																	
																	case "number":
																		jQuery("input[name=\\""+key+"["+keys+"]\\"]").val(data);
																	break;
																	
																	case "select":
																		jQuery("select[name=\\""+key+"["+keys+"]\\"]").val(data);
																		jQuery("select[name=\\""+key+"["+keys+"]\\"]").trigger("change");
																	break;
																	
																	case "checkbox":
																		//confirm(keys);
																		
																		jQuery("input[name=\\""+key+"["+keys+"]\\"]").prop("checked", true);
																		jQuery("input[name=\\""+key+"["+keys+"]\\"]").trigger("change");
																	break;
																}
																
															});
														}else
														{
															
															var element_type=jQuery("[name=\\""+key+"\\"]").prop("tagName");
															var element_type=typeof element_type !== "undefined" ? element_type.toLowerCase() : "";
															if(element_type=="input")
															{
																element_type=jQuery("input[name=\\""+key+"\\"]").attr("type");
															}
															
															//confirm(key+"---"+element_type);

															switch(element_type)
															{
																case "text":
																	jQuery("input[name=\\""+key+"\\"]").val(data);
																		if(jQuery("input[name=\\""+key+"\\"]").hasClass("wp_ad_picker_color")){
																			jQuery("input[name=\\""+key+"\\"]").wpColorPicker("color",data);
																		}
																break;
																
																case "number":
																	jQuery("input[name=\\""+key+"\\"]").val(data);
																break;
																
																case "select":
																	jQuery("select[name=\\""+key+"\\"]").val(data);
																	jQuery("select[name=\\""+key+"\\"]").trigger("change");
																break;
																
																case "checkbox":
																	if(data=="on")
																		jQuery("input[name=\\""+key+"\\"]").prop("checked", true);
																	else
																		jQuery("input[name=\\""+key+"\\"]").prop("checked", false);											
																	jQuery("input[name=\\""+key+"\\"]").trigger("change");	
																break;
															}
														}
													});
													
													jQuery(".build_query_loading_back").slideUp();
												}
											);	
											jQuery(this).parent().siblings( ".active" ).removeClass( "active" );
											jQuery(this).parent().addClass("active");
										});
									});
								</script>';
                $html .= $output;
                break;
        }
        //end switch
        $html .= '</td></tr>';
    }
    // end foreach
    $html .= '</table>';
    // end table
    return $html;
}