function button_sc($atts, $content = null)
{
    extract(shortcode_atts(array('size' => 'medium', 'href' => '#', 'bgcolor' => '#555555', 'fontcolor' => '#FFFFFF', 'text' => 'Button text'), $atts));
    $height = "";
    switch ($size) {
        case 'medium':
            $height = 32;
            break;
        case 'small':
            $height = 24;
            break;
        case 'big':
            $height = 48;
            break;
    }
    $bgcolor_light = colourBrightness($bgcolor, '0.82');
    $bgcolor_gradient = new gradient_image($bgcolor_light, $bgcolor, 32, 5, $height);
    $bgcolor_gradient_reserve = new gradient_image($bgcolor, $bgcolor_light, 32, 5, $height);
    $bgcolor_new_grd = $bgcolor_gradient->createPNG(false, true);
    $bgcolor_new_grd_reserve = $bgcolor_gradient_reserve->createPNG(false, true);
    $bgcolor_border = colourBrightness($bgcolor, '-0.8');
    $bgcolor_innerShadow = colourBrightness($bgcolor_light, '0.8');
    ob_start();
    $randum = _wip_randomAlphaNum();
    $objectID = 'wip-button-' . $randum;
    $hexYou = sc_HexToRGB($bgcolor_border);
    $hexUsed = implode(',', $hexYou);
    $return = '<style type="text/css">#' . $objectID . '{background: ' . $bgcolor . '  url("data:image/png;base64,' . base64_encode($bgcolor_new_grd) . '") scroll left top repeat-x; color: ' . $fontcolor . '; border: 1px solid ' . $bgcolor_border . '; -box-shadow: inset 0px 1px 0px ' . $bgcolor_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0px 1px 0px ' . $bgcolor_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2); -moz-box-shadow: inset 0px 1px 0px ' . $bgcolor_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2); text-shadow: 0px -1px 0px rgba(' . $hexUsed . ', .7); } #' . $objectID . ':hover{background: ' . $bgcolor . '  url("data:image/png;base64,' . base64_encode($bgcolor_new_grd_reserve) . '") scroll left bottom repeat-x; color: ' . $fontcolor . '; } </style>';
    $return .= '<a id="' . $objectID . '" class="' . $size . '-button button-shortcode" href="' . $href . '">' . stripslashes($text) . '</a>';
    echo $return;
    $button = ob_get_clean();
    return $button;
}
Exemplo n.º 2
0
function write_custom_css($section = 'font-family')
{
    switch ($section) {
        case 'font-family':
            $font_text = get_template_directory() . '/css/custom/font-family.css';
            $write_to = '/** ===== font style ===== */ ' . "\n";
            $write_to .= get_font_embed_css(get_wip_option_by('bd_body_font', 'Droid Sans')) . "\n";
            $write_to .= get_font_embed_css(get_wip_option_by('bd_heading_font', 'Droid Serif')) . "\n";
            $write_to .= get_font_embed_css(get_wip_option_by('bd_menu_font', 'Droid Sans')) . "\n";
            $write_to .= 'body,
input,textarea,select,button,
ul.news_widget_style li h3{
	' . get_font_family_by_name(get_wip_option_by('bd_body_font', 'Droid Sans')) . '
}' . "\n";
            $write_to .= 'h1,h2,h3,h4,h5,h6, .amount{
	' . get_font_family_by_name(get_wip_option_by('bd_heading_font', 'Droid Serif')) . '
}
ul#main-nav{
	' . get_font_family_by_name(get_wip_option_by('bd_menu_font', 'Droid Serif')) . '
}' . "\n";
            @file_put_contents($font_text, $write_to);
            break;
        case 'body-background':
            $body_text = get_template_directory() . '/css/custom/body-css.css';
            $write_to = 'body{
	background-color : #' . get_wip_option_by('bd_allbackgroundcolor', 'e6e6e6') . ';
	' . (get_option('bd_allbackgroundimage') != "" ? 'background-image: url(' . get_option('bd_allbackgroundimage') . ');' : '') . '
	' . (get_option('bd_allbackgroundimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_allbackground_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_allbackgroundimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_allbackground_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_allbackgroundimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_allbackground_bg_repeat', 'repeat')) . ';' : '') . '
}' . "\n";
            @file_put_contents($body_text, $write_to);
            break;
        case 'general-css':
            $general_text = get_template_directory() . '/css/custom/general-css.css';
            $selectBorder = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '-0.85');
            $selectBorderLightDark = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '-0.95');
            $selectBorderDark = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '-0.65');
            $selectBg = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '0.65');
            $form_bg = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '0.85');
            $table_bg = colourBrightness('#' . get_wip_option_by('bd_content_bgColor', 'FFFFFF'), '0.88');
            $defaultsubmit_orig = '#' . get_option('bd_defaultbuttonbgcolor');
            $defaultsubmit_light = colourBrightness($defaultsubmit_orig, '0.88');
            $defaultsubmit_gradient = new gradient_image($defaultsubmit_light, $defaultsubmit_orig, 32, 5, 30);
            $defaultsubmit_gradient_reserve = new gradient_image($defaultsubmit_orig, $defaultsubmit_light, 32, 5, 30);
            $defaultsubmit_new_grd = $defaultsubmit_gradient->createPNG(false, true);
            $defaultsubmit_new_grd_reserve = $defaultsubmit_gradient_reserve->createPNG(false, true);
            $defaultsubmit_border = colourBrightness($defaultsubmit_orig, '-0.8');
            $defaultsubmit_innerShadow = colourBrightness($defaultsubmit_light, '0.8');
            $tag_border = colourBrightness('#' . get_wip_option_by('bd_general_link_color', '28a3d1'), '-0.8');
            $sidebar_title_bg = '#' . get_wip_option_by('bd_sidebar_title_bg', '888888');
            $sidebar_title_bg_dark = colourBrightness($sidebar_title_bg, '-0.88');
            $sidebar_title_bg_grad = new gradient_image($sidebar_title_bg, $sidebar_title_bg_dark, 32, 5, 40);
            $sidebar_title_bg_grad_new = $sidebar_title_bg_grad->createPNG(false, true);
            $write_to = '/** ===== general color style ===== */ ' . "\n";
            $write_to .= 'body{
	color : #' . get_wip_option_by('bd_body_fontcolor', '737373') . ';
}
#main-inner-site input[type=text], 
#main-inner-site input[type=password], 
#main-inner-site input[type=file], 
#main-inner-site textarea, 
#main-inner-site select{
	background-color: ' . $form_bg . ';
	color: #' . get_wip_option_by('bd_body_fontcolor', '737373') . ';
}' . "\n";
            $write_to .= 'h1,h2,h3,h4,h5,h6{
	color : #' . get_wip_option_by('bd_heading_fontcolor', '333333') . ';
}' . "\n";
            $write_to .= 'a,
a>h3{
	color : #' . get_wip_option_by('bd_general_link_color', '28a3d1') . ';
}' . "\n";
            $write_to .= 'a:hover,
a>h3:hover{
	color : #' . get_wip_option_by('bd_general_link_hovercolor', '999999') . ';
}' . "\n";
            $write_to .= 'blockquote,
.quote_left,
.quote_right{
	color : #' . get_wip_option_by('bd_blockquote_color', '999999') . ';
}
a.button,
.sidebarbox a.button,
input[type="submit"],
button[type="submit"],
table.cart td.actions a.checkout-button{
	background: #' . get_wip_option_by('bd_defaultbuttonbgcolor', '777777') . '  url("data:image/png;base64,' . base64_encode($defaultsubmit_new_grd) . '") scroll left top repeat-x;
	color: #' . get_wip_option_by('bd_defaultbuttoncolor', 'FFFFFF') . ';
	border: 1px solid ' . $defaultsubmit_border . ';
	-box-shadow: inset 0px 1px 0px ' . $defaultsubmit_innerShadow . ', 0 1px 2px rgba(0, 0, 0, 0.08);
	-webkit-box-shadow: inset 0px 1px 0px ' . $defaultsubmit_innerShadow . ', 0 1px 2px rgba(0, 0, 0, 0.08);
	-moz-box-shadow: inset 0px 1px 0px ' . $defaultsubmit_innerShadow . ', 0 1px 2px rgba(0, 0, 0, 0.08);
	text-shadow: 0px -1px 0px ' . $defaultsubmit_border . ';
}
a.button:hover,
.sidebarbox a.button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
table.cart td.actions a.checkout-button:hover{
	background: #' . get_wip_option_by('bd_defaultbuttonbgcolor', '777777') . '  url("data:image/png;base64,' . base64_encode($defaultsubmit_new_grd_reserve) . '") scroll left bottom repeat-x;
	color: #' . get_wip_option_by('bd_defaultbuttoncolor', 'FFFFFF') . '!important;
}
input, select, textarea{
	border-top-color:' . $selectBorderLightDark . ';
	border-left-color:' . $selectBorderLightDark . ';
	border-bottom-color: ' . $selectBorder . ';
	border-right-color: ' . $selectBorder . ';
}' . "\n";
            $write_to .= '#main-inner-site,
.wip-product-single-page .product_meta{
	background-color : #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
#main-inner-site table td,
.col-1,
.col-2{
	background-color: ' . $table_bg . ';
}
.dividers a,
.woocommerce-account form h3{
	background-color: #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
.sidebarbox h3.sidebar-title{
	background: #' . get_wip_option_by('bd_sidebar_title_bg', '888888') . '  url("data:image/png;base64,' . base64_encode($sidebar_title_bg_grad_new) . '") scroll left top repeat-x;
	color: #' . get_wip_option_by('bd_sidebar_title_color', 'FFFFFF') . ';
}
#single-page-title{
	background-color : #' . get_wip_option_by('bd_innerpage_title_bgColor', 'FFFFFF') . ';
	' . (get_option('bd_innerpage_title_bgimage') != "" ? 'background-image: url(' . get_option('bd_innerpage_title_bgimage') . ');' : '') . '
	' . (get_option('bd_innerpage_title_bgimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_innerpage_title_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_innerpage_title_bgimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_innerpage_title_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_innerpage_title_bgimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_innerpage_title_bg_repeat', 'repeat')) . ';' : '') . '
}
#single-page-title h1{
	color: #' . get_wip_option_by('bd_innerpage_title_fontcolor', '444444') . ';
	font-style: ' . get_wip_option_by('bd_innerpage_title_fontstyle', 'normal') . ';
	font-weight: ' . get_wip_option_by('bd_innerpage_title_fontweight', 'normal') . ';
	text-transform: ' . get_wip_option_by('bd_innerpage_title_texttransform', 'none') . ';
}
.tagcloud a{
	background: #' . get_wip_option_by('bd_general_link_color', '28a3d1') . ';
	border-color: ' . $tag_border . ';
	color : #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
table#wp-calendar caption,
table#wp-calendar tfoot tr td{
	border-color: ' . $selectBorder . ';
	background-color: ' . $selectBg . ';
}
table#wp-calendar thead th{
	border-color: ' . $selectBorder . ';
}
table#wp-calendar tbody td{
	border-color: ' . $selectBorderLightDark . ';
	background-color: ' . $selectBg . ';
}
.selectBox-dropdown,
.selectBox-dropdown-menu,
.selectBox-inline{
	background-color: ' . $form_bg . ';
	border: solid 1px ' . $selectBorder . ';
	color : #' . get_wip_option_by('bd_body_fontcolor', '737373') . ';
}
.selectBox-dropdown .selectBox-arrow{
	border-left: solid 1px ' . $selectBorder . ';
}
.selectBox-dropdown:focus,
.selectBox-dropdown:focus .selectBox-arrow{
	border-color: ' . $selectBorder . ';
}
div.product .woocommerce_tabs ul.tabs li a,
.wip_tab ul.tab-lists li a{
	color : #' . get_wip_option_by('bd_heading_fontcolor', '333333') . ';
}
div.product .woocommerce_tabs ul.tabs li.active,
div.product .woocommerce_tabs .panel,
.wip_tab ul.tab-lists li.active,
.wip_tab .panes,
div.related.products h2 span,
div.upsells.products h2 span,
#blog-related h2 span,
#portfolio-related h2 span{
	background-color : #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
div.product .woocommerce_tabs .panel table.shop_attributes tr,
div.product table.group_table tr{
	border-bottom: 1px solid #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
div.product div.quantity input[name="quantity"],
div.product div.quantity input.input-text.qty,
input.input-text.qty{
	border-top: 1px solid ' . $selectBorderLightDark . ';
	border-bottom: 1px solid ' . $selectBorderLightDark . ';
}
.jspTrack{
	background: ' . $selectBorderLightDark . ';
}
.jspDrag{
	background: ' . $selectBorderDark . ';
}
#reviews #comments ol.commentlist li img,
#reviews #comments ol.commentlist li .comment-text,
ol.commentlist li .comment_entries,
.single-blog-entry #respond,
#review_form,
.toggle_container,
.woo_product_content form.cart,
.woo_product_content div[itemprop="description"],
#product_gallery_and_summary .images a[itemprop="image"],
.product_lists_thumbnail,
.sidebarbox{
	background-color: ' . $table_bg . ';
	border-top-color:' . $selectBorderLightDark . ';
	border-left-color:' . $selectBorderLightDark . ';
	border-bottom-color: ' . $selectBorder . ';
	border-right-color: ' . $selectBorder . ';
}
.sidebarbox a{
	color: #' . get_wip_option_by('bd_sidebar_link_color', '888888') . ';
}
.sidebarbox a:hover{
	color: #' . get_wip_option_by('bd_sidebar_link_color_hover', 'e83e00') . ';
}
.wp-caption,
.gallery-icon a img{
	background-color: ' . $table_bg . '!important;
	border-top-color:' . $selectBorderLightDark . '!important;
	border-left-color:' . $selectBorderLightDark . '!important;
	border-bottom-color: ' . $selectBorder . '!important;
	border-right-color: ' . $selectBorder . '!important;	
}
div.variations_button div.quantity{
	border-color: ' . $table_bg . ';
}
.comment_entries .commentmetadata{
	border-bottom-color: ' . $selectBorder . ';
}
#woo_checkout_tab_process{
	background-color: ' . $table_bg . ';
	border-color: ' . $selectBorder . ';
}
#woo_checkout_tab_process ul li a{
	color: ' . $selectBorderDark . ';
}
#woo_checkout_tab_process ul li.viewed a,
#woo_checkout_tab_process ul li a:hover{
	color : #' . get_wip_option_by('bd_general_link_color', '28a3d1') . ';
}
.addresses header.title,
.addresses .col-1 address,
.addresses .col-2 address,
.woocommerce-account form,
.woocommerce-checkout form.login,
.woocommerce-checkout form.wip-login,
table.shop_table thead,
table.shop_table tbody,
.cart_totals table,
#customer_details .col-1,
#customer_details .col-2{
	border-top-color:' . $selectBorderLightDark . ';
	border-left-color:' . $selectBorderLightDark . ';
	border-bottom-color: ' . $selectBorder . ';
	border-right-color: ' . $selectBorder . ';
}
#customer_details .col-1 h3:first-child,
#customer_details .col-2 h3,
.single-blog-entry #respond h3#reply-title,
#review_form #respond h3#reply-title,
.toggle_container h3.toggle_title{
	border-bottom-color: ' . $selectBorder . ';
}
.toggle_container h3.toggle_title{
	background-color : #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
table.shop_table thead th{
	border-left-color:' . $selectBorder . ';
}
table.shop_table tbody td{
	border-left-color:' . $selectBorderLightDark . ';
	border-top-color:' . $selectBorderLightDark . ';
}
.cart_totals,
.shipping_calculator .shipping-calculator-form{
	border: 1px solid ' . $selectBorderLightDark . ';
}
.cart_totals h2,
form.shipping_calculator h2{
	background-color : #' . get_wip_option_by('bd_content_bgColor', 'FFFFFF') . ';
}
.cart_totals table th{
	border-top-color: ' . $selectBorder . ';
}
.cart_totals table td,
ul.products li h3.product-title-on-lists{
	border-top-color: ' . $selectBorderLightDark . ';
}' . "\n";
            @file_put_contents($general_text, $write_to);
            break;
        case 'header-css':
            $header_text = get_template_directory() . '/css/custom/header-css.css';
            $topUtBorder = colourBrightness('#' . get_wip_option_by('bd_searchwrap_bgColor', '333333'), '-0.85');
            $write_to = '/** ===== header skin ===== */ ' . "\n";
            $write_to .= '#top{
	background-color : #' . get_wip_option_by('bd_header_bgColor', 'FAFAFA') . ';
	' . (get_option('bd_headerbgimage') != "" ? 'background-image: url(' . get_option('bd_headerbgimage') . ');' : '') . '
	' . (get_option('bd_headerbgimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_header_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_headerbgimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_header_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_headerbgimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_header_bg_repeat', 'repeat')) . ';' : '') . '
}
#top-utilitize a{
	color : #' . get_wip_option_by('bd_toplinkcolor', 'E3E3E3') . ';
}
#top-utilitize a:hover{
	color : #' . get_wip_option_by('bd_toplinkhovercolor', 'AAAAAA') . ';
}
#search-form-top input[type="text"]{
	color : #' . get_wip_option_by('bd_searchcolor', 'E3E3E3') . ';
} 
#main-site{
	border-top: 2px solid #' . get_wip_option_by('bd_header_bgLine', '28a3d1') . ';
}' . "\n";
            @file_put_contents($header_text, $write_to);
            break;
        case 'menu-css':
            $menu_text = get_template_directory() . '/css/custom/menu-css.css';
            $write_to = '/** ===== menu skin ===== */ ' . "\n";
            $write_to .= '#site-nav{
	background-color: #' . get_wip_option_by('bd_menuparentbg', 'F9F9F9') . ';
}
#main-nav li a{
	color: #' . get_wip_option_by('bd_menuparentcolor', '888888') . ';
	background-color: #' . get_wip_option_by('bd_menuparentbg', 'F9F9F9') . ';
}
#main-nav li a:hover,
#main-nav li a.pageactive,
#main-nav li.onhove a.onhov{
	color: #' . get_wip_option_by('bd_menuparenthovercolor', '444444') . ';
}
#main-nav li ul a, #main-nav li.onhove ul a, 
#main-nav li.onhove li.onhove ul a, 
#main-nav li.onhove li.onhove li.onhove ul a{
	color: #' . get_wip_option_by('bd_menudropdowncolor', '888888') . ';
	background-color: #' . get_wip_option_by('bd_menudropdownbg', 'FAFAFA') . ';
}
#main-nav li ul a:hover, #main-nav li.onhove ul a:hover, 
#main-nav li.onhove li.onhove ul a:hover, 
#main-nav li.onhove li.onhove li.onhove ul a:hover,
#main-nav ul li.onhove a.onhov,
#main-nav ul ul li.onhove a.onhov,
#main-nav ul ul ul li.onhove a.onhov{
	background-color: #' . get_wip_option_by('bd_menudropdownbghover', 'F8F8F8') . ';
	color: #' . get_wip_option_by('bd_menudropdownhovercolor', '666666') . ';
}
#main-nav li ul a.pageactive, #main-nav li.onhove ul a.pageactive,
#main-nav li.onhove li.onhove ul a.pageactive, 
#main-nav li.onhove li.onhove li.onhove ul a.pageactive,
#main-nav ul li.onhove a.onhov.pageactive,
#main-nav ul ul li.onhove a.onhov.pageactive,
#main-nav ul ul ul li.onhove a.onhov.pageactive{
	background-color: #' . get_wip_option_by('bd_menudropdownbghover', 'F8F8F8') . ';
	color: #' . get_wip_option_by('bd_menudropdownhovercolor', '666666') . ';
}' . "\n";
            @file_put_contents($menu_text, $write_to);
            break;
        case 'topcart-css':
            $topcart_text = get_template_directory() . '/css/custom/topcart-css.css';
            $tocart_defaultbg = '#' . get_option('bd_topcartbg');
            $topcart_Border = colourBrightness('#' . get_wip_option_by('bd_topcartbg', '333333'), '-0.85');
            $topcart_dropbg = '#' . get_wip_option_by('bd_topcartdropdownbg', 'cdd1d4');
            $topcartButton_orig = '#' . get_option('bd_topcartdropbuttonbg');
            $topcartButton_light = colourBrightness($topcartButton_orig, '0.90');
            $topcartButton_gradient = new gradient_image($topcartButton_light, $topcartButton_orig, 32, 5, 40);
            $topcartButton_gradient_reserve = new gradient_image($topcartButton_orig, $topcartButton_light, 32, 5, 40);
            $topcartButton_new_grd = $topcartButton_gradient->createPNG(false, true);
            $topcartButton_new_grd_reserve = $topcartButton_gradient_reserve->createPNG(false, true);
            $topcartButton_border = colourBrightness($topcart_dropbg, '-0.7');
            $topcartButton_innerShadow = colourBrightness($topcartButton_light, '0.92');
            $write_to = '/** ===== top shopping cart skin ===== */ ' . "\n";
            $write_to .= '#wip_woo_cart{
	background: ' . $tocart_defaultbg . ';
	border-color: ' . $topcart_Border . ';
}
.wip_woo_inner_cart .top_cart_text{
	color: #' . get_wip_option_by('bd_topcartnumbercolor', 'FFFFFF') . ';
}
.wip_woo_cart_drop{
	background-color: #' . get_wip_option_by('bd_topcartdropdownbg', 'cdd1d4') . ';
	border-color: ' . colourBrightness('#' . get_wip_option_by('bd_topcartdropdownbg', 'cdd1d4'), '-0.85') . ';
	border-top-color: #' . get_wip_option_by('bd_topcartdropdownitemlink', '28a3d1') . ';
}
.wip_woo_cart_drop ul.cart_list li{
	background: #' . get_wip_option_by('bd_topcartdropdownitem', '989fa1') . ';
	border: 1px solid ' . colourBrightness('#' . get_wip_option_by('bd_topcartdropdownbg', 'cdd1d4'), '-0.8') . ';
	color: #' . get_wip_option_by('bd_topcartdropdownitemcolor', '989fa1') . ';
}
.wip_woo_cart_drop ul.cart_list li a{
	color: #' . get_wip_option_by('bd_topcartdropdownitemlink', '28a3d1') . ';
}
.wip_woo_cart_drop ul.cart_list li a:hover{
	color: #' . get_wip_option_by('bd_topcartdropdownitemlink_hover', 'afc5d1') . ';
}
.wip_woo_cart_drop p.total{
	color: #' . get_wip_option_by('bd_topcartdropdownsubtotal', 'FFFFFF') . ';
}
.wip_woo_cart_drop p.buttons a.button{
	background: #' . get_wip_option_by('bd_topcartdropbuttonbg', '28a3d1') . '  url("data:image/png;base64,' . base64_encode($topcartButton_new_grd) . '") scroll left bottom repeat-x;
	color: #' . get_wip_option_by('bd_topcartdropbuttoncolor', 'FFFFFF') . ';
	border: 1px solid ' . $topcartButton_border . ';
	-box-shadow: inset 0px 1px 0px ' . $topcartButton_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.08);
	-webkit-box-shadow: inset 0px 1px 0px ' . $topcartButton_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.08);
	-moz-box-shadow: inset 0px 1px 0px ' . $topcartButton_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.08);
	text-shadow: none;
}
.wip_woo_cart_drop p.buttons a.button:hover{
	background: #' . get_wip_option_by('bd_topcartdropbuttonbg', '28a3d1') . '  url("data:image/png;base64,' . base64_encode($topcartButton_new_grd_reserve) . '") scroll left bottom repeat-x;
	color: #' . get_wip_option_by('bd_topcartdropbuttoncolor', 'FFFFFF') . '!important;
}' . "\n";
            @file_put_contents($topcart_text, $write_to);
            break;
        case 'slider-css':
            $slider_text = get_template_directory() . '/css/custom/slider-css.css';
            $nivoButton_normal = '#' . get_option('bd_nivoslider_navbg');
            $nivoButton_normal_light = colourBrightness($nivoButton_normal, '0.3');
            $nivoButton_gradient = new gradient_image($nivoButton_normal_light, $nivoButton_normal, 32, 5, 10);
            $nivoButton_new_grd = $nivoButton_gradient->createPNG(false, true);
            $nivoButton_normal_innerShadow = colourBrightness($nivoButton_normal_light, '0.6');
            $nivoButton_active = '#' . get_option('bd_nivoslider_navbg_active');
            $nivoButton_active_light = colourBrightness($nivoButton_active, '0.3');
            $nivoButton_active_gradient = new gradient_image($nivoButton_active_light, $nivoButton_active, 32, 5, 10);
            $nivoButton_active_grd = $nivoButton_active_gradient->createPNG(false, true);
            $nivoButton_active_innerShadow = colourBrightness($nivoButton_active_light, '0.6');
            $nivoButton_normal_border = colourBrightness('#' . get_wip_option_by('bd_sliderbgcolor', 'FFFFFF'), '-0.55');
            $nivoButton_active_border = colourBrightness($nivoButton_active, '-0.75');
            $write_to = '/** ===== slider area skin ===== */ ' . "\n";
            $write_to .= '#slider_wraper{
	background-color : #' . get_wip_option_by('bd_sliderbgcolor', 'FFFFFF') . ';
	' . (get_option('bd_sliderbgimage') != "" ? 'background-image: url(' . get_option('bd_sliderbgimage') . ');' : '') . '
	' . (get_option('bd_sliderbgimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_slider_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_sliderbgimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_slider_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_sliderbgimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_slider_bg_repeat', 'repeat')) . ';' : '') . '
}
.nivo-controlNav a{
	background: #' . get_wip_option_by('bd_nivoslider_navbg', '777777') . '  url("data:image/png;base64,' . base64_encode($nivoButton_new_grd) . '") scroll left bottom repeat-x;
	border: 1px solid ' . $nivoButton_normal_border . ';
	-box-shadow: inset 0px 1px 0px ' . $nivoButton_normal_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
	-webkit-box-shadow: inset 0px 1px 0px ' . $nivoButton_normal_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
	-moz-box-shadow: inset 0px 1px 0px ' . $nivoButton_normal_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
}
.nivo-controlNav a.active{
	background: #' . get_wip_option_by('bd_nivoslider_navbg_active', '28a3d1') . '  url("data:image/png;base64,' . base64_encode($nivoButton_active_grd) . '") scroll left bottom repeat-x;
	border: 1px solid ' . $nivoButton_normal_border . ';
	-box-shadow: inset 0px 1px 0px ' . $nivoButton_active_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
	-webkit-box-shadow: inset 0px 1px 0px ' . $nivoButton_active_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
	-moz-box-shadow: inset 0px 1px 0px ' . $nivoButton_active_innerShadow . ', 0 1px 3px rgba(0, 0, 0, 0.2);
}' . "\n";
            @file_put_contents($slider_text, $write_to);
            break;
        case 'footer-widget':
            $fw_text = get_template_directory() . '/css/custom/footer-widget-css.css';
            $footer_selectBorder = colourBrightness('#' . get_wip_option_by('bd_fwbgcolor', '888888'), '-0.85');
            $footer_selectBorderLightDark = colourBrightness('#' . get_wip_option_by('bd_fwbgcolor', '888888'), '-0.95');
            $footer_selectBorderDark = colourBrightness('#' . get_wip_option_by('bd_fwbgcolor', '888888'), '-0.65');
            $footer_selectBg = colourBrightness('#' . get_wip_option_by('bd_fwbgcolor', '888888'), '0.65');
            $footer_form_bg = colourBrightness('#' . get_wip_option_by('bd_fwbgcolor', '888888'), '0.75');
            $pekok = get_wip_option_by('bd_fwbgcolor', '888888');
            $listBG = '../../images/arrow-lists-white.png';
            if (wip_get_brightness($pekok) > 160) {
                $listBG = '../../images/arrow-lists.png';
            }
            $write_to = '/** ===== footer widget skin ===== */ ' . "\n";
            $write_to .= '#footer{
	color: #' . get_wip_option_by('bd_fwbody_fontcolor', 'DADADA') . ';
	background-color : #' . get_wip_option_by('bd_fwbgcolor', '888888') . ';
	' . (get_option('bd_fwbgimage') != "" ? 'background-image: url(' . get_option('bd_fwbgimage') . ');' : '') . '
	' . (get_option('bd_fwbgimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_fw_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_fwbgimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_fw_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_fwbgimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_fw_bg_repeat', 'repeat')) . ';' : '') . '
}
#footer table#wp-calendar caption,
#footer table#wp-calendar tfoot tr td{
	border-color: ' . $footer_selectBorder . ';
	background-color: ' . $footer_selectBg . ';
}
#footer table#wp-calendar thead th{
	border-color: ' . $footer_selectBorder . ';
}
#footer table#wp-calendar tbody td{
	border-color: ' . $footer_selectBorderLightDark . ';
	background-color: ' . $footer_selectBg . ';
}
#footer .selectBox-dropdown,
#footer .selectBox-dropdown-menu,
#footer .selectBox-inline{
	background-color: ' . $footer_selectBg . ';
	border: solid 1px ' . $footer_selectBorder . ';
}
#footer .selectBox-dropdown .selectBox-arrow{
	border-left: solid 1px ' . $footer_selectBorder . ';
}
#footer .selectBox-dropdown:focus,
#footer .selectBox-dropdown:focus .selectBox-arrow {
	border-color: ' . $footer_selectBorderDark . ';
}
#footer input[type=text], 
#footer input[type=password], 
#footer input[type=file], 
#footer textarea, 
#footer select{
	background-color: ' . $footer_form_bg . ';
	color: #' . get_wip_option_by('bd_fwbody_fontcolor', 'DADADA') . ';
}
#footer input[type=text], 
#footer input[type=password], 
#footer input[type=file], 
#footer select, 
#footer textarea{
	border-top-color:' . $footer_selectBorderLightDark . ';
	border-left-color:' . $footer_selectBorderLightDark . ';
	border-bottom-color: ' . $footer_selectBorder . ';
	border-right-color: ' . $footer_selectBorder . ';
}
.footer-widget h3.footer-widget-title{
	color: #' . get_wip_option_by('bd_fwwidget_titlecolor', 'FAFAFA') . ';
	border-color: #' . get_wip_option_by('bd_fwwidget_title_bordercolor', 'BFBFBF') . ';
}
.footer-widget h1,
.footer-widget h2,
.footer-widget h3,
.footer-widget h4,
.footer-widget h5,
.footer-widget h6{
	color: #' . get_wip_option_by('bd_fwheading_fontcolor', 'F8F8F8') . ';
}
.footer-widget a{
	color: #' . get_wip_option_by('bd_fw_link_color', '28A3D1') . ';
}
.footer-widget a:hover{
	color: #' . get_wip_option_by('bd_fw_link_hovercolor', 'AAAAAA') . ';
}
.footer-widget ul li{
	background: url(' . $listBG . ') scroll 0px 9px no-repeat;
}' . "\n";
            @file_put_contents($fw_text, $write_to);
            break;
        case 'copyright':
            $cr_text = get_template_directory() . '/css/custom/copyright-css.css';
            $write_to = '/** ===== copyright skin ===== */ ' . "\n";
            $write_to .= '#site_bottom{
	color: #' . get_wip_option_by('bd_crbody_fontcolor', 'AAAAAA') . ';
	background-color : #' . get_wip_option_by('bd_crbgcolor', '888888') . ';
	' . (get_option('bd_crbgimage') != "" ? 'background-image: url(' . get_option('bd_crbgimage') . ');' : '') . '
	' . (get_option('bd_crbgimage') != "" ? 'background-position: ' . strtolower(get_wip_option_by('bd_cr_bg_pos', 'left top')) . ';' : '') . '
	' . (get_option('bd_crbgimage') != "" ? 'background-attachment: ' . strtolower(get_wip_option_by('bd_cr_bg_attach', 'scroll')) . ';' : '') . '
	' . (get_option('bd_crbgimage') != "" ? 'background-repeat: ' . strtolower(get_wip_option_by('bd_cr_bg_repeat', 'repeat')) . ';' : '') . '
}
#site_bottom a{
	color: #' . get_wip_option_by('bd_cr_link_color', '28a3d1') . ';
}
#site_bottom a:hover{
	color: #' . get_wip_option_by('bd_cr_link_hovercolor', 'AAAAAA') . ';
}' . "\n";
            @file_put_contents($cr_text, $write_to);
            break;
        case 'product':
            $woo_text = get_template_directory() . '/css/custom/product-css.css';
            $sale_ribbon_c = '#' . get_option('bd_sale_ribbon_bg');
            $percent = 0.7;
            $sale_ribbon_l = colourBrightness($sale_ribbon_c, $percent);
            $ribbon_gradient = new gradient_image($sale_ribbon_l, $sale_ribbon_c, 32, 5, 40);
            $ribbon_new_grd = $ribbon_gradient->createPNG(false, true);
            $shadow_color = colourBrightness('#' . get_wip_option_by('bd_price_area_bg', 'a1c41e'), '-0.85');
            $bt_hover_bgc = colourBrightness('#' . get_wip_option_by('bd_price_area_bg', 'a1c41e'), '0.90');
            $addTC_bg_single = '#' . get_option('bd_addtocart_single_bg');
            $addTC_bg_l_single = colourBrightness($addTC_bg_single, '0.90');
            $addTC_bg_single_inset = colourBrightness($addTC_bg_l_single, '0.92');
            $addTC_gradient_single = new gradient_image($addTC_bg_l_single, $addTC_bg_single, 32, 5, 40);
            $addTC_gradient_hover_single = new gradient_image($addTC_bg_single, $addTC_bg_l_single, 32, 5, 40);
            $addTC_new_grd_single = $addTC_gradient_single->createPNG(false, true);
            $addTC_new_grd_hover_single = $addTC_gradient_hover_single->createPNG(false, true);
            $btBorder_single = colourBrightness($addTC_bg_single, '-0.8');
            $pr = '#' . get_wip_option_by('bd_variable_product_price_bg', '888888');
            $pr_font = '#' . get_wip_option_by('bd_variable_product_price_color', '888888');
            $bg_price = '../../images/price.png';
            if (wip_get_brightness($pr) > 160) {
                $bg_price = '../../images/price-dark.png';
            }
            $font_pr = '0.90';
            if (wip_get_brightness($pr_font) > 160) {
                $font_pr = '-0.90';
            }
            $write_to = '/** ===== products area skin ===== */ ' . "\n";
            $write_to .= 'span.onsale{
	background: #' . get_option('bd_sale_ribbon_bg') . ' url("data:image/png;base64,' . base64_encode($ribbon_new_grd) . '") scroll left bottom repeat-x;
	color: #' . get_wip_option_by('bd_sale_ribbon_font', 'FFFFFF') . ';
}
.product_list_price{
	background-color: #' . get_wip_option_by('bd_price_area_bg', 'a1c41e') . ';
	color: #' . get_wip_option_by('bd_actual_price_font', 'FFFFFF') . ';
	text-shadow: none;
}
span.product_list_button a.button:hover{
	background-color: ' . $bt_hover_bgc . ';
}
.product.type-product.status-publish.hentry .summary button.button.alt{
	background: #' . get_option('bd_addtocart_single_bg') . ' url("data:image/png;base64,' . base64_encode($addTC_new_grd_single) . '") scroll left bottom repeat-x;
	color: #' . get_wip_option_by('bd_addtocart_single_font', 'FFFFFF') . ';
	border: 1px solid ' . $btBorder_single . ';
	-box-shadow: inset 0px 1px 0px ' . $addTC_bg_single_inset . ', 0 1px 3px rgba(0, 0, 0, 0.08);
	-webkit-box-shadow: inset 0px 1px 0px ' . $addTC_bg_single_inset . ', 0 1px 3px rgba(0, 0, 0, 0.08);
	-moz-box-shadow: inset 0px 1px 0px ' . $addTC_bg_single_inset . ', 0 1px 3px rgba(0, 0, 0, 0.08);
}
.product.type-product.status-publish.hentry .summary button.button.alt:hover{
	background: #' . get_option('bd_addtocart_single_bg') . ' url("data:image/png;base64,' . base64_encode($addTC_new_grd_hover_single) . '") scroll left top repeat-x;
	color: #' . get_wip_option_by('bd_addtocart_single_font', 'FFFFFF') . '!important;
}
div.product .single_variation_wrap .single_variation{
	border-color: ' . colourBrightness('#' . get_wip_option_by('bd_variable_product_price_bg', '888888'), '-0.85') . ';
	background-color: #' . get_wip_option_by('bd_variable_product_price_bg', '888888') . ';
	background-image : url(' . $bg_price . ');
}
div.product .single_variation_wrap .single_variation span.price{
	color: #' . get_wip_option_by('bd_variable_product_price_color', '888888') . ';
}
div.product .single_variation_wrap  p.stock,
.single_variation span.price del .amount{
	color: ' . colourBrightness('#' . get_wip_option_by('bd_variable_product_price_color', '888888'), $font_pr) . ';
}' . "\n";
            @file_put_contents($woo_text, $write_to);
            break;
    }
}