The color customization parameters are disabled in free version. Please buy the commercial version in order to enable this functionality.

array(
"; foreach($this->options_colorcontrol as $key=>$special_color){ if($special_color['type']=='picker'){ echo " \"".$special_color['var_name']."\" => \"".$special_color['std']."\",
"; } } echo "),
array(
"; foreach($this->options_colorcontrol as $key=>$special_color){ if($special_color['type']=='picker'){ echo " \"".$special_color['var_name']."\" => \"".$special_color['std']."\",
"; } } echo ")); esi copy past ara array_of_colors tex@ kashxati"; die(); } // print qjeru and initial colors standart themes else { echo '"; } } /***********************************/ /*HTML FOR DEFAUL COLORED SCHEME */ /***********************************/ private function default_theme_select($array_of_colors=NULL){ $count_of_selects=count($array_of_colors); echo ''; } /***********************************/ /* REQUERD FUNCTION FOR COLORS */ /***********************************/ private function get_option_type($type=''){ $cur_type_elements=array(); $k=0; foreach( $this->options_colorcontrol as $option ){ if(isset($type) && isset($option['type']) && $option['type'] == $type ){ $cur_type_elements[$k]=$option; $k++; } } return $cur_type_elements; } /***********************************/ /* REQUERD FUNCTION FOR COLORS */ /***********************************/ private function negativeColor($color) { //get red, green and blue $r = substr($color, 0, 2); $g = substr($color, 2, 2); $b = substr($color, 4, 2); //revert them, they are decimal now $r = 0xff-hexdec($r); $g = 0xff-hexdec($g); $b = 0xff-hexdec($b); //now convert them to hex and return. return dechex($r).dechex($g).dechex($b); } /***********************************/ /* REQUERD FUNCTION FOR COLORS */ /***********************************/ private function ligthest_brigths($color,$pracent=15){ $new_color=$color; if(!(strlen($new_color==6) || strlen($new_color)==7)) { return $color; } $color_vandakanishov=strpos($new_color,'#'); if($color_vandakanishov == false) { $new_color= str_replace('#','',$new_color); } $color_part_1=substr($new_color, 0, 2); $color_part_2=substr($new_color, 2, 2); $color_part_3=substr($new_color, 4, 2); $color_part_1=dechex( (int) (hexdec( $color_part_1 ) + (( 255-( hexdec( $color_part_1 ) ) ) * $pracent / 100 ))); $color_part_2=dechex( (int) (hexdec( $color_part_2) + (( 255-( hexdec( $color_part_2 ) ) ) * $pracent / 100 ))); $color_part_3=dechex( (int) (hexdec( $color_part_3 ) + (( 255-( hexdec( $color_part_3 ) ) ) * $pracent / 100 ))); $new_color=$color_part_1.$color_part_2.$color_part_3; if($color_vandakanishov == false){ return $new_color; } else{ return '#'.$new_color; } } /***********************************/ /* REQUERD FUNCTION FOR COLORS */ /***********************************/ private function hex_to_rgba($color, $opacity = false) { $default = 'rgb(0,0,0)'; //Return default if no color provided if(empty($color)) return $default; //Sanitize color if "#" is provided if ($color[0] == '#' ) { $color = substr( $color, 1 ); } //Check if color has 6 or 3 characters and get values if (strlen($color) == 6) { $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] ); } elseif ( strlen( $color ) == 3 ) { $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] ); } else { return $default; } //Convert hexadec to rgb $rgb = array_map('hexdec', $hex); //Check if opacity is set(rgba or rgb) if($opacity){ if(abs($opacity) > 1) $opacity = 1.0; $output = 'rgba('.implode(",",$rgb).','.$opacity.')'; } else { $output = 'rgb('.implode(",",$rgb).')'; } //Return rgb(a) color string return $output; } private function darkest_brigths($color,$pracent){ $new_color=$color; if(!(strlen($new_color==6) || strlen($new_color)==7)) { return $color; } $color_vandakanishov=strpos($new_color,'#'); if($color_vandakanishov == false) { $new_color= str_replace('#','',$new_color); } $color_part_1=substr($new_color, 0, 2); $color_part_2=substr($new_color, 2, 2); $color_part_3=substr($new_color, 4, 2); $color_part_1=dechex( (int) (hexdec( $color_part_1 ) - (hexdec( $color_part_1 )* $pracent / 100 ))); $color_part_2=dechex( (int) (hexdec( $color_part_2) - (( ( hexdec( $color_part_2 ) ) ) * $pracent / 100 ))); $color_part_3=dechex( (int) (hexdec( $color_part_3 ) - (( ( hexdec( $color_part_3 ) ) ) * $pracent / 100 ))); if(strlen($color_part_1)<2) $color_part_1="0".$color_part_1; if(strlen($color_part_2)<2) $color_part_2="0".$color_part_2; if(strlen($color_part_3)<2) $color_part_3="0".$color_part_3; $new_color=$color_part_1.$color_part_2.$color_part_3; if($color_vandakanishov == false){ return $new_color; } else{ return '#'.$new_color; } } /*****************************************************************/ /* HELPER FUNCTION FOR GENERETED CUSTOMIZE JASCRIPT */ /*****************************************************************/ private function generete_customize_js(){ $theme_mod_prefix=wp_get_theme(); $theme_mod_prefix=$theme_mod_prefix->template; $content=wp_remote_retrieve_body(wp_remote_get(get_template_directory_uri().'/admin/customize.css.html')); // get css in file $content=preg_replace('/^\s+|\n|\r|\s+$/m', '', $content); // remove break lines in css $content =str_replace(array(''),'',$content); // remove style tag $all_content = explode('}', $content); /// explode for geting selector and params in selector $all_content = array_slice($all_content,0, count($all_content)-1); // remove last null element $all_params = array();// end results array foreach($all_content as $all) { $ccc = array(); $fff = array(); $qqq=explode('{',$all); $bbb[$qqq[0]]=$qqq[1]; foreach($bbb as $key=>$b) { $lll = array(); $b=str_replace(array(' ','','?>','echo',),'', $b); $ewew = explode(';',$b); $ewew = array_slice($ewew,0, count($ewew)-1); foreach($ewew as $ew) { $nnn = explode(':',$ew); $lll[$nnn[0]] = $nnn[1]; } $ccc['selector'] = explode(',',$key); $lll=str_replace(' ','', $lll); $lll=str_replace(array('','?>','echo'),'', $lll); $ccc['dinamicle_vaiable'] = $lll; } array_push($all_params, $ccc); } $count_of_all_params=count($all_params); $option_color_control=array(); foreach($this->options_colorcontrol as $keycolor=>$colorvalue){ for($i=0;$i<$count_of_all_params;$i++){ $keyy_of_special_value=0; //var_dump($all_params[$i]['dinamicle_vaiable']); foreach($all_params[$i]['dinamicle_vaiable'] as $csskey => $cssvalue){ $keyy_of_special_value++; if(!(strpos($cssvalue,'$'.$keycolor) === false)){ // simple color if(!preg_match('[\w\(]',$cssvalue,$matches)){ if(!isset($option_color_control[$keycolor][$csskey])) $option_color_control[$keycolor][$csskey]=array(); foreach($all_params[$i]['selector'] as $selectorkey => $selectorvalue){ if(!in_array($selectorvalue,$option_color_control[$keycolor][$csskey])) array_push($option_color_control[$keycolor][$csskey],$selectorvalue); } } //colors with functions this dont translated else{ if(!isset($option_color_control[$keycolor]['spec'.$keyy_of_special_value.$csskey.'key_endd'.$cssvalue])) $option_color_control[$keycolor]['spec'.$keyy_of_special_value.$csskey.'key_endd'.$cssvalue]=array(); foreach($all_params[$i]['selector'] as $selectorkey => $selectorvalue){ if(!in_array($selectorvalue,$option_color_control[$keycolor]['spec'.$keyy_of_special_value.$csskey.'key_endd'.$cssvalue])) array_push($option_color_control[$keycolor]['spec'.$keyy_of_special_value.$csskey.'key_endd'.$cssvalue],$selectorvalue); } } } } } } foreach($option_color_control as $keycolor => $colorparametrs){ ?> wp.customize( 'theme_mods_[options_colorcontrol[$keycolor]['id'] ?>]', function( value ) { value.bind( function( to ) { style = jQuery('#custom--css'); style.remove(); style = jQuery('\ ').appendTo( 'head' ); } ); if(!(jQuery('#custom--css').length > 0)){ jQuery('\ ').appendTo( 'head' ); } } );