| Server IP : 194.30.32.123 / Your IP : 216.73.216.89 Web Server : Apache System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64 User : ftpbegirale ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /expert/htwebs/www.begirale.com/public/wp-content/themes/perspective-theme/ |
Upload File : |
<?php
// search varibales start
function cs_get_search_results($query) {
if ( !is_admin() and ($query->is_author or $query->is_month() or is_search() or is_archive())) {
$query->set( 'post_type', array('post', 'events', 'reviews', 'portfolio' ) );
if ( isset($_GET['cat_slug']) ) {
global $wpdb;
$category_arr = array(0);
$event_cat_arr = array(0);
$review_cat_arr = array(0);
$portfolio_cat_arr = array(0);
if ( $_GET['cat_slug'] == "all" ) {
foreach ( $_GET['all_cat_slug'] as $val ) {
//echo $val . "<br />";
$row = $wpdb->get_row("SELECT term_id from ".$wpdb->prefix."terms WHERE slug = '" . $val ."'" );
$row2 = $wpdb->get_row("SELECT taxonomy from ".$wpdb->prefix."term_taxonomy WHERE term_id = '" . $row->term_id ."'" );
if ( $row2->taxonomy == "category" ) { $category_arr[] = $row->term_id; }
if ( $row2->taxonomy == "event-category" ) { $event_cat_arr[] = $row->term_id; }
if ( $row2->taxonomy == "review-category" ) { $review_cat_arr[] = $row->term_id; }
if ( $row2->taxonomy == "portfolio-category" ) { $portfolio_cat_arr[] = $row->term_id; }
}
}
else {
$row = $wpdb->get_row("SELECT term_id from ".$wpdb->prefix."terms WHERE slug = '" . $_GET['cat_slug'] ."'" );
//echo $row->term_id;
$row2 = $wpdb->get_row("SELECT taxonomy from ".$wpdb->prefix."term_taxonomy WHERE term_id = '" . $row->term_id ."'" );
if ( $row2->taxonomy == "category" ) { $category_arr[] = $row->term_id; }
if ( $row2->taxonomy == "event-category" ) { $event_cat_arr[] = $row->term_id; }
if ( $row2->taxonomy == "review-category" ) { $review_cat_arr[] = $row->term_id; }
if ( $row2->taxonomy == "portfolio-category" ) { $portfolio_cat_arr[] = $row->term_id; }
}
$query->set( 'post_type', array('post', 'events', 'reviews', 'portfolio' ) );
$query->set( 'tax_query',
array(
'relation' => 'OR',
array(
'taxonomy' => 'category',
'field' => 'id',
'terms' => $category_arr
),
array(
'taxonomy' => 'event-category',
'field' => 'id',
'terms' => $event_cat_arr
),
array(
'taxonomy' => 'review-category',
'field' => 'id',
'terms' => $review_cat_arr
),
array(
'taxonomy' => 'portfolio-category',
'field' => 'id',
'terms' => $portfolio_cat_arr
)
)
);
}
remove_action( 'pre_get_posts', 'cs_get_search_results' );
}
}
add_action('pre_get_posts', 'cs_get_search_results');
// search varibales end
/* Display navigation to next/previous for single.php */
if ( ! function_exists( 'cs_next_prev_post' ) ) {
function cs_next_prev_post(){
global $cs_transwitch,$cs_theme_option;
$prev_post = get_adjacent_post(false,'',true) ;
$next_post = get_adjacent_post(false,'',false) ;
if ( $prev_post <> "" or $next_post <> "" ) {
?>
<div class="detail_post webkit">
<?php
if($prev_post <> ''){?>
<a href="<?php echo $prev_post->guid; ?>" class="prevs"><i class="icon-angle-left icon-2x"></i></a>
<article class="prev_post">
<h6><a class="colrhover" href="<?php echo $prev_post->guid; ?>"><?php echo $prev_post->post_title;?></a></h6>
<ul class="post-options">
<li>
<?php
printf( __('By: %s','Perspective'),'<a href="'.get_author_posts_url($prev_post->post_author).'" class="colr">'.get_the_author_meta('user_nicename', $prev_post->post_author).'</a>');
?>
</li>
<li>
<time datetime="<?php echo date('Y-m-d',strtotime(get_the_date()));?>"><?php if($cs_transwitch =='on'){ _e('Posted on','Perspective'); }else{ echo $cs_theme_option['trans_posted_on']; }?> <?php echo date(get_option( 'date_format' ),strtotime($prev_post->post_date));?></time>
</li>
</ul>
</article>
<?php } ?>
<?php
if($next_post <> ''){?>
<article class="next_post">
<h6><a class="colrhover" href="<?php echo $next_post->guid; ?>"><?php echo $next_post->post_title;?></a></h6>
<ul class="post-options">
<li>
<?php
printf( __('By: %s','Perspective'),'<a href="'.get_author_posts_url($next_post->post_author).'" class="colr">'.get_the_author_meta('user_nicename', $next_post->post_author).'</a>');
?>
</li>
<li>
<time datetime="<?php echo date('Y-m-d',strtotime(get_the_date()));?>"><?php if($cs_transwitch =='on'){ _e('Posted on','Perspective'); }else{ echo $cs_theme_option['trans_posted_on']; } ?> <?php echo date(get_option( 'date_format' ),strtotime($next_post->post_date));?></time>
</li>
</ul>
</article>
<a href="<?php echo $next_post->guid; ?>" class="nexts"><i class="icon-angle-right icon-2x"></i></a>
<?php } ?>
</div>
<?php
}
}
}
// next and prev post end
// Add Featured text for sticky posts.
if ( ! function_exists( 'cs_featured()' ) ) {
function cs_featured(){
global $cs_transwitch,$cs_theme_option;
if ( is_sticky() ){ ?>
<span class="featured"><strong><?php if($cs_transwitch =='on'){ _e('Featured','Perspective'); }else{ echo $cs_theme_option['trans_featured'];
} ?></strong></span>
<?php
}
}
}
//Add classes according to diffrent view for blog post type
function cs_blog_classes($blog_view =""){
if($blog_view == 'blog-slider-1'){
echo 'latest_article';
}elseif($blog_view == 'blog-slider-2'){
echo 'headlines';
}elseif($blog_view == 'blog-large'){
echo 'postlist blog';
}else{
echo 'blog';
}
}
// rating function
function cs_user_rating(){
global $post;
$user_rating = 0;
$rating_vote_counter = get_post_meta($post->ID, "rating_vote_counter", true);
$rating_value = get_post_meta($post->ID, "rating_value", true);
if ( $rating_value <> 0 and $rating_vote_counter <> 0 ) {
$user_rating = ( $rating_value / $rating_vote_counter ) ;
}
echo $user_rating = number_format( $user_rating);
}
// review criteria check
function cs_criteria_check($value) {
global $cs_theme_option;
$html = '';
for ( $j = 1; $j <= 10; $j++ ) {
if ( $value >= $cs_theme_option['review_criteria_'.$j.'_1'] and $value <= $cs_theme_option['review_criteria_'.$j.'_2'] ) {
$html = $cs_theme_option['review_criteria_text_'.$j.''];
}
}
return $html;
}
// review from post admin
function cs_admin_reviews() {
global $xmlObject;
$counter = 0;
$count_val = 0;
foreach ( $xmlObject as $subject ){
if ( $subject->getName() == "subject" ) {
$counter++;
$count_val += $subject->rating_value;
}
}
if ( $count_val <> 0 and $counter <> 0 ) {
$admin_reviews = number_format($count_val / $counter);
echo $admin_reviews . "% <span> " . cs_criteria_check($admin_reviews) ." </span> ";
}
}
// custom function start
/* return current post type and page type */
function cs_post_type($current_id){
$post_type = get_post_type($current_id);
if($post_type == "events"){
$post_type = "cs_event_meta";
}elseif($post_type == "reviews"){
$post_type = "cs_review";
}elseif($post_type == "Portfolio"){
$post_type = "portfolio";
}
elseif($post_type == "page"){
$post_type = "cs_page_builder";
}
return $post_type;
}
// post page title
function cs_post_page_title(){
if ( is_author() ) {
global $author;
$userdata = get_userdata($author);
echo __('Author', 'Perspective') . " " . __('Archives', 'Perspective') . ": ".$userdata->display_name;
}elseif ( is_tag() || is_tax('event-tag') ) {
echo __('Tags', 'Perspective') . " " . __('Archives', 'Perspective') . ": " . single_cat_title( '', false );
}elseif ( is_category() || is_tax('event-category') ) {
echo __('Categories', 'Perspective') . " " . __('Archives', 'Perspective') . ": " . single_cat_title( '', false );
}elseif ( is_tag() || is_tax('review-tag') ) {
echo __('Tags', 'Perspective') . " " . __('Archives', 'Perspective') . ": " . single_cat_title( '', false );
}elseif ( is_category() || is_tax('review-category') ) {
echo __('Categories', 'Perspective') . " " . __('Archives', 'Perspective') . ": " . single_cat_title( '', false );
}elseif( is_search()){
printf( __( 'Search Results %1$s %2$s', 'Perspective' ), ': ','<span>' . get_search_query() . '</span>' );
}elseif ( is_day() ) {
printf( __( 'Daily Archives: %s', 'Perspective' ), '<span>' . get_the_date() . '</span>' );
}elseif ( is_month() ) {
printf( __( 'Monthly Archives: %s', 'Perspective' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'Perspective' ) ) . '</span>' );
}elseif ( is_year() ) {
printf( __( 'Yearly Archives: %s', 'Perspective' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'Perspective' ) ) . '</span>' );
}elseif ( is_404()){
_e( 'Error 404', 'Perspective' );
}elseif(!is_page()){
_e( 'Blog Archives', 'Perspective' );
}
}
// Advace search in all categories
if ( ! function_exists( 'cs_adv_search_page' ) ) {
function cs_adv_search_page(){
global $xmlObject, $node;
echo '<div class="devider element_size_'.$node->adv_search_element_size.'">';
$node_categories = (array) $node->categories;
$all_cats = array();
foreach ( $node_categories as $val ){
$all_cats = array_merge( (array)$all_cats, (array)$val);
}
?>
<figure class="welcomr_form viewme">
<figcaption>
<div class="bg_white webkit">
<h3><?php echo $node->adv_search_title?></h3>
<form id="searchform" method="get" action="<?php echo home_url()?>" role="search">
<input type="radio" name="cat_slug" value="all" checked="checked" > All
<?php
foreach ( $all_cats as $cat ){
?>
<input type="hidden" name="all_cat_slug[]" value="<?php echo $cat ?>" />
<input type="radio" name="cat_slug" value="<?php echo $cat ?>" >
<?php echo $cat?>
<?php
}
?>
<br /><br />
<input type="text" name="s" onblur="if(this.value=='') {this.value='<?php _e('Search for:','LakeCity'); ?>';}" onfocus="if(this.value=='<?php _e('Search for:','LakeCity'); ?>') {this.value='';}" value="<?php _e('Search for:','LakeCity'); ?>" id="searchinput">
<input type="submit" value="Advance Search" class="backcolr">
</form>
</div>
<div class="text backcolr webkit">
<?php echo $node->adv_search_desc ?>
</div>
</figcaption>
</figure>
<?php
echo '</div>';
echo '<div class="clear"></div>';
}
}
// page elemect for pirce table
if ( ! function_exists( 'cs_pricetable_page' ) ) {
function cs_pricetable_page(){
global $node;
if(empty($node->pricetable_featured)) $node->pricetable_featured ='';
$pricetable_featured ='';
if($node->pricetable_featured == "Yes") $pricetable_featured = " price_featured";
$html = '<div class="price-table"><div class="element_size_'.$node->pricetable_element_size.'">';
$html .= '<div class="pricing-box '.$pricetable_featured.'">';
$html .= '<div class="plan-header" >';
$html .= '<div class="pricing-box">';
$html .= '<h1 class="heading-color">'.$node->pricetable_title.'</h1>';
$html .= '</div>';
$html .= '<div class="price" style="background:'.$node->pricetable_bgcolor.'"><h1 class="webkit heading-color"><small>'.$node->pricetable_currency.'</small>'.$node ->pricetable_price.'</h1></div>';
$html .= '</div>';
$html .= '<div class="plan-inside">'.$node ->pricetable_content.'</div>';
$html .= '<div class="period"><center><a href="'.$node->pricetable_linkurl.'" class="button_large" style="background:'.$node->pricetable_bgcolor.'"><i class="icon-double-angle-right"></i>'.$node->pricetable_linktitle.'</a></center></div>';
$html .= '</div>';
$html .= '</div></div>';
echo $html;
}
}
//
if ( ! function_exists( 'cs_dropcap_page' ) ) {
function cs_dropcap_page(){
global $node;
$html = '<div class="element_size_'.$node->dropcap_element_size.'">';
$html .= '<div class="dropcap">';
$html .= $node->dropcap_content;
$html .= '</div>';
$html .= '</div>';
return $html;
}
}
//
if ( ! function_exists( 'cs_quote_page' ) ) {
function cs_quote_page(){
global $node;
$html = '<div class="element_size_'.$node->quote_element_size.'">';
$html .= '<blockquote class="blockquote" style=" text-align:' .$node->quote_align. '; color:' . $node->quote_text_color . '">' . $node->quote_content . '<div class="quote"></div></blockquote>';
$html .= '</div>';
return $html . '<div class="clear"></div>';
}
}
// rander short code video
if ( ! function_exists( 'cs_video_page' ) ) {
function cs_video_page(){
global $node;
$html = '<div class="element_size_'.$node->video_element_size.'">';
$html .= wp_oembed_get( $node->video_url, array('width'=>$node->video_width, 'height'=>$node->video_height) );
$html .= '</div>';
return $html;
}
}
// map show for pages and posts
if ( ! function_exists( 'cs_map_page' ) ) {
function cs_map_page(){
global $node, $counter_node;
if ( !isset($node->map_lat) or $node->map_lat == "" ) { $node->map_lat = 0; }
if ( !isset($node->map_lon) or $node->map_lon == "" ) { $node->map_lon = 0; }
if ( !isset($node->map_zoom) or $node->map_zoom == "" ) { $node->map_zoom = 11; }
if ( !isset($node->map_info_width) or $node->map_info_width == "" ) { $node->map_info_width = 200; }
if ( !isset($node->map_info_height) or $node->map_info_height == "" ) { $node->map_info_height = 100; }
if ( !isset($node->map_show_marker) or $node->map_show_marker == "" ) { $node->map_show_marker = 'true'; }
if ( !isset($node->map_controls) or $node->map_controls == "" ) { $node->map_controls = 'false'; }
if ( !isset($node->map_scrollwheel) or $node->map_scrollwheel == "" ) { $node->map_scrollwheel = 'true'; }
if ( !isset($node->map_draggable) or $node->map_draggable == "" ) { $node->map_draggable = 'true'; }
if ( !isset($node->map_type) or $node->map_type == "" ) { $node->map_type = 'ROADMAP'; }
if ( !isset($node->map_info)) { $node->map_info = ''; }
if( !isset($node->map_marker_icon)){ $node->map_marker_icon = ''; }
if( !isset($node->map_title)){ $node->map_title ='';}
if( !isset($node->map_element_size)){ $node->map_element_size ='default';}
if( !isset($node->map_height)){ $node->map_height ='180';}
$map_show_marker = '';
if ( $node->map_show_marker == "true" ) {
$map_show_marker = " var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: '',
icon: '".$node->map_marker_icon."',
shadow:''
});
";
}
//wp_enqueue_script('googleapis', 'https://maps.googleapis.com/maps/api/js?sensor=true', '', '', true);
$html = '<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>';
$html .= '<div class="element_size_'.$node->map_element_size.'">';
$html .= '<h1 class="color heading-color">'.$node->map_title.'</h1>';
$html .= '<div class="mapcode iframe mapsection gmapwrapp" id="map_canvas'.$counter_node.'" style="height:'.$node->map_height.'px;"> </div>';
$html .= '</div>';
$html .= "<script type='text/javascript'>
function initialize() {
var myLatlng = new google.maps.LatLng(".$node->map_lat.", ".$node->map_lon.");
var mapOptions = {
zoom: ".$node->map_zoom.",
scrollwheel: ".$node->map_scrollwheel.",
draggable: ".$node->map_draggable.",
center: myLatlng,
mapTypeId: google.maps.MapTypeId.".$node->map_type." ,
disableDefaultUI: ".$node->map_controls.",
}
var map = new google.maps.Map(document.getElementById('map_canvas".$counter_node."'), mapOptions);
var infowindow = new google.maps.InfoWindow({
content: '".$node->map_info."',
maxWidth: ".$node->map_info_width.",
maxHeight:".$node->map_info_height.",
});
".$map_show_marker."
//google.maps.event.addListener(marker, 'click', function() {
if (infowindow.content != ''){
infowindow.open(map, marker);
map.panBy(1,-60);
google.maps.event.addListener(marker, 'click', function(event) {
infowindow.open(map, marker);
});
}
//});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>";
return $html;
}
}
// image short code function
if ( ! function_exists( 'cs_image_page' ) ) {
function cs_image_page(){
global $node;
cs_enqueue_gallery_style_script();
$href = '';
$html = '';
if ($node->image_lightbox == "yes") $href = $node->image_source;
if($node->image_lightbox =="yes") $data_rel = 'data-rel="prettyPhoto"';
else $data_rel = 'target="_blank"';
if ( $node->image_element_size <> "" ) { $html .= '<div class="element_size_'.$node->image_element_size.'">'; }
$html .= '<figure class="lightbox-single image-shortcode" style="float:left; width:'.$node->image_width.'px; height:'.$node->image_height.'px">';
$html .= '<a class="'.$node->image_style.'" href="'.$href.'" title="'.$node->image_caption.'" '.$data_rel.'>';
$html .= '<img src="'.$node->image_source.'" style="float:left; width:'.$node->image_width.'px; height:'.$node->image_height.'px" alt="" />';
$html .= '</a>';
$html .= '<figcaption class="webkit">';
$html .= '<h6>'.$node->image_caption.'</h6>';
$html .= '</figcaption>';
$html .= '</figure>';
if ( $node->image_element_size <> "" ) { $html .= '</div>'; }
return $html;
}
}
// rander message box short code
if ( ! function_exists( 'cs_message_box_page' ) ) {
function cs_message_box_page(){
global $node;
$html = '<div class="element_size_'.$node->mb_element_size.'">';
$html .= '<div class="messagebox alert alert-info" style="background:'.$node->mb_bg_color.'">
<button data-dismiss="alert" class="close" type="button">X</button>';
$html .= '<h4>'.$node->mb_title.'</h4>';
$html .= $node->mb_content;
$html .= '</div>';
$html .= '</div>';
echo $html;
}
}
// rander divider shortcode
if ( ! function_exists( 'cs_divider_page' ) ) {
function cs_divider_page(){
global $node;
wp_enqueue_script('scrolltopcontrol_js', get_template_directory_uri() . '/scripts/frontend/scrolltopcontrol.js', '', '', true);
$html = '<div class="devider element_size_'.$node->divider_element_size.'>">';
$html .= '<div style="margin-top:'.$node->divider_mrg_top.'px;margin-bottom:'.$node->divider_mrg_bottom.'px; " class="' . $node->divider_style . '">';
if(isset($node->divider_backtotop) && strtolower($node->divider_backtotop)=='yes'){
$html .= '<a href="#" class="gotop" id="back-top">'.__('Top','Perspective').'</a>';
}
$html .= '</div>';
$html .= '</div>';
return $html . '<div class="clear"></div>';
}
}
if ( ! function_exists( 'cs_services_page' ) ) {
function cs_services_page() {
global $node, $post, $element_size_class, $cs_theme_option;
?>
<div class="element_size_<?php echo $node->services_element_size; ?>">
<!-- Prayer Submit Start -->
<div class="services">
<?php
foreach ($node->service as $service_info) {
if ( $service_info->service_style == "service1" ) $service_style = "service-v1";
elseif ( $service_info->service_style == "service2" ) $service_style = "service-v2";
elseif ( $service_info->service_style == "service3" ) $service_style = "service-v3";
elseif ( $service_info->service_style == "service4" ) $service_style = "service-v4";
?>
<article class="<?php echo $service_style?>">
<?php if ($service_info->service_icon <> '') { ?><a ><i class="<?php echo $service_info->service_icon; ?>"></i></a><?php } ?>
<h2><a ><?php echo $service_info->service_title; ?></a></h2>
<p><?php echo do_shortcode($service_info->service_text); ?></p>
</article>
<?php } ?>
</div>
<!-- Prayer Submit End -->
<div class="clearfix"></div>
</div>
<?php
}
}
// show client list
if ( ! function_exists( 'cs_client_page' ) ) {
function cs_client_page(){
global $node,$post_id,$cs_theme_option;
cs_enqueue_gallery_style_script();
?>
<div class="element_size_<?php echo $node->client_element_size; ?> ourclient lightbox">
<?php
if($node->client_header_title <> ''){echo ' <header class="heading"><h2 class="heading-color section-title cs-heading-color">'.$node->client_header_title.'</h2></header>';}
$client_gallery = $node->client_gallery;
if($client_gallery <> ''){
$args=array(
'name' => $client_gallery,
'post_type' => 'cs_gallery',
'post_status' => 'publish',
'showposts' => 1,
);
$get_gallery_id = get_posts($args);
if($get_gallery_id){
$get_gallery_id = $get_gallery_id[0]->ID;
}
$cs_meta_gallery_options = get_post_meta($get_gallery_id, "cs_meta_gallery_options", true);
if ( $cs_meta_gallery_options <> "" ) {
$xmlObject = new SimpleXMLElement($cs_meta_gallery_options);
$limit_start = 0;
$limit_end = count($xmlObject);
}
if ( $node->client_view == 'List View'){
if ( $cs_meta_gallery_options <> "" ) {
echo '<ul>';
for ( $i = $limit_start; $i < $limit_end; $i++ ) {
$path = $xmlObject->gallery[$i]->path;
$title = $xmlObject->gallery[$i]->title;
$description = $xmlObject->gallery[$i]->description;
$use_image_as = $xmlObject->gallery[$i]->use_image_as;
$video_code = $xmlObject->gallery[$i]->video_code;
$link_url = $xmlObject->gallery[$i]->link_url;
//$image_url = wp_get_attachment_image_src($path, array(438,288),false);
$image_url = cs_attachment_image_src($path, 369, 208);
echo "<li><figure><a href='".$image_url."' data-rel='prettyPhoto'><img src='".$image_url."' data-alt='".$title."' alt='' width='175'></a></figure></li>";
}
echo '</ul>';
}
}
else if($node->client_view == 'Carousel View'){
$count=1;
$counter =1;
$divider = 6;
?>
<div class="element_size_<?php echo $node->client_element_size; ?> logo_slide">
<?php
cs_enqueue_jcarousel_style_script();
cs_enqueue_gallery_style_script();
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#clientcrousel').jcarousel({
easing: 'easeOutCubic',
animation: 1000
});
});
</script>
<!-- My Carousel Start -->
<div id="clientcrousel" class="jcarousel-skin-tango">
<!-- Carousel items -->
<ul>
<?php
if ( $cs_meta_gallery_options <> "" ) {
for ( $i = $limit_start; $i < $limit_end; $i++ ) {
$path = $xmlObject->gallery[$i]->path;
$title = $xmlObject->gallery[$i]->title;
$description = $xmlObject->gallery[$i]->description;
$use_image_as = $xmlObject->gallery[$i]->use_image_as;
$video_code = $xmlObject->gallery[$i]->video_code;
$link_url = $xmlObject->gallery[$i]->link_url;
//$image_url = wp_get_attachment_image_src($path, array(438,288),false);
$image_url = cs_attachment_image_src($path, 369, 208);
$image_url_full = cs_attachment_image_src($path, 0, 0);
?>
<li>
<figure>
<a href="<?php if($use_image_as==1)echo $video_code; elseif($use_image_as==2) echo $link_url; else echo $image_url_full;?>" target="<?php if($use_image_as==2) { echo '_blank'; }else{ echo '_self';}?>" data-rel="<?php if($use_image_as==1)echo "prettyPhoto1"; elseif($use_image_as==2) echo ""; else echo "prettyPhoto[gallery2]"?>"><?php echo "<img src='".$image_url."' data-alt='".$title."' alt='' />"; ?></a>
</figure>
</li>
<?php
}
}
?>
</ul>
</div>
<!-- My Carousel End -->
</div>
<?php }
}
?>
</div>
<?php
}
}
// column short code
if ( ! function_exists( 'cs_column_page' ) ) {
function cs_column_page(){
global $node;
$html = '<div class="element_size_'.$node->column_element_size.' column">';
$html .= do_shortcode($node->column_text);
$html .= '</div>';
echo $html;
}
}
// page bulider items front end
// tabs shortcode
if ( ! function_exists( 'cs_tabs_page' ) ) {
function cs_tabs_page(){
global $node, $tab_counter;
$html = "";
if ( $node->tabs_element_size == "" ) {
$html .= '<ul class="nav nav-tabs" id="myTab">';
$xmlObject = simplexml_load_string($node->tabs_content);
$tabs_count = 0;
foreach ($xmlObject as $val) {
if (!isset($val["icon"])){ $val["icon"] = '';}
if (!isset($val["title"])){ $val["title"] = '';}
$tabs_count++;
if ( $val["active"] == "yes")
$tab_active = " active";
else
$tab_active = "";
$html .= '<li class="' . $tab_active . '"><a data-toggle="tab" href="#tab' . $tab_counter . $tabs_count . '"><i class="'.$val["icon"].'"></i> ' . $val["title"] . '</a></li>';
}
$html .= '</ul>';
$html .= '<div class="tab-content">';
$tabs_count = 0;
foreach ($xmlObject as $val) {
$tabs_count++;
if ( $val["active"] == "yes")
$tab_active = " active";
else
$tab_active = "";
$html .= '<div class="tab-pane fade in ' . $tab_active . '" id="tab' . $tab_counter . $tabs_count . '">' . $val . '</div>';
}
$html .= '</div>';
$html = '<div class="tabs '.$node->tabs_style.'">' . $html . '</div>';
}
else {
$aaa = array();
$tab_counter++;
$tabs_count = 0;
$html = '<div class="element_size_'.$node->tabs_element_size.'"><div class="tabs horizontal">';
$html .= '<ul class="nav nav-tabs" id="myTab">';
foreach ( $node->tab as $node ){
$aaa["$node->tab_title"] = $node->tab_text;
$tabs_count++;
if ($node->tab_active == "yes")
$tab_active = " active";
else
$tab_active = "";
$html .= '<li class="' . $tab_active . '"><a data-toggle="tab" href="#tab' . $tab_counter . $tabs_count . '"><i class="'.$node->tab_title_icon.'"></i>' . $node->tab_title . '</a></li>';
}
$html .= '</ul>';
$html .= '<div class="tab-content">';
$tabs_count = 0;
foreach( $aaa as $keys=>$vals ){
$tabs_count++;
if ($tabs_count == 1)
$tab_active = " active";
else
$tab_active = "";
$html .= '<div class="tab-pane fade in ' . $tab_active . '" id="tab' . $tab_counter . $tabs_count . '">' . $vals . '</div>';
}
$html .= '</div></div>';
$html = $html ;
}
return do_shortcode($html) . '<div class="clear"></div>';
}
}
if ( ! function_exists( 'cs_accordions_page' ) ) {
function cs_accordions_page(){
global $node, $acc_counter;
$acc_counter = rand(5, 15);
$acc_counter++;
$accordion_count = 0;
$html = "";
if ( $node->accordion_element_size == "" ) {
$html .= '<div class="accordion" id="accordion-' . $acc_counter . '">';
$xmlObject = new SimpleXMLElement( $node->accordion_content );
foreach ($xmlObject as $node) {
if (!isset($node["icon"])){ $node["icon"] = '';}
if (!isset($node["title"])){ $node["title"] = '';}
$accordion_count++;
if ($accordion_count == 1 && $node["active"] == "yes")
$class_active = " active";
else
$class_active = "";
if ( $node["active"] == "yes"){
$accordion_active = " in";
}else{
$accordion_active = "";
}
$html .= '<div class="accordion-group ">';
$html .= '<div class="accordion-heading">';
$html .= '<a class="accordion-toggle backcolorhover '.$class_active .'" data-toggle="collapse" data-parent="#accordion-' . $acc_counter . '" href="#accordion-' . str_replace(" ", "", $accordion_count . $acc_counter) . '"><i class="'.$node["icon"].'"></i> ' . $node["title"] . '</a>';
$html .= '</div>';
$html .= '<div id="accordion-' . str_replace(" ", "", $accordion_count . $acc_counter) . '" class="accordion-body collapse ' . $accordion_active . '">';
$html .= '<div class="accordion-inner">' . $node . '</div>';
$html .= '</div>';
$html .= '</div>';
}
$html .= '</div>';
}
else {
$html = '<div class="element_size_'.$node->accordion_element_size.'">';
$html .= '<div class="accordion" id="accordion-' . $acc_counter . '">';
foreach ( $node->accordion as $node ){
$accordion_count++;
if ($accordion_count == 1 && $node->accordion_active == "yes")
$class_active = " active";
else
$class_active = "";
if ($accordion_count == 1)
$accordion_active = " in";
else
$accordion_active = "";
$html .= '<div class="accordion-group">';
$html .= '<div class="accordion-heading">';
$html .= '<a class="accordion-toggle backcolorhover '.$class_active .'" data-toggle="collapse" data-parent="#accordion-' . $acc_counter . '" href="#accordion-' . str_replace(" ", "", $accordion_count . $acc_counter) . '"><i class="'.$node->accordion_title_icon.'"></i> ' . $node->accordion_title . '</a>';
$html .= '</div>';
$html .= '<div id="accordion-' . str_replace(" ", "", $accordion_count . $acc_counter) . '" class="accordion-body collapse ' . $accordion_active . '">';
$html .= '<div class="accordion-inner">' . $node->accordion_text . '</div>';
$html .= '</div>';
$html .= '</div>';
}
$html .= '</div>';
$html .= '</div>';
echo do_shortcode($html);
}
return do_shortcode($html) . '<div class="clear"></div>';
}
}
function cs_parallax_page() {
cs_enqueue_parallax_script();
?>
<script>
jQuery(document).ready(function(){
jQuery(".parallaxbg").each(function (index) {
jQuery(this).parallax("50%", .1)
});
});
</script>
<?php
global $node, $post, $element_size_class, $counter_node, $cs_theme_option;
$parallax_element_size = $node->parallax_element_size;
$parallax_element = $node->parallax_element;
$parallax_view = $node->parallax_view;
$parallax_height = $node->parallax_height;
$parallax_margin_top = $node->parallax_margin_top;
$parallax_margin_bottom = $node->parallax_margin_bottom;
echo '<div class="element_size_'.$node->parallax_element_size.'" >';
// $counter = $post->ID . $count_node;
if ($parallax_element == 'twitter') {
cs_enqueue_jcarousel_style_script();
if(isset($node->parallax_twitter_profile) && !empty($node->parallax_twitter_profile)){
$parallax_twitter_profile = $node->parallax_twitter_profile;
} else {
$parallax_twitter_profile = '';
}
if(isset($node->parallax_twitter_back_top) && !empty($node->parallax_twitter_back_top)){
$parallax_twitter_back_top = $node->parallax_twitter_back_top;
} else {
$parallax_twitter_back_top = '';
}
if(isset($node->parallax_twitter_bgcolor) && !empty($node->parallax_twitter_bgcolor)){
$parallax_twitter_bgcolor = $node->parallax_twitter_bgcolor;
} else {
$parallax_twitter_bgcolor = '';
}
if(isset($node->parallax_twitter_num_tweets) && !empty($node->parallax_twitter_num_tweets)){
$parallax_twitter_num_tweets = $node->parallax_twitter_num_tweets;
} else {
$parallax_twitter_num_tweets = '';
}
if(isset($node->parallax_twitter_bgimg) && !empty($node->parallax_twitter_bgimg)){
$parallax_twitter_bgimg = $node->parallax_twitter_bgimg;
} else {
$parallax_twitter_bgimg = '';
}
?>
<div class="qoute parallaxbg webkit <?php if(isset($parallax_view) && !empty($parallax_view)){ echo $parallax_view.'-width';} else { echo 'parallax-full-width';}?>" style="<?php if($parallax_twitter_bgimg <> '') { ?>background-image: url(<?php echo $parallax_twitter_bgimg; ?>);<?php } if(isset($parallax_height) && !empty($parallax_height)){ ?> height: <?php echo $parallax_height ?>px; <?php } if(isset($parallax_twitter_bgcolor) && !empty($parallax_twitter_bgcolor)){ ?>background-color:<?php echo $parallax_twitter_bgcolor; ?>; margin-bottom:<?php echo $parallax_margin_bottom?>px; margin-top:<?php echo $parallax_margin_top?>px; <?php }?>">
<div class='container'>
<span class="pattren twitter-pattren"></span>
<span class=" colorpatrn"></span>
<?php if($parallax_twitter_back_top=='Y'){ echo '<a href="#" class="go-to-top absolute bordercolr" id="back-top"></a>';}?>
<!-- Container Start -->
<script>
jQuery(document).ready(function($){
jQuery("#carousellist").jcarousel({
vertical: true,
scroll: 1,
auto: 8,
wrap: "circular",
buttonNextHTML: null,
buttonPrevHTML: null
});
});
</script>
<div id="carousellist">
<ul>
<?php
if (strlen($parallax_twitter_profile) > 1) {
$return = '';
$response = '';
$exclude_replies = '0';
$include_rts = '0';
$token = get_option('TWITTER_BEARER_TOKEN');
if ($token && $parallax_twitter_profile) {
$args = array(
'httpversion' => '1.1',
'blocking' => true,
'headers' => array(
'Authorization' => "Bearer $token"
)
);
add_filter('https_ssl_verify', '__return_false');
$api_url = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=$parallax_twitter_profile&count=$parallax_twitter_num_tweets&exclude_replies=$exclude_replies&include_rts=$include_rts";
$response = wp_remote_get($api_url, $args);
if (!is_wp_error($response) and $response <> "") {
$tweets = json_decode($response['body']);
foreach ($tweets as $i => $tweet) {
$text = $tweet->{'text'};
foreach ($tweet->{'entities'} as $type => $entity) {
if ($type == 'urls') {
foreach ($entity as $j => $url) {
$update_with = '<a href="' . $url->{'url'} . '" target="_blank" title="' . $url->{'expanded_url'} . '">' . $url->{'display_url'} . '</a>';
$text = str_replace($url->{'url'}, $update_with, $text);
}
} else if ($type == 'hashtags') {
foreach ($entity as $j => $hashtag) {
$update_with = '<a href="https://twitter.com/search?q=%23' . $hashtag->{'text'} . '&src=hash" target="_blank" title="' . $hashtag->{'text'} . '">#' . $hashtag->{'text'} . '</a>';
$text = str_replace('#' . $hashtag->{'text'}, $update_with, $text);
}
} else if ($type == 'user_mentions') {
foreach ($entity as $j => $user) {
$update_with = '<a href="https://twitter.com/' . $user->{'screen_name'} . '" target="_blank" title="' . $user->{'name'} . '">@' . $user->{'screen_name'} . '</a>';
$text = str_replace('@' . $user->{'screen_name'}, $update_with, $text);
}
}
}
$large_ts = time();
$n = $large_ts - strtotime($tweet->{'created_at'});
if ($n < (60)) {
$posted = sprintf(__('%d seconds ago', 'rotatingtweets'), $n);
} elseif ($n < (60 * 60)) {
$minutes = round($n / 60);
$posted = sprintf(_n('About a Minute Ago', '%d Minutes Ago', $minutes, 'rotatingtweets'), $minutes);
} elseif ($n < (60 * 60 * 16)) {
$hours = round($n / (60 * 60));
$posted = sprintf(_n('About an Hour Ago', '%d Hours Ago', $hours, 'rotatingtweets'), $hours);
} elseif ($n < (60 * 60 * 24)) {
$hours = round($n / (60 * 60));
$posted = sprintf(_n('About an Hour Ago', '%d Hours Ago', $hours, 'rotatingtweets'), $hours);
} elseif ($n < (60 * 60 * 24 * 6.5)) {
$days = round($n / (60 * 60 * 24));
$posted = sprintf(_n('About a Day Ago', '%d Days Ago', $days, 'rotatingtweets'), $days);
} elseif ($n < (60 * 60 * 24 * 7 * 3.5)) {
$weeks = round($n / (60 * 60 * 24 * 7));
$posted = sprintf(_n('About a Week Ago', '%d Weeks Ago', $weeks, 'rotatingtweets'), $weeks);
} elseif ($n < (60 * 60 * 24 * 7 * 4 * 11.5)) {
$months = round($n / (60 * 60 * 24 * 7 * 4));
$posted = sprintf(_n('About a Month Ago', '%d Months Ago', $months, 'rotatingtweets'), $months);
} elseif ($n >= (60 * 60 * 24 * 7 * 4 * 12)) {
$years = round($n / (60 * 60 * 24 * 7 * 52));
$posted = sprintf(_n('About a year Ago', '%d years Ago', $years, 'rotatingtweets'), $years);
}
$user = $tweet->{'user'};
$return .= '<li><div class="twitter-inner"><i class="icon-twitter icon-3 relative"></i>';
$return .= "<h1 class='heading-color'>" . $text . "</h1>";
$return .= '<a href="http://www.twitter.com/' . $parallax_twitter_profile . '" class="twitter-anker">' . $parallax_twitter_profile . '</a>';
$return .= "<a class='twitter-anker'>" . $posted . "</a>";
$return .= "</li>";
}
echo $return;
}
} else {
if ($response <> "") {
echo $response->errors['http_failure'][0];
} else {
echo "'._e('No results found.', 'Love Pray').'";
}
}
?>
<?php
} else {
echo '<h4 class="heading-color">No User information given.</h4>';
}
?>
</ul>
</div>
</div>
</div>
</div>
<?php
} elseif ($parallax_element == 'blog') {
if ( !isset($node->parallax_blog_category) or $node->parallax_blog_category == "" ) { $node->parallax_blog_category = ''; }
if ( !isset($node->parallax_blog_num_post) or $node->parallax_blog_num_post == "" ) { $node->parallax_blog_num_post = ''; }
if ( !isset($node->parallax_blog_bgimg) or $node->parallax_blog_bgimg == "" ) { $node->parallax_blog_bgimg = ''; }
if ( !isset($node->parallax_blog_bgcolor) or $node->parallax_blog_bgcolor == "" ) { $node->parallax_blog_bgcolor = ''; }
if (empty($_GET['page_id_all']))
$_GET['page_id_all'] = 1;
$argss = array('posts_per_page' => "-1", 'paged' => $_GET['page_id_all'], 'cat' => "$node->parallax_blog_category", 'post_status' => 'publish');
$custom_query = new WP_Query($argss);
$post_count = $custom_query->post_count;
$args = array('posts_per_page' => "$node->parallax_blog_num_post", 'cat' => "$node->parallax_blog_category", 'post_status' => 'publish');
$custom_query = new WP_Query($args);
?>
<div class="parallax parallaxbg align-center bolg_column <?php if(isset($parallax_view) && !empty($parallax_view)){ echo $parallax_view.'-width';} else { echo 'parallax-full-width';}?>" style="background-position: 50% -5px; <?php if ($node->parallax_blog_bgimg <> '') { ?>background-image: url(<?php echo $node->parallax_blog_bgimg; ?>);<?php } if(isset($node->parallax_height) && !empty($node->parallax_height)){ ?> height: <?php echo $node->parallax_height ?>px; <?php } if(isset($node->parallax_blog_bgcolor) && !empty($node->parallax_blog_bgcolor)){ ?>background-color:<?php echo $node->parallax_blog_bgcolor; ?>; margin-bottom:<?php echo $parallax_margin_bottom?>px; margin-top:<?php echo $parallax_margin_top?>px; <?php }?>">
<span class="pattren blog-pattren"></span>
<!-- Blog Start -->
<div class='container'>
<?php
cs_enqueue_jcarousel_style_script();
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#mycarouselblog3').jcarousel({scroll:1 });
});
</script>
<?php
echo '<ul class="jcarousel-skin-tango" id="mycarouselblog3">';
if(have_posts()):
while ($custom_query->have_posts()) : $custom_query->the_post();
$post_xml = get_post_meta($post->ID, "post", true);
if ( $post_xml <> "" ) {
$xmlObject = new SimpleXMLElement($post_xml);
$post_view = $xmlObject->post_thumb_view;
$post_image = $xmlObject->post_thumb_image;
$post_video = $xmlObject->post_thumb_video;
$post_slider = $xmlObject->post_thumb_slider;
$post_slider_type = $xmlObject->post_thumb_slider_type;
$width = 585;
$height = 440;
$image_url = cs_get_post_img_src($post->ID, $width, $height);
}else{
$post_view ='';
}
?>
<!-- List Post Start -->
<li>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
<!-- Blog Post Thumbnail Start -->
<figure>
<?php
if ($post_view == "Map" and $post_view <> ''){
$node->map_lat = $xmlObject->post_thumb_map_lat;
$node->map_lon = $xmlObject->post_thumb_map_lon;
$node->map_zoom = $xmlObject->post_thumb_map_zoom;
$node->map_address = $xmlObject->post_thumb_map_address;
$node->map_controls = $xmlObject->post_thumb_map_controls;
$node->map_height = $height;
echo cs_map_page();
}elseif( $post_view == "Slider" and $post_slider_type == "Flex Slider" and $post_view <> ''){
cs_flex_slider($width,$height,$post_slider);
}elseif ( $post_view == "Slider" and $post_slider_type == "Nivo Slider" and $post_view <> ''){
cs_nivo_slider($width,$height,$post_slider);
}elseif($post_view == "Single Image" and $post_view <> ''){
cs_enqueue_gallery_style_script();
echo "<a href='".get_permalink()."' ><img src='".$image_url."' alt=''><span class='icon-hover'><i class='icon-reorder'></i></span></a>";
}elseif($post_view == "Video" and $post_view <> ''){
$url = parse_url($post_video);
if($url['host'] == $_SERVER["SERVER_NAME"]){?>
<video width="585" class="mejs-wmp" height="440" src="<?php echo $post_video ?>" id="player1" poster="<?php echo $image_url; ?>" controls="controls" preload="none"></video>
<?php
}else{
echo wp_oembed_get($post_video,array('width'=>400,'height' => 224));
}
}elseif($post_view == "Audio" and $post_audio <> ''){
?>
<audio style="width:100%;" src="<?php echo $post_audio; ?>" controls="controls"></audio>
<?php
}
echo "<figcaption>
<header><h6><a href='".get_permalink()."'>".substr(get_the_title(),0,25)."</a></h6></header>
<div class='peragraph webkit'>"; ?>
<p><?php echo cs_get_the_excerpt(150,true) ?></p>
<?php
echo "</div>
</figcaption>";
?>
</figure>
<!-- Text Start -->
<div class="text webkit">
<ul class="post-options">
<li>
<?php
/* translators: used between list items, there is a space after the comma */
$before_cat = " ".__( '','Perspective' )."";
$categories_list = get_the_term_list ( get_the_id(), 'category', $before_cat, ', ', '' );
if ( $categories_list ){
printf( __( '%1$s', 'Perspective' ),$categories_list );
} // End if categories
?>
</li>
<li>
<p><?php echo get_the_date();?></p>
</li>
</ul>
</div>
<!-- Text End -->
</article>
<!-- Blog Post Thumbnail Start -->
</li>
<!-- Blog Post End -->
<?php endwhile; endif;
echo '</ul>';
?>
</div>
</div>
<!-- Blog End -->
<?php
} elseif ($parallax_element == 'portfolio') {
if ( !isset($node->parallax_portfolio_category) or $node->parallax_portfolio_category == "" ) { $node->parallax_portfolio_category = ''; }
if ( !isset($node->parallax_portfolio_num_post) or $node->parallax_portfolio_num_post == "" ) { $node->parallax_portfolio_num_post = ''; }
if ( !isset($node->parallax_portfolio_bgimg) or $node->parallax_portfolio_bgimg == "" ) { $node->parallax_portfolio_bgimg = ''; }
if ( !isset($node->parallax_portfolio_bgcolor) or $node->parallax_portfolio_bgcolor == "" ) { $node->parallax_portfolio_bgcolor = ''; }
if (empty($_GET['page_id_all']))
$_GET['page_id_all'] = 1;
$argms = array(
'posts_per_page' => "-1",
'post_type' => 'Portfolio',
'cat_id' => "$node->parallax_portfolio_category",
'post_status' => 'publish',
'order' => 'ASC',
);
$custom_query = new WP_Query($argms);
$post_count = $custom_query->post_count;
$args = array(
'posts_per_page' => "$node->parallax_portfolio_num_post",
'post_type' => 'Portfolio',
'cat_id' => "$node->parallax_portfolio_category",
'post_status' => 'publish',
'order' => 'DESC',
);
$custom_query = new WP_Query($args);
?>
<div class="qoute parallaxbg webkit <?php if(isset($parallax_view) && !empty($parallax_view)){ echo $parallax_view.'-width';} else { echo 'parallax-full-width';}?> " style="background-position: 50% -5px; <?php if ($node->parallax_portfolio_bgimg <> '') { ?>background-image: url(<?php echo $node->parallax_portfolio_bgimg; ?>);<?php } if(isset($node->parallax_height) && !empty($node->parallax_height)){ ?> height: <?php echo $node->parallax_height ?>px; <?php } if(isset($node->parallax_portfolio_bgcolor) && !empty($node->parallax_portfolio_bgcolor)){ ?>background-color:<?php echo $node->parallax_portfolio_bgcolor; ?>; margin-bottom:<?php echo $parallax_margin_bottom?>px; margin-top:<?php echo $parallax_margin_top?>px; <?php }?>">
<span class="pattren portfolio-pattren"></span>
<div class='container'>
<?php
cs_enqueue_jcarousel_style_script();
?>
<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery('#parallelax_portfolio_carousel').jcarousel({scroll:1 ,wrap:'circular'});
});
</script>
<div class="wrapper-slider">
<div class="portfolio jcarousel-skin-tango">
<ul id="parallelax_portfolio_carousel">
<?php
if(have_posts()):
while ($custom_query->have_posts()) : $custom_query->the_post();
$post_xml = get_post_meta($post->ID, "portfolio", true);
if($post_xml <> ''){
$xmlObject = new SimpleXMLElement($post_xml);
$post_view = $xmlObject->portfolio_thumb_view;
$post_video = $xmlObject->portfolio_thumb_video;
$post_audio = $xmlObject->portfolio_thumb_audio;
$post_slider = $xmlObject->portfolio_thumb_slider;
$post_slider_type = $xmlObject->portfolio_thumb_slider_type;
$width = 585;
$height = 440;
}
$image_url = cs_get_post_img_src($post->ID,585,440);
$categories_list = get_the_terms($post->ID,'portfolio-category');
$conter = 1;
foreach($categories_list as $cat){
$cats[0] = 'mix';
$cats[$conter] =$cat->slug;
$conter++;
}
?>
<li>
<!-- Article Start -->
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> >
<figure class="audio">
<?php
if ($post_view == "Map" and $post_view <> ''){
$node->map_lat = $xmlObject->post_thumb_map_lat;
$node->map_lon = $xmlObject->post_thumb_map_lon;
$node->map_zoom = $xmlObject->post_thumb_map_zoom;
$node->map_address = $xmlObject->post_thumb_map_address;
$node->map_controls = $xmlObject->post_thumb_map_controls;
$node->map_height = $height;
echo cs_map_page();
}elseif( $post_view == "Slider" and $post_slider_type == "Flex Slider" and $post_view <> ''){
cs_flex_slider($width,$height,$post_slider);
}elseif ( $post_view == "Slider" and $post_slider_type == "Nivo Slider" and $post_view <> ''){
cs_nivo_slider($width,$height,$post_slider);
}elseif($post_view == "Single Image" and $post_view <> ''){
cs_enqueue_gallery_style_script();
echo "<a class='icon-hover' href='".get_permalink()."' ><img src='".$image_url."' alt=''></a>";
?>
<figcaption class="bordercolr webkit">
<div class="portfolio-effect">
<?php
$before_tag = " ";
$tags_list = get_the_term_list ( get_the_id(), 'portfolio-tag',$before_tag, '', '' );
if ( $tags_list){
?>
<a class="icon-style"> <i class="icon-link"></i></a>
<div class="hover-text">
<p>
<?php
printf( __( '%2$s', 'Perspective' ),$before_tag,$tags_list );
?>
</p>
</div>
<?php }?>
</div>
</figcaption>
<?php
}elseif($post_view == "Video" and $post_view <> ''){
$url = parse_url($post_video);
if($url['host'] == $_SERVER["SERVER_NAME"]){?>
<video width="100%" class="mejs-wmp" height="370" src="<?php echo $post_video ?>" id="player1" poster="<?php echo $image_url; ?>" controls="controls" preload="none"></video>
<?php
}else{
echo wp_oembed_get($post_video,array('width'=>360,'height' => 370));
}
}elseif($post_view == "Audio" and $post_audio <> ''){
?>
<audio style="width:100%;" src="<?php echo $post_audio; ?>" controls="controls"></audio>
<?php
}
?>
</figure>
<!-- Text Start -->
<div class="text">
<h6>
<?php echo "<a href='".get_permalink()."'>".substr(get_the_title(),0,30)."...</a>";?>
</h6>
<span class="cuting_border"></span>
<span class="border_arrow"></span>
</div>
<!-- Text End --> </article>
<!-- Article End -->
</li>
<?php endwhile; endif; ?>
</ul>
</div>
</div>
</div>
</div>
<?php
} elseif ($parallax_element == 'map') {
if ( !isset($node->parallax_map_lat) or $node->parallax_map_lat == "" ) { $node->parallax_map_lat = 0; }
if ( !isset($node->parallax_map_bgcolor) or $node->parallax_map_bgcolor == "" ) { $node->parallax_map_bgcolor = 0; }
if ( !isset($node->parallax_map_lon) or $node->parallax_map_lon == "" ) { $node->parallax_map_lon = 0; }
if ( !isset($node->parallax_map_zoom) or $node->parallax_map_zoom == "" ) { $node->parallax_map_zoom = 11; }
if ( !isset($node->parallax_map_info_width) or $node->parallax_map_info_width == "" ) { $node->parallax_map_info_width = 200; }
if ( !isset($node->parallax_map_info_height) or $node->parallax_map_info_height == "" ) { $node->parallax_map_info_height = 100; }
if ( !isset($node->parallax_map_show_marker) or $node->parallax_map_show_marker == "" ) { $node->parallax_map_show_marker = 'true'; }
if ( !isset($node->parallax_map_controls) or $node->parallax_map_controls == "" ) { $node->parallax_map_controls = 'false'; }
if ( !isset($node->parallax_map_scrollwheel) or $node->parallax_map_scrollwheel == "" ) { $node->parallax_map_scrollwheel = 'true'; }
if ( !isset($node->parallax_map_draggable) or $node->parallax_map_draggable == "" ) { $node->parallax_map_draggable = 'true'; }
if ( !isset($node->parallax_map_type) or $node->parallax_map_type == "" ) { $node->parallax_map_type = 'ROADMAP'; }
if ( !isset($node->parallax_map_info)) { $node->parallax_map_info = ''; }
if( !isset($node->parallax_map_marker_icon)){ $node->parallax_map_marker_icon = ''; }
if( !isset($node->parallax_map_title)){ $node->parallax_map_title ='';}
if( !isset($node->parallax_map_element_size)){ $node->parallax_map_element_size ='default';}
$map_show_marker = '';
?>
<div class="qoute parallaxbg webkit <?php if(isset($parallax_view) && !empty($parallax_view)){ echo $parallax_view.'-width';} else { echo 'parallax-full-width';}?>" style="<?php if(isset($node->parallax_height) && !empty($node->parallax_height)){ ?> height: <?php echo $node->parallax_height ?>px; <?php } if(isset($node->parallax_map_bgcolor) && !empty($node->parallax_map_bgcolor)){ ?>background-color:<?php echo $node->parallax_map_bgcolor; ?>; margin-bottom:<?php echo $parallax_margin_bottom?>px; margin-top:<?php echo $parallax_margin_top?>px; <?php }?>">
<?php if($parallax_view=='parallax-boxed'){?>
<div class='container'>
<?php }?>
<?php
if ( $node->parallax_map_show_marker == "true" ) {
$map_show_marker = " var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: '',
icon: '".$node->parallax_map_marker_icon."',
shadow:''
});
";
}
//wp_enqueue_script('googleapis', 'https://maps.googleapis.com/maps/api/js?sensor=true', '', '', true);
$html = '<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>';
$html .= '<div class="webkit map_sec">';
$html .= '<h1 class="color heading-color">'.$node->map_title.'</h1>';
$html .= '<div class="mapcode iframe mapsection gmapwrapp" id="map_canvas'.$counter_node.'" style="height:'.$node->parallax_map_height.'px;"> </div>';
$html .= '</div>';
$html .= "<script type='text/javascript'>
function initialize() {
var myLatlng = new google.maps.LatLng(".$node->parallax_map_lat.", ".$node->parallax_map_lon.");
var mapOptions = {
zoom: ".$node->parallax_map_zoom.",
scrollwheel: ".$node->parallax_map_scrollwheel.",
draggable: ".$node->parallax_map_draggable.",
center: myLatlng,
mapTypeId: google.maps.MapTypeId.".$node->parallax_map_type." ,
disableDefaultUI: ".$node->parallax_map_controls.",
}
var map = new google.maps.Map(document.getElementById('map_canvas".$counter_node."'), mapOptions);
var infowindow = new google.maps.InfoWindow({
content: '".$node->parallax_map_info."',
maxWidth: ".$node->parallax_map_info_width.",
maxHeight:".$node->parallax_map_info_height.",
});
".$map_show_marker."
//google.maps.event.addListener(marker, 'click', function() {
if (infowindow.content != ''){
infowindow.open(map, marker);
map.panBy(1,-60);
google.maps.event.addListener(marker, 'click', function(event) {
infowindow.open(map, marker);
});
}
//});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>";
echo $html;
if($node->parallax_view=='Boxed View'){
echo '</div>';
}
echo '</div>';
} elseif ($parallax_element == 'custom') {
if ( !isset($node->parallax_custom_text) or $node->parallax_custom_text == "" ) { $node->parallax_custom_text = ''; }
if ( !isset($node->parallax_custom_img) or $node->parallax_custom_img == "" ) { $node->parallax_custom_img = ''; }
if ( !isset($node->parallax_custom_back_top) or $node->parallax_custom_back_top == "" ) { $node->parallax_custom_back_top = ''; }
if ( !isset($node->parallax_custom_bgcolor) or $node->parallax_custom_bgcolor == "" ) { $parallax_custom_bgcolor = ''; }
?>
<!-- Qoute Start -->
<div class="qoute parallaxbg webkit <?php if(isset($parallax_view) && !empty($parallax_view)){ echo $parallax_view.'-width';} else { echo 'parallax-full-width';}?>" style="<?php if ($node->parallax_custom_img <> '') { ?> background-image: url(<?php echo $node->parallax_custom_img; ?>);<?php } if(isset($node->parallax_height) && !empty($node->parallax_height)){ ?> height: <?php echo $node->parallax_custom_height ?>px; <?php } if(isset($node->parallax_custom_bgcolor) && !empty($node->parallax_custom_bgcolor)){ ?>background-color:<?php echo $node->parallax_custom_bgcolor; ?>; <?php }?> margin-bottom:<?php echo $parallax_margin_bottom?>px; margin-top:<?php echo $parallax_margin_top?>px; ">
<div class='container'>
<span class="pattren perralex-pattren"></span>
<?php if ($node->parallax_custom_back_top == 'Y'){ echo '<a id="back-top" class="go-to-top absolute bordercolr" href="#"></a>';} ?>
<div class="custom-text">
<?php if ($node->parallax_custom_text <> ''){ echo $node->parallax_custom_text;} ?>
</div>
</div>
<!-- Qoute End -->
</div>
<?php
}
echo '</div>';
}
// page bulider items front end end
if ( ! function_exists( 'cs_contact_submit' ) ) {
function cs_contact_submit(){
foreach ($_REQUEST as $keys=>$values) {
$$keys = $values;
}
$subject = "(" . $bloginfo . ") Contact Form Received";
$message = '
<table width="100%" border="1">
<tr><td width="100"><strong>Name:</strong></td><td>'.$contact_name.'</td></tr>
<tr><td><strong>Email:</strong></td><td>'.$contact_email.'</td></tr>
<tr><td><strong>Contact No.</strong></td><td>'.$contact_no.'</td></tr>
<tr><td><strong>Message:</strong></td><td>'.$contact_msg.'</td></tr>
<tr><td><strong>IP Address:</strong></td><td>'.$_SERVER["REMOTE_ADDR"].'</td></tr>
</table>
';
$headers = "From: " . $contact_name . "\r\n";
$headers .= "Reply-To: " . $contact_email . "\r\n";
$headers .= "Content-type: text/html; charset=utf-8" . "\r\n";
$headers .= "MIME-Version: 1.0" . "\r\n";
$attachments = '';
wp_mail( $cs_contact_email, $subject, $message, $headers, $attachments );
//mail($cs_contact_email, $subject, $message, $headers);
echo $cs_contact_succ_msg;
die();
}
}
add_action('wp_ajax_contact_submit', 'contact_submit');
function cs_color_switcher(){
global $cs_theme_option;
if ( $cs_theme_option['color_switcher'] == "on" ) {
if ( empty($_POST['patter_or_bg']) ){
$_POST['patter_or_bg'] = '';
}
if ( empty($_POST['reset_color_txt']) ) {
$_POST['reset_color_txt'] = "";
}
else if ( $_POST['reset_color_txt'] == "1" ) {
$_POST['layout_option'] = "";
$_POST['custome_pattern'] = "";
$_POST['bg_img'] = "";
$_POST['style_sheet'] = "";
$_POST['heading_color'] = "";
}
if ( $_POST['patter_or_bg'] == 0 ){
$_SESSION['sess_bg_img'] = '';
}
else if ( $_POST['patter_or_bg'] == 1 ){
$_SESSION['sess_custome_pattern'] = '';
}
if ( isset($_POST['layout_option']) ) {
$_SESSION['sess_layout_option'] = $_POST['layout_option'];
}
if ( isset($_POST['style_sheet']) ) {
$_SESSION['sess_style_sheet'] = $_POST['style_sheet'];
}
if ( isset($_POST['heading_color']) ) {
$_SESSION['sess_heading_color'] = $_POST['heading_color'];
}
if ( isset($_POST['custome_pattern']) ) {
$_SESSION['sess_custome_pattern'] = $_POST['custome_pattern'];
}
if ( isset($_POST['bg_img']) ) {
$_SESSION['sess_bg_img'] = $_POST['bg_img'];
}
if ( empty($_SESSION['sess_layout_option']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_layout_option'] = "wrapper"; }
if ( empty($_SESSION['sess_header_styles']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_header_styles'] = ""; }
if ( empty($_SESSION['sess_style_sheet']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_style_sheet'] = "#175977"; }
if ( empty($_SESSION['sess_heading_color']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_heading_color'] = "#333"; }
if ( empty($_SESSION['sess_custome_pattern']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_custome_pattern'] = ""; }
if ( empty($_SESSION['sess_bg_img']) or $_POST['reset_color_txt'] == "1" ) { $_SESSION['sess_bg_img'] = ""; }
$theme_path = get_template_directory_uri();
wp_enqueue_style( 'wp-color-picker' );
wp_enqueue_script('iris',admin_url( 'js/iris.min.js' ), array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ),false, 1 );
wp_enqueue_script('wp-color-picker',admin_url( 'js/color-picker.min.js' ),array( 'iris' ),false,1);
$colorpicker_l10n = array(
'clear' => 'Clear',
'defaultString' => 'Default',
'pick' => 'Select Color'
);
wp_localize_script( 'wp-color-picker', 'wpColorPickerL10n', $colorpicker_l10n );
?>
<script type="text/javascript">
jQuery(document) .ready(function($){
jQuery("#togglebutton").click(function(){
jQuery("#sidebarmain").trigger('click')
jQuery(this).toggleClass('btnclose');
jQuery("#sidebarmain") .toggleClass('sidebarmain');
return false;
});
$("#pattstyles li label") .click(function(){
$("#backgroundimages li label") .removeClass("active");
$("#patter_or_bg") .attr("value","0");
var ah = $(this) .find('input[type="radio"]') .val();
$('body') .css({"background":"url(<?php echo $theme_path?>/images/pattern/pattern"+ah+".png)"});
});
$("#backgroundimages li label") .click(function(){
$("#patter_or_bg") .attr("value","1");
$("#pattstyles li label") .removeClass("active");
var ah = $(this) .find('input[type="radio"]') .val();
$('body') .css({"background":"url(<?php echo $theme_path?>/images/background/bg"+ah+".png) no-repeat center center / cover fixed"});
});
$("#backgroundimages li label,#pattstyles li label") .click(function(){
var classname=$(".layoutoption li:first-child label") .hasClass("active");
if(classname) {
alert("Please select Boxed View")
return false;
}else {
$(this) .parents(".selectradio") .find("label") .removeClass("active");
$(this) .addClass("active");
}
});
$(".layoutoption li label") .click(function(){
var th = $(this).find('input') .val();
$("#wrappermain-pix") .attr('class','');
$('#wrappermain-pix') .addClass(th);
$(this) .parents(".selectradio") .find("label") .removeClass("active");
$(this) .addClass("active");
jQuery(".top_strip").trigger('resize');
});
$(".accordion-sidepanel .innertext") .hide();
$(".accordion-sidepanel header") .click(function(){
if ($(this) .next() .is(":visible")){
$(".accordion-sidepanel .innertext") .slideUp(300);
$(".accordion-sidepanel header") .removeClass("active");
return false;
}
$(".accordion-sidepanel .innertext") .slideUp(300);
$(".accordion-sidepanel header") .removeClass("active");
$(this) .addClass("active");
$(this).next() .slideDown(300);
});
});
jQuery(document).ready(function($){
$(".colorpicker-main").click(function(){
$(this).find('.wp-color-result').trigger('click');
});
var cf = ".colr,.colrhover:hover, .widget-twitter .tweet h6 a, .thumblist .text > header h5 a:hover, .shar_btn:hover i, .accordion-heading .accordion-toggle:hover, .accordion-heading .accordion-toggle.active,.portfolio article:hover .text h6 a, .filter_nav ul li.selected-1 a, .filter_nav ul li.selected-2 a, .filter_nav ul li.selected-0 a, .filter_nav ul li a:hover,.blog_admin article:hover, .pagenone .navigation ul li a:hover, .count a, .comment-edit-link, .comment-reply-link, .comment-reply-title, .comment-reply-title a, .post-edit-link,.prject_main_text h4, .headlines article .text h6 a, .alert-info h4, .widget_tag_cloud a:hover,.bolg_column article:hover figcaption h4 a,.post-options li a:hover, .event article .text .top p a:hover, .pricing-box .plan-inside li span, .services article:hover .icon-lightbulb, .services article:hover .icon-bar-chart, .services article:hover .icon-laptop, .services article:hover .icon-external-link, .services article:hover h2 a,.team-shortcode article:hover, .testimonial-author, .detail_info article p a:hover";
var bc = "#submit-comment, .backcolr, .backcolrhover:hover, nav.navigation > ul > li.current-menu-item,nav.navigation > ul > li.current_page_item, .jcarousel-control a.active, \
.jcarousel-skin-tango .jcarousel-next-horizontal:hover, .jcarousel-skin-tango .jcarousel-prev-horizontal:hover, .upcoming_event article:hover .date, \
.widget_categories ul li:hover, .postlist article figure a img:before, .coursesarticle:hover .rating, #wp-calendar caption, #wp-calendar tbody td a, .table thead, \
.countdownit span.countdown_section, .typo p:first-letter, .widget_archive ul li:hover, .widget_nav_menu ul li a:hover, .widget_links ul li:hover, \
.widget_meta ul li:hover, .widget_pages ul li a:hover, .widget_recent_entries ul li:hover, .widget_recent_comments ul li:hover, .postlist .blog_text:before, \
.blog article #flexslider .flex-direction-nav a:hover,.audiobox ,#banner .flexslider .flex-control-nav li a.flex-active, \
.dropcap:first-letter, .vertical .nav-tabs li.active a, .wpcf7-submit, .nivo-directionNav a:hover, .show-nav-testimonial .flex-direction-nav a:hover, .widget_ns_mailchimp input[type='submit'], \
.services article.service-v2:hover a i";
var boc = ".bordercolr, .bordercolrhover:hover, nav.navigation > ul > li.current-menu-item > a:before, #respond form p input:focus, #respond form p textarea:focus";
var boc2 =".coursesarticle:hover .rating:before, .blog_admin article:hover .cuting_border, .team-shortcode article:hover .cuting_border";
var styleheading ="h2.cs-heading-color,h6.cs-heading-color,.cs-heading-color";
$('#themecolor .bg_color').wpColorPicker({
change:function(event,ui){
var a = ui.color.toString();
$("#stylecss") .remove();
$("<style type='text/css' id='stylecss'>"+cf+"{color:"+a+" !important}"+bc+"{background-color:"+a+" !important}"+boc+"{border-color:"+a+" !important}"+boc2+"{border-color:transparent "+a+" !important}</style>").insertAfter("#wrappermain-pix");
}
});
$('#headingcolor .bg_color').wpColorPicker({
change:function(event,ui){
var a = ui.color.toString();
$("#stylecsstwo") .remove();
$("<style type='text/css' id='stylecsstwo'>"+styleheading+"{color:"+a+" !important}</style>").insertAfter("#wrappermain-pix");
}
});
});
function reset_color(){
jQuery("#reset_color_txt").attr('value',"1")
jQuery("#color_switcher").submit();
}
</script>
<div id="sidebarmain">
<span id="togglebutton"> </span>
<div id="sidebar">
<form method="post" id="color_switcher" action="">
<aside class="rowside">
<header><h4>Layout options</h4></header>
<h5>Choose Your Layout Style</h5>
<ul class="layoutoption selectradio">
<li><label class="label_radio <?php if($_SESSION['sess_layout_option']=="wrapper")echo "active";?> "><img src="<?php echo $theme_path?>/images/admin/bg-btnwide.png" alt=""><input type="radio" name="layout_option" value="wrapper" ></label></li>
<li><label class="label_radio <?php if($_SESSION['sess_layout_option']=="wrapper_boxed")echo "active";?> "><img src="<?php echo $theme_path?>/images/admin/bg-btnboxed.png" alt=""><input type="radio" name="layout_option" value="wrapper_boxed" ></label></li>
</ul>
<label for="bgcolor" id="themecolor" class="colorpicker-main">
<img src="<?php echo $theme_path?>/images/admin/img-colorpan.png" alt="">
<h5>Theme Color</h5>
<input id="bgcolor" name="style_sheet" type="text" class="bg_color" value="<?php echo $_SESSION['sess_style_sheet'];?>" /></label>
<label for="headingcolorbg" id="headingcolor" class="colorpicker-main">
<img src="<?php echo $theme_path?>/images/admin/img-colorpan.png" alt="">
<h5>Heading Color</h5>
<input id="headingcolorbg" name="heading_color" type="text" class="bg_color" value="<?php echo $_SESSION['sess_heading_color'];?>" /></label>
</aside>
<div class="accordion-sidepanel">
<aside class="rowside">
<header> <h4>Pattren Styles</h4></header>
<div class="innertext">
<div id="pattstyles" class="itemstyles selectradio">
<ul>
<li><label <?php if($_SESSION['sess_custome_pattern']=="1")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern1.png" alt=""><input type="radio" name="custome_pattern" value="1"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="2")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern2.png" alt=""><input type="radio" name="custome_pattern" value="2"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="3")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern3.png" alt=""><input type="radio" name="custome_pattern" value="3"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="4")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern4.png" alt=""><input type="radio" name="custome_pattern" value="4"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="5")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern5.png" alt=""><input type="radio" name="custome_pattern" value="5"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="6")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern6.png" alt=""><input type="radio" name="custome_pattern" value="6"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="7")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern7.png" alt=""><input type="radio" name="custome_pattern" value="7"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="8")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern8.png" alt=""><input type="radio" name="custome_pattern" value="8"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="9")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern9.png" alt=""><input type="radio" name="custome_pattern" value="9"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="10")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern10.png" alt=""><input type="radio" name="custome_pattern" value="10"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="11")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern11.png" alt=""><input type="radio" name="custome_pattern" value="11"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="12")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern12.png" alt=""><input type="radio" name="custome_pattern" value="12"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="13")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern13.png" alt=""><input type="radio" name="custome_pattern" value="13"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="14")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern14.png" alt=""><input type="radio" name="custome_pattern" value="14"></label></li>
<li><label <?php if($_SESSION['sess_custome_pattern']=="15")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/pattern/pattern15.png" alt=""><input type="radio" name="custome_pattern" value="15"></label></li>
</ul>
</div>
</div>
</aside>
<aside class="rowside">
<header><h4>Background Images</h4></header>
<div class="innertext">
<div id="backgroundimages" class="selectradio">
<ul>
<li><label <?php if($_SESSION['sess_bg_img']=="1")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background1.png" alt=""><input type="radio" name="bg_img" value="1"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="2")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background2.png" alt=""><input type="radio" name="bg_img" value="2"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="3")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background3.png" alt=""><input type="radio" name="bg_img" value="3"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="4")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background4.png" alt=""><input type="radio" name="bg_img" value="4"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="5")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background5.png" alt=""><input type="radio" name="bg_img" value="5"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="6")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background6.png" alt=""><input type="radio" name="bg_img" value="6"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="7")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background7.png" alt=""><input type="radio" name="bg_img" value="7"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="8")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background8.png" alt=""><input type="radio" name="bg_img" value="8"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="9")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background9.png" alt=""><input type="radio" name="bg_img" value="9"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="10")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background10.png" alt=""><input type="radio" name="bg_img" value="10"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="11")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background11.png" alt=""><input type="radio" name="bg_img" value="11"></label></li>
<li><label <?php if($_SESSION['sess_bg_img']=="12")echo "class='active'";?> ><img src="<?php echo $theme_path?>/images/background/background12.png" alt=""><input type="radio" name="bg_img" value="12"></label></li>
</ul>
</div>
</div>
</aside>
</div>
<div class="buttonarea">
<input type="submit" value="Apply" class="btn" />
<input type="hidden" name="patter_or_bg" id="patter_or_bg" value="1" />
<input type="hidden" name="reset_color_txt" id="reset_color_txt" value="" />
<input type="reset" value="Reset" class="btn" onclick="javascript:reset_color()" />
</div>
</form>
</div>
</div>
<?php
}
}
function cs_get_the_excerpt($limit,$readmore = '') {
global $cs_theme_option;
$get_the_excerpt = trim(preg_replace('/<a[^>]*>(.*)<\/a>/iU', '', get_the_content()));
echo substr($get_the_excerpt, 0, "$limit");
if (strlen($get_the_excerpt) > "$limit") {
if($readmore == "true"){
echo '... <a href="' . get_permalink() . '" class="colr">' . $cs_theme_option['trans_read_more'] . '</a>';
}
}
}
if ( ! function_exists( 'cs_nivo_slider' ) ) {
function cs_nivo_slider($width,$height,$slider_id){
global $node,$counter_node,$cs_theme_option;
$counter_node++;
if($slider_id == ''){
$slider_id = $node->slider;
}
$cs_meta_slider_options = get_post_meta($slider_id, "cs_meta_slider_options", true);
if ( $cs_meta_slider_options <> "" ) {?>
<div id="nivoslider">
<div class="slider-wrapper">
<div id="slider<?php echo $counter_node?>" class="nivoSlider">
<?php
$xmlObject = new SimpleXMLElement($cs_meta_slider_options);
$counter_nivo_slider = 0;
foreach ( $xmlObject->children() as $as_node ){
$counter_nivo_slider++;
//$image_url = wp_get_attachment_image_src($as_node->path, array($width,$height),true);
$image_url = cs_attachment_image_src($as_node->path,$width,$height);
if(isset($node)){
if ( is_page() and ( $node->getName() == "blog" || $node->getName() == "portfolio") ){
$as_node->title = '';
$as_node->description = '';
}
}
?>
<img src="<?php echo $image_url?>" data-thumb="<?php echo $image_url?>" alt="" title='<?php if($as_node->title != '' && $as_node->description != ''){ ?>
<div class="nivo-caption-in <?php echo $as_node->box_align?>">
<?php
if($as_node->title <> ''){
if($as_node->link <> ''){
$link = $as_node->link;
}else{
$link = '#';
}
echo '<h4 class="white"><a target="'.$as_node->link_target.'" class="white" href="'.$as_node->link.'">'.substr($as_node->title, 0, 30).'</a></h4>';
}
if($as_node->description != ''){
echo '<div class="clear"></div><div class="banner-text"><p>';
echo substr($as_node->description, 0, 220);
if ( strlen($as_node->description) > 220 ) echo "...";
echo '</p>
</div>';
}
?>
</div>
<?php } ?>' />
<?php }?>
</div>
</div>
</div>
<?php
if($cs_theme_option['nivo_auto_play'] == 'on'){$auto_play = 'false';}
else if($cs_theme_option['nivo_auto_play'] == ''){$auto_play= 'true';}
cs_enqueue_nivo_style_script();
?>
<script type="text/javascript">
jQuery(window).load(function() {
jQuery('#slider<?php echo $counter_node?>').nivoSlider({
effect:'<?php echo $cs_theme_option['nivo_effect'];?>',
manualAdvance:<?php echo $auto_play;?>,
animSpeed: <?php echo $cs_theme_option['nivo_animation_speed'];?>,
pauseTime: <?php echo $cs_theme_option['nivo_pause_time'];?>,
});
});
</script>
<!-- Slider height and width -->
<?php }
}
}
if ( ! function_exists( 'cs_flex_slider' ) ) {
function cs_flex_slider($width,$height,$slider_id){
global $node,$cs_theme_option,$counter_node;
$counter_node++;
if($slider_id == ''){
$slider_id = $node->slider;
}
if($cs_theme_option['flex_auto_play'] == 'on'){$auto_play = 'true';}
else if($cs_theme_option['flex_auto_play'] == ''){$auto_play = 'false';}
$cs_meta_slider_options = get_post_meta($slider_id, "cs_meta_slider_options", true);
?>
<!-- Flex Slider -->
<div id="flexslider<?php echo $counter_node; ?>">
<div class="flexslider">
<ul class="slides">
<?php
$counter = 1;
$xmlObject_flex = new SimpleXMLElement($cs_meta_slider_options);
foreach ( $xmlObject_flex->children() as $as_node ){
if(isset($node)){
if ( is_page() and ( $node->getName() == "blog" || $node->getName() == "portfolio") ){
$as_node->title = '';
$as_node->description = '';
}
}
$image_url = cs_attachment_image_src($as_node->path,$width,$height);
?>
<li>
<img src="<?php echo $image_url ?>" alt="" />
<!-- Caption Start -->
<?php
if($as_node->title != '' && $as_node->description != '' || $as_node->title != '' || $as_node->description != ''){
$as_node->cs_slider_link ="";
if($as_node->link <> ''){}
?>
<div class="caption">
<?php if($as_node->link <> ''){
echo '<a href="'.$as_node->link.'" target="'.$as_node->link_target.'">';
}
?>
<h1>0<?php echo $counter;?></h1>
<h1><i class="icon-plus-sign"></i><?php echo $as_node->title; ?></h1>
<p>
<?php
echo substr($as_node->description, 0, 220);
if ( strlen($as_node->description) > 220 ) echo "...";
?>
</p>
<div class="duration backcolr"><div class="loader"></div></div>
<?php if($as_node->link <> ''){
echo '</a>';
}
?>
</div>
<!-- Caption End -->
<?php } ?>
<div class="bannershadow"></div>
</li>
<?php
$counter++;
}
?>
</ul>
</div>
</div>
<?php cs_enqueue_flexslider_script(); ?>
<!-- Slider height and width -->
<!-- Flex Slider Javascript Files -->
<script type="text/javascript">
jQuery(window).load(function(){
var speed = <?php echo $cs_theme_option['flex_animation_speed']; ?>;
var slidespeed = <?php echo $cs_theme_option['flex_pause_time']; ?>;
jQuery('.flexslider').flexslider({
animation: "<?php echo $cs_theme_option['flex_effect']; ?>", // fade
slideshow: true,
slideshowSpeed:speed,
animationSpeed:slidespeed,
start: function(slider){
jQuery('body').removeClass('loading');
jQuery('.duration .loader').stop() .animate({"width":"100%"},speed-slidespeed);
},
before: function(){jQuery('.duration .loader').stop() .animate({"width":"0%"}) ;},
after: function(){jQuery('.duration .loader').stop() .animate({"width":"100%"},speed-slidespeed) ;}
});
});
</script>
<?php
}
}
if ( ! function_exists( 'cs_portfolio_gallery' ) ) {
function cs_portfolio_gallery($width,$height,$gallery_id,$gallery_type){
$cs_meta_gallery_options = get_post_meta($gallery_id, "cs_meta_gallery_options", true);
if ( $cs_meta_gallery_options <> "" ) {
$xmlObject = new SimpleXMLElement($cs_meta_gallery_options);
if($gallery_type == "Simple Gallery"){ ?>
<div class="span8">
<div class="staticmg">
<?php
for ( $i =0; $i < count($xmlObject); $i++ ) {
$path = $xmlObject->gallery[$i]->path;
$image_url = cs_attachment_image_src($path, $width, $height);
$image_url_full = cs_attachment_image_src($path, 0, 0);
?>
<img src="<?php echo $image_url; ?>" alt="">
<?php }?>
</div>
</div>
<?php
}else{
cs_enqueue_sly_style_script();
?>
<!-- Scroll Page Start -->
<div id="scroller">
<div id="basic" class="frame">
<ul>
<?php
for ( $i =0; $i < count($xmlObject); $i++ ) {
$path = $xmlObject->gallery[$i]->path;
$image_url = cs_attachment_image_src($path, $width, $height);
$image_url_full = cs_attachment_image_src($path, 0, 0);
?>
<li>
<figure><img src="<?php echo $image_url_full; ?>" alt=""></figure>
</li>
<?php }?>
</ul>
</div>
<div class="scrollbar">
<div class="handle">
<div class="mousearea"></div>
</div>
</div>
</div>
<!-- Scroll Page End -->
<script type="text/javascript">
jQuery(function($){
'use strict';
// -------------------------------------------------------------
// Basic Navigation
// -------------------------------------------------------------
(function () {
var $frame = $('#basic');
var $slidee = $frame.children('ul').eq(0);
var $wrap = $frame.parent();
// Call Sly on frame
$frame.sly({
horizontal: 1,
itemNav: 'basic',
smart: 1,
activateOn: 'click',
mouseDragging: 1,
touchDragging: 1,
releaseSwing: 1,
startAt: 3,
scrollBar: $wrap.find('.scrollbar'),
scrollBy: 1,
activatePageOn: 'click',
speed: 300,
elasticBounds: 1,
easing: 'easeOutCubic',
dragHandle: 1,
dynamicHandle: 1,
clickBar: 1,
// Buttons
prev: $wrap.find('.prev'),
next: $wrap.find('.next'),
});
}());
jQuery(window).resize(function(event) {
var $frame = $('#basic');
$frame.stop();
$frame.sly('reload');
});
});
</script>
<?php
}
}else{
}
}
}
function cs_meta_page($meta) {
global $cs_meta_page;
$meta = get_post_meta(get_the_ID(), $meta, true);
if ($meta <> '') {
$cs_meta_page = new SimpleXMLElement($meta);
return $cs_meta_page;
}
}
if ( ! function_exists( 'cs_meta_sidebar' ) ) {
function cs_meta_sidebar(){
global $cs_meta_page;
if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'right') {
echo "<aside class='sidebar-right span3'><div class='column'>";
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($cs_meta_page->sidebar_layout->cs_sidebar_right) ) : endif;
echo "</div></aside>";
}
else if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'left' ) {
echo "<aside class='sidebar-left span3'><div class='column'>";
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($cs_meta_page->sidebar_layout->cs_sidebar_left) ) : endif;
echo "</div></aside>";
}
}
}
if ( ! function_exists( 'cs_meta_content_class' ) ) {
function cs_meta_content_class(){
global $cs_meta_page,$video_width;
if ( $cs_meta_page->sidebar_layout->cs_layout == '' or $cs_meta_page->sidebar_layout->cs_layout == 'none' ) {
$content_class = "span12";
$video_width = 1170;
}
else if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'right' ) {
$content_class = "span9";
$video_width = 870;
}
else if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'left' ) {
$content_class = "span9";
$video_width = 870;
}
else if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and ($cs_meta_page->sidebar_layout->cs_layout == 'both' or $cs_meta_page->sidebar_layout->cs_layout == 'both_left' or $cs_meta_page->sidebar_layout->cs_layout == 'both_right')) {
$content_class = "span6";
$video_width = 570;
}else{
$content_class = "span12";
}
return $content_class;
}
}
if ( ! function_exists( 'cs_meta_sidebar_class' ) ) {
function cs_meta_sidebar_class(){
global $cs_meta_page;
if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'right' ) {
echo "sidebar-right span3";
}
else if ( $cs_meta_page->sidebar_layout->cs_layout <> '' and $cs_meta_page->sidebar_layout->cs_layout == 'left' ) {
echo "sidebar-left span3";
}
}
}
if ( ! function_exists( 'cs_default_pages_meta_content_class' ) ) {
function cs_default_pages_meta_content_class($layout){
if ( $layout == '' or $layout == 'none' ) {
echo "span12";
}
else if ( $layout <> '' and $layout == 'right' ) {
echo "content-left span9";
}
else if ( $layout <> '' and $layout == 'left' ) {
echo "content-right span9";
}
}
}
if ( ! function_exists( 'cs_default_pages_sidebar_class' ) ) {
function cs_default_pages_sidebar_class($layout){
if ( $layout <> '' and $layout == 'right' ) {
echo "sidebar-right span3";
}
else if ( $layout <> '' and $layout == 'left' ) {
echo "sidebar-left span3";
}
}
}
function cs_default_pages_sidebar(){
global $cs_theme_option;
if ( $cs_theme_option['cs_layout'] <> '' and $cs_theme_option['cs_layout'] == 'right' ) {
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($cs_theme_option['cs_sidebar_right']) ) : endif;
}
else if ( $cs_theme_option['cs_layout'] <> '' and $cs_theme_option['cs_layout'] == 'left' ) {
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($cs_theme_option['cs_sidebar_left']) ) : endif;
}
}
// change the default query variable start
function cs_change_query_vars($query) {
if (is_search() || is_archive() || is_author() || is_tax() || is_tag() || is_category() || is_home()) {
if (empty($_GET['page_id_all']))
$_GET['page_id_all'] = 1;
$query->query_vars['paged'] = $_GET['page_id_all'];
}
return $query; // Return modified query variables
}
add_filter('pre_get_posts', 'cs_change_query_vars'); // Hook our custom function onto the request filter
// change the default query variable end
// custom pagination start
if ( ! function_exists( 'cs_pagination' ) ) {
function cs_pagination($total_records, $per_page, $qrystr = '') {
$html = '';
$dot_pre = '';
$dot_more = '';
$total_page = ceil($total_records / $per_page);
$loop_start = $_GET['page_id_all'] - 2;
$loop_end = $_GET['page_id_all'] + 2;
if ($_GET['page_id_all'] < 3) {
$loop_start = 1;
if ($total_page < 5)
$loop_end = $total_page;
else
$loop_end = 5;
}
else if ($_GET['page_id_all'] >= $total_page - 1) {
if ($total_page < 5)
$loop_start = 1;
else
$loop_start = $total_page - 4;
$loop_end = $total_page;
}
if ($_GET['page_id_all'] > 1)
$html .= "<li class='prev'><a href='?page_id_all=" . ($_GET['page_id_all'] - 1) . "$qrystr' ></a></li>";
if ($_GET['page_id_all'] > 3 and $total_page > 5)
$html .= "<li><a href='?page_id_all=1$qrystr'>1</a></li>";
if ($_GET['page_id_all'] > 4 and $total_page > 6)
$html .= "<li> <a>. . .</a> </li>";
if ($total_page > 1) {
for ($i = $loop_start; $i <= $loop_end; $i++) {
if ($i <> $_GET['page_id_all'])
$html .= "<li><a href='?page_id_all=$i$qrystr'>" . $i . "</a></li>";
else
$html .= "<li><a class='active'>" . $i . "</a></li>";
}
}
if ($loop_end <> $total_page and $loop_end <> $total_page - 1)
$html .= "<li> <a>. . .</a> </li>";
if ($loop_end <> $total_page)
$html .= "<li><a href='?page_id_all=$total_page$qrystr'>$total_page</a></li>";
if ($_GET['page_id_all'] < $total_records / $per_page)
$html .= "<li class='next'><a href='?page_id_all=" . ($_GET['page_id_all'] + 1) . "$qrystr' ></a></li>";
return $html;
}
}
// pagination end
if ( ! function_exists( 'cs_social_share' ) ) {
function cs_social_share() {
$html = '';
$pageurl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$path = get_template_directory_uri() . "/images/admin/";
$cs_theme_option = get_option('cs_theme_option');
$twitter = $cs_theme_option['twitter_share'];
$facebook = $cs_theme_option['facebook_share'];
$linkedin = $cs_theme_option['linkedin_share'];
$google_plus = $cs_theme_option['google_plus_share'];
$tumblr = $cs_theme_option['tumblr_share'];
$pinterest = $cs_theme_option['pinterest_share'];
$html ='<div class="social-network">';
if ($twitter == 'on') {
$html .= '<a href="http://twitter.com/home?status=' . get_the_title() . ' - ' . $pageurl . '" target="_blank" data-original-title="Twitter" data-placement="top" class="icon-twitter-sign twitter icon-2x"></a>';
}
if ($facebook == 'on') {
$html .= '<a href="http://www.facebook.com/share.php?u=' . $pageurl . '&t=' . get_the_title() . '" target="_blank" data-original-title="Facebook" data-placement="top" class="icon-facebook-sign facebook icon-2x"></a>';
}
if ($linkedin == 'on') {
$html .= '<a href="http://www.linkedin.com/shareArticle?mini=true&url=' . $pageurl . '&title=' . get_the_title() . '" target="_blank" data-original-title="Linkedin" data-placement="top" class="icon-linkedin-sign linkedin icon-2x"></a>';
}
if ($pinterest == 'on') {
$html .= '<a href="http://pinterest.com/pin/create/button/?url=' . $pageurl . '&title=' . get_the_title() . '" target="_blank" data-original-title="Pinterest" data-placement="top" class="icon-pinterest-sign pinterest icon-2x"></a>';
}
if ( $google_plus == 'on') {
$html .= '<a href="https://plus.google.com/share?url='.get_permalink().'" target="_blank" data-original-title="Google Plus" data-placement="top" class="icon-google-plus-sign google_plus icon-2x"></a>';
}
$html .='</div>';
echo $html;
}
}
if ( ! function_exists( 'cs_social_network' ) ) {
function cs_social_network($tooltip='', $icon = 'icon-2'){
global $cs_theme_option;
$tooltip_data='';
echo '<div class="social-network">';
if(isset($cs_theme_option['social_net_title']) && $cs_theme_option['social_net_title'] <> ''){
echo '<h6>';
echo $cs_theme_option['social_net_title'];
echo '</h6>';
}
if(isset($tooltip) && $tooltip <> ''){
$tooltip_data='data-placement-tooltip="tooltip"';
}
if ( isset($cs_theme_option['social_net_url']) and count($cs_theme_option['social_net_url']) > 0 ) {
$i = 0;
foreach ( $cs_theme_option['social_net_url'] as $val ){
?>
<?php if($val != ''){?><a title="" href="<?php echo $val;?>" data-original-title="<?php echo $cs_theme_option['social_net_tooltip'][$i];?>" data-placement="top" <?php echo $tooltip_data;?> class="colrhover" target="_blank"><?php if($cs_theme_option['social_net_awesome'][$i] <> '' && isset($cs_theme_option['social_net_awesome'][$i])){?> <i class="<?php echo $cs_theme_option['social_net_awesome'][$i];?> <?php echo $icon;?>"></i><?php } else {?><img src="<?php echo $cs_theme_option['social_net_icon_path'][$i];?>" alt="<?php echo $cs_theme_option['social_net_tooltip'][$i];?>" /><?php }?></a><?php }
$i++;}
}
echo '</div>';
}
}
function cs_attachment_image_src($attachment_id, $width, $height) {
$image_url = wp_get_attachment_image_src($attachment_id, array($width, $height), true);
if ($image_url[1] == $width and $image_url[2] == $height)
;
else
$image_url = wp_get_attachment_image_src($attachment_id, "full", true);
$parts = explode('/uploads/',$image_url[0]);
if ( count($parts) > 1 ) return $image_url[0];
}
function cs_get_post_img_src($post_id, $width, $height) {
if(has_post_thumbnail()){
$image_id = get_post_thumbnail_id($post_id);
$image_url = wp_get_attachment_image_src($image_id, array($width, $height), true);
if ($image_url[1] == $width and $image_url[2] == $height) {
return $image_url[0];
} else {
$image_url = wp_get_attachment_image_src($image_id, "full", true);
return $image_url[0];
}
}
}
function cs_get_post_img($post_id, $width, $height) {
$image_id = get_post_thumbnail_id($post_id);
$image_url = wp_get_attachment_image_src($image_id, array($width, $height), true);
if ($image_url[1] == $width and $image_url[2] == $height) {
return get_the_post_thumbnail($post_id, array($width, $height));
} else {
return get_the_post_thumbnail($post_id, "full");
}
}
function cs_header_styles(){
global $cs_theme_option;
if ( isset($_POST['header_styles']) ) {
$_SESSION['sess_header_styles'] = $_POST['header_styles'];
$header_styles = $_SESSION['sess_header_styles'];
}
else if ( isset($_SESSION['sess_header_styles']) ) {
$header_styles = $_SESSION['sess_header_styles'];
}
else {
$header_styles = $cs_theme_option['header_styles'];
}
if ( $header_styles == "header2" ){
echo '<img src="'.$cs_theme_option['header_banner'].'" alt="" />';
echo $cs_theme_option['header_text'];
}
if ( $header_styles == "header3" ){
echo $cs_theme_option['header_text'];
}
}
function cs_bg_image(){
global $cs_theme_option;
$bg_img = '';
if ( isset($_POST['bg_img']) ) {
$_SESSION['sess_bg_img'] = $_POST['bg_img'];
$bg_img = get_template_directory_uri()."/images/background/bg".$_SESSION['sess_bg_img'].".png";
}
else if ( isset($_SESSION['sess_bg_img']) and !empty($_SESSION['sess_bg_img'])){
$bg_img = get_template_directory_uri()."/images/background/bg".$_SESSION['sess_bg_img'].".png";
}
else {
if ( $cs_theme_option['bg_img_custom'] == "" ) {
if ( $cs_theme_option['bg_img'] <> 0 ){
$bg_img = get_template_directory_uri()."/images/background/bg".$cs_theme_option['bg_img'].".png";
}
}
else {
$bg_img = $cs_theme_option['bg_img_custom'];
}
}
if ( $bg_img <> "" ) {
echo ' style="background: url('.$bg_img.') ' . $cs_theme_option['bg_repeat'] . ' top ' . $cs_theme_option['bg_position'] . ' ' . $cs_theme_option['bg_attach'].'"';
}
}
function cs_bgcolor_pattern(){
global $cs_theme_option;
// pattern start
$pattern = '';
$bg_color = '';
if ( isset($_POST['custome_pattern']) ) {
$_SESSION['sess_custome_pattern'] = $_POST['custome_pattern'];
$pattern = get_template_directory_uri()."/images/pattern/pattern".$_SESSION['sess_custome_pattern'].".png";
}
else if ( isset($_SESSION['sess_custome_pattern']) and !empty($_SESSION['sess_custome_pattern'])){
$pattern = get_template_directory_uri()."/images/pattern/pattern".$_SESSION['sess_custome_pattern'].".png";
}
else {
if ( $cs_theme_option['custome_pattern'] == "" ) {
if ( $cs_theme_option['pattern_img'] <> 0 ){
$pattern = get_template_directory_uri()."/images/pattern/pattern".$cs_theme_option['pattern_img'].".png";
}
}
else {
$pattern = $cs_theme_option['custome_pattern'];
}
}
// pattern end
// bg color start
if ( isset($_POST['bg_color']) ) {
$_SESSION['sess_bg_color'] = $_POST['bg_color'];
$bg_color = $_SESSION['sess_bg_color'];
}
else if ( isset($_SESSION['sess_bg_color']) ){
$bg_color = $_SESSION['sess_bg_color'];
}
else {
$bg_color = $cs_theme_option['bg_color'];
}
// bg color end
echo ' style="background:'.$bg_color.' url('.$pattern.')" ';
}
function cs_wrapper_class(){
global $cs_theme_option;
if ( isset($_POST['layout_option']) ) {
echo $_SESSION['sess_layout_option'] = $_POST['layout_option'];
}
elseif ( isset($_SESSION['sess_layout_option']) and !empty($_SESSION['sess_layout_option'])){
echo $_SESSION['sess_layout_option'];
}
else {
echo $cs_theme_option['layout_option'];
}
}
/*
Header Styes
*/
/*
Header Styes End
*/
function cs_header_style() {
global $cs_theme_option, $post,$position,$header_sticky_menu;
if ( isset($_POST['header_styles']) ) {
$_SESSION['sess_header_styles'] = $_POST['header_styles'];
$header_styles = $_SESSION['sess_header_styles'];
}
else if ( !empty($_SESSION['sess_header_styles']) ) {
$header_styles = $_SESSION['sess_header_styles'];
}
else if(is_page()){
$cs_page_builder = get_post_meta($post->ID, "cs_page_builder", true);
if($cs_page_builder <> ''){
$xmlObject = new SimpleXMLElement($cs_page_builder);
$header_styles = $xmlObject->header_styles;
if($header_styles == '' or $header_styles == "default-header"){
$header_styles = $cs_theme_option['default_header'];
}
}else{
$header_styles = $cs_theme_option['default_header'];
}
}else {
$header_styles = $cs_theme_option['default_header'];
}
if(isset($header_styles) && $header_styles<>''){
$header_bg_color = $header_top_strip_bg_color = $header_top_strip_color = $header_nav_bgcolr = $header_nav_color = $header_nav_hover_color = $header_nav_hover_bgcolor = $header_nav_active_color = $header_nav_active_bgcolor =
$header_subnav_bgcolr = $header_subnav_color = $header_subnav_hover_color = $header_subnav_hover_bgcolor = $header_subnav_active_color = $header_subnav_active_bgcolor = '';
if ( $header_styles == "header1" ){
$header_bg_color = $cs_theme_option['header_1_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_1_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_1_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_1_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_1_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_1_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_1_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_1_nav_active_color'];
//$header_nav_active_bgcolor = $cs_theme_option['header_1_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_1_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_1_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_1_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_1_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_1_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_1_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_1_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_1_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_1_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_1_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_1_sticky'];
}
elseif ( $header_styles == "header2" ) {
$header_bg_color = $cs_theme_option['header_2_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_2_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_2_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_2_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_2_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_2_nav_hover_color'];
// $header_nav_hover_bgcolor = $cs_theme_option['header_2_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_2_nav_active_color'];
// $header_nav_active_bgcolor = $cs_theme_option['header_2_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_2_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_2_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_2_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_2_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_2_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_2_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_2_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_2_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_2_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_2_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_2_sticky'];
}
elseif ( $header_styles == "header3" ) {
$header_bg_color = $cs_theme_option['header_3_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_3_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_3_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_3_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_3_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_3_nav_hover_color'];
// $header_nav_hover_bgcolor = $cs_theme_option['header_3_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_3_nav_active_color'];
// $header_nav_active_bgcolor = $cs_theme_option['header_3_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_3_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_3_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_3_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_3_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_3_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_3_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_3_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_3_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_3_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_3_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_3_sticky'];
}
elseif ( $header_styles == "header4" ) {
$header_bg_color = $cs_theme_option['header_4_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_4_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_4_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_4_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_4_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_4_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_4_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_4_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_4_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_4_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_4_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_4_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_4_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_4_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_4_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_4_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_4_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_4_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_4_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_4_sticky'];
}
elseif ( $header_styles == "header5" ) {
$header_bg_color = $cs_theme_option['header_5_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_5_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_5_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_5_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_5_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_5_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_5_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_5_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_5_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_5_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_5_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_5_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_5_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_5_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_5_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_5_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_5_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_5_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_5_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_5_sticky'];
}
elseif ( $header_styles == "header6" ) {
$header_bg_color = $cs_theme_option['header_6_bg_color'];
$header_nav_bgcolr = $cs_theme_option['header_6_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_6_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_6_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_6_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_6_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_6_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_6_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_6_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_6_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_6_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_6_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_6_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_6_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_6_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_6_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_6_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_6_sticky'];
}
elseif ( $header_styles == "header7" ) {
$header_bg_color = $cs_theme_option['header_7_bg_color'];
$header_nav_bgcolr = $cs_theme_option['header_7_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_7_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_7_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_7_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_7_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_7_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_7_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_7_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_7_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_7_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_7_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_7_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_7_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_7_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_7_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_7_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_7_sticky'];
}
elseif ( $header_styles == "header8" ) {
$header_bg_color = $cs_theme_option['header_8_bg_color'];
$header_nav_bgcolr = $cs_theme_option['header_8_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_8_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_8_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_8_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_8_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_8_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_8_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_8_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_8_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_8_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_8_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_8_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_8_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_8_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_8_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_8_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_8_sticky'];
}
elseif ( $header_styles == "header9" ) {
$header_bg_color = $cs_theme_option['header_9_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_9_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_9_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_9_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_9_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_9_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_9_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_9_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_9_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_9_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_9_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_9_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_9_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_9_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_9_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_9_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_9_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_9_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_9_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_9_sticky'];
}
elseif ( $header_styles == "header10" ) {
$header_bg_color = $cs_theme_option['header_10_bg_color'];
$header_nav_bgcolr = $cs_theme_option['header_10_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_10_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_10_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_10_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_10_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_10_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_10_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_10_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_10_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_10_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_10_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_10_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_10_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_10_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_10_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_10_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_10_sticky'];
}
if ( $header_styles == "header11" ){
$header_bg_color = $cs_theme_option['header_11_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_11_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_11_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_11_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_11_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_11_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_11_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_11_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_11_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_11_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_11_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_11_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_11_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_11_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_11_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_11_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_11_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_11_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_11_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_11_sticky'];
}
elseif ( $header_styles == "header12" ) {
$header_bg_color = $cs_theme_option['header_12_bg_color'];
$header_top_strip_bg_color = $cs_theme_option['header_12_top_strip_bg_color'];
$header_top_strip_color = $cs_theme_option['header_12_top_strip_color'];
$header_nav_bgcolr = $cs_theme_option['header_12_nav_bgcolr'];
$header_nav_color = $cs_theme_option['header_12_nav_color'];
$header_nav_hover_color = $cs_theme_option['header_12_nav_hover_color'];
$header_nav_hover_bgcolor = $cs_theme_option['header_12_nav_hover_bgcolor'];
$header_nav_active_color = $cs_theme_option['header_12_nav_active_color'];
$header_nav_active_bgcolor = $cs_theme_option['header_12_nav_active_bgcolor'];
$header_subnav_bgcolr = $cs_theme_option['header_12_subnav_bgcolr'];
$header_subnav_color = $cs_theme_option['header_12_subnav_color'];
$header_subnav_hover_color = $cs_theme_option['header_12_subnav_hover_color'];
$header_subnav_hover_bgcolor = $cs_theme_option['header_12_subnav_hover_bgcolor'];
$header_subnav_active_color = $cs_theme_option['header_12_subnav_active_color'];
$header_subnav_active_bgcolor = $cs_theme_option['header_12_subnav_active_bgcolor'];
$header_subheader_bgcolor = $cs_theme_option['header_12_subheader_bgcolor'];
$header_subheader_link_color = $cs_theme_option['header_12_subheader_link_color'];
$header_subheader_title_color = $cs_theme_option['header_12_subheader_title_color'];
$header_subheader_subtitle_color = $cs_theme_option['header_12_subheader_subtitle_color'];
$header_sticky_menu = $cs_theme_option['header_12_sticky'];
}
?>
<style type="text/css">
/*
Sub Header Title
*/
.advertisement-sec {
float: right;
margin: 20px 0;
}
.topnav ul li a{
color:#949494;
}
.topnav ul li a:hover{
color:#838383;
}
.topnav ul li a.login:before{
content:"\f007";
margin-right:5px;
float:left;
}
.topnav ul li a.logout:before{
content:"\f08b";
margin-right:5px;
float:left;
}
.header-4 .topnav ul li a.logout:before, .header-4 .topnav ul li a.login:before{
display:none;
}
.header-11 .topnav{
background: #f4f4f4;
padding:6px 13px 7px;
}
.breadcrumb{
color: <?php echo $header_subheader_link_color;?> !important;
background-color: <?php echo $header_subheader_bgcolor;?> !important;
}
.breadcrumb .breadcrumb-inner .subtitle h1{
color: <?php echo $header_subheader_title_color;?> !important;
}
.breadcrumb .breadcrumb-inner .subtitle p{
color: <?php echo $header_subheader_subtitle_color;?> !important;
}
.breadcrumb .breadcrumb-inner .breadcrumbs ul li a, .breadcrumb .breadcrumb-inner .breadcrumbs ul li{
color: <?php echo $header_subheader_link_color;?> !important;
}
.header-3 .search-sec .searchbtn ,.header-2 .search-sec .searchbtn ,.header-4 .search-sec .searchbtn ,.header- .search-sec .searchbtn{
background: rgba(143, 143, 143, 0.1);
position: relative;
top: 0;
padding: 0px;
float: right;
width: 33px;
height:33px;
border: none;
}
.search-sec input.submit{
background-color: rgba(0,0,0,0.3);
width:44px;
height:38px;
cursor:pointer;
position:absolute;
right:0px;
top:0px;
text-indent:-999px;
border:1px solid #d0d0d0;
z-index:10;
}
.topnav ul li a{
color:#949494;
}
.topnav ul li a:hover{
color:#838383;
}
.topnav ul li a.login:before{
content:"\f007";
margin-right:5px;
float:left;
}
.topnav ul li a.logout:before{
content:"\f08b";
margin-right:5px;
float:left;
}
.header-4 .topnav ul li a.logout:before, .header-4 .topnav ul li a.login:before{
display:none;
}
/* Header styles */
.header-1 .top-strip,.header-11 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom:1px solid rgba(202,196,196,0.3);
width: 100%;
}
.header-2 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid rgba(231, 231, 231, 0.3);
width: 100%;
}
.header-3 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-4 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-5 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-6 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-7 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-8 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-9 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.header-10 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
border-bottom: 1px solid #E7E7E7;
width: 100%;
}
.top-nav {
float: left;
}
.top-nav > ul {
margin: 0px;
padding:0px;
}
.top-nav li {
display: inline-block;
list-style: none;
}
.top-nav a {
color: <?php echo $header_top_strip_color;?>;
float: left;
font-size: 11px;
padding: 5px 10px;
position:relative;
}
.top-nav a:hover {
color: #c1c1c1 !important;
}
.header-1 .top-nav a,.header-11 .top-nav a{
padding:6px 10px 7px;
}
.header-1 .info-box p,.header-11 .info-box p{
padding:6px 0;
color: <?php echo $header_top_strip_color;?>;
}
.header-1 .main-menu.scroll-to-fixed-fixed,.header-11 .main-menu.scroll-to-fixed-fixed{
top:26px;
}
.top-nav a:hover,
.top-nav a:active
.top-nav a:focus {
color: <?php echo $header_top_strip_color;?>;
text-decoration:none;
outline: none !important;
}
.top-nav a:before{
background-color: rgba(168,168,168,0.3);
border-radius: 20px;
position:absolute;
content:"";
top: 14px;
left: -4px;
width: 5px;
height: 5px;
}
.top-nav li:first-child a:before {
display: none;
}
.info-box {
float: left;
}
.info-box p {
color: <?php echo $header_top_strip_color;?>;
display: inline-block;
font-size: 10px;
font-weight: 600;
margin: 0;
padding: 5px 0;
}
.info-box p a{
color:<?php echo $header_top_strip_color;?>;
font-weight:600;
}
.header-2 .social-network,.header-12 .social-network{
border: medium none;
float: right;
padding: 6px 0 4px 0;
width: auto;
}
.header-3 .social-network{
border: medium none;
float: left;
padding: 6px 0 4px 0;
width: auto;
}
.social-network > h6 {
color:#949494;
float: left;
margin: 0 10px 0 0;
line-height: 22px;
font-size:11px !important;
font-weight:600;
}
.social-network > a {
color:<?php echo $header_nav_color;?> !important;
float: left;
font-size: 14px;
margin: 0 6px;
}
.header-1 .top-strip .container,
.header-2 .header-section .container,
.header-3 .top-strip .container,
.header-10 .top-strip .container,
.header-11 .top-strip .container,
.header-12 .header-section .container{
position:relative;
}
.header-1 .social-network,
.header-2 .social-network,
.header-3 .social-network,
.header-10 .social-network,
.header-11 .social-network,
.header-12 .social-network {
white-space:nowrap;
}
.header-1 .social-network > a,
.header-2 .social-network > a,
.header-3 .social-network > a,
.header-10 .social-network > a,
.header-11 .social-network > a,
.header-12 .social-network > a{
float:none;
}
.header-12 .social-network,
.header-2 .social-network{
right:0px;
}
.header-3 .social-network{
left:0px;
right: auto;
}
.social-network > a:hover{
color: #c1c1c1 !important;
}
.header-1 .social-network > a:hover{
color: #c1c1c1 !important;
}
.social-network .tooltip{
width: auto !important;
border:none;
}
.social-network > a > i {
font-size: 20px;
}
.header-section {
background: <?php echo $header_bg_color;?>;
width: 100%;
min-height: 110px;
}
.logo{
text-align: left;
margin: 25px 0;
float:left;
}
.search-sec{
float:right;
position:relative;
margin-top: 35px;
}
.search-sec .search-input{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border:1px solid rgba(202,196,196,0.3);
border-radius: 0px !important;
-moz-box-shadow:none;
-webkit-box-shadow:none;
-o-box-shadow:none;
box-shadow:none;
width:100%;
height:38px;
padding: 8px 10px;
color:#b8b8b8;
}
.search-sec .search-input:focus{
outline: none !important;
-moz-box-shadow:none;
-webkit-box-shadow:none;
-o-box-shadow:none;
box-shadow:none;
border: 1px solid #e7e7e7;
}
.search-sec input[type="submit"]{
background: #949494;
border: medium none;
float:none;
text-indent: -9999px;
color: #fff;
height: 38px;
position: absolute;
right: 0;
top:0px;
text-align: center;
}
.search-sec label{
border: medium none;
float:none;
text-indent: 0;
color: #fff;
height: 38px;
position: absolute;
right: 0;
top:0px;
text-align: center;
width: 64px;
}
.search-sec label i {
position: relative;
text-indent: 0;
top: 23%;
z-index: 999999;
}
.header-1 .navigation > ul > li.current-menu-ancestor:after,
.header-1 .navigation > ul > li.current-menu-item:after,
.header-11 .navigation > ul > li.current-menu-ancestor:after,
.header-11 .navigation > ul > li.current-menu-item:after{
display:block;
}
/*Navigation Start
====================================*/
.main-menu {
background: <?php echo $header_nav_bgcolr;?>;
border-top:1px solid rgba(202,196,196,0.3);
width: 100%;
-webkit-box-shadow:0 3px 4px -2px rgba(0, 0, 0, 0.3);
-moz-box-shadow:0 3px 4px -2px rgba(0, 0, 0, 0.3);
-o-box-shadow:0 3px 4px -2px rgba(0, 0, 0, 0.3);
box-shadow:0 3px 4px -2px rgba(0, 0, 0, 0.3);
position:relative;
}
.navigation {
width:100%;
position:relative;
}
.navigation > ul{
display: inline-block;
float:none;
font-size: 0;
line-height: 0;
margin: 0;
text-align: center;
width: 100%;
}
.navigation > ul > li{
display: inline-block;
font-size: 0;
float:none;
height: 50px;
letter-spacing: 0;
line-height: 0;
list-style: none outside none;
position: relative;
word-spacing: 0;
}
.navigation ul li:hover > a,
.header-10 .navigation ul li.current-menu-item > a,
.header-10 .navigation > ul > li.current-menu-ancestor > a,
.header-11 .navigation ul > li.current-menu-item > a,
.header-11 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
background:<?php echo $header_nav_active_bgcolor;?>;
}
.navigation ul ul li:hover > a,
.header-10 .navigation ul ul li.current-menu-item > a,
.header-10 .navigation ul ul > li.current-menu-ancestor > a,
.header-11 .navigation ul ul > li.current-menu-item > a,
.header-11 .navigation ul ul > li.current-menu-ancestor > a{
color:<?php echo $header_subnav_active_color;?> !important;
background:<?php echo $header_subnav_active_bgcolor;?>;
}
.container .navigation ul ul li:hover > a{
background:<?php echo $header_subnav_active_bgcolor;?> !important;
color:<?php echo $header_subnav_active_color;?> !important;
}
.navigation ul ul li{
border-top:1px solid <?php echo $header_subnav_color;?> !important;
}
.navigation > ul > li > a{
border-left: 1px solid #e1e1e1;
display: inline-block;
height:35px;
padding:15px 23px 0px 23px;
font-size:12px;
line-height: 20px;
color:<?php echo $header_nav_color;?>;
z-index:999;
position:relative;
cursor:pointer;
}
.navigation > ul > li > a:hover{
color: <?php echo $header_nav_hover_color;?>;
background:<?php echo $header_nav_hover_bgcolor;?>;
}
.navigation > ul > li.current-menu-item > a{
color:<?php echo $header_nav_active_color;?>;
background:<?php echo $header_nav_active_bgcolor;?>;
}
.navigation ul ul {
opacity: 0;
visibility: hidden;
float:left;
display: block;
position:absolute;
top:100%;
left:1px;
z-index:999;
background:<?php echo $header_subnav_bgcolr;?>;
width:190px;
margin:0px;
-webkit-transition: opacity 0.400s linear;
-moz-transition: opacity 0.400s linear;
-ms-transition: opacity 0.400s linear;
-o-transition: opacity 0.400s linear;
transition: opacity 0.400s linear;
}
.navigation ul ul li{
float:left;
background:<?php echo $header_subnav_bgcolr;?> !important;
width:100%;
position:relative;
text-align:left;
}
.navigation ul ul ul {
left: 100%;
margin: 0;
top: 0;
}
.header-8 .navigation ul ul ul{
top:0;
}
.navigation ul ul a {
width:100% !important;
display:block;
padding:6px 10px;
margin:0;
font-size:14px;
color:<?php echo $header_subnav_color;?> !important;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
.navigation ul ul a:hover{
background:<?php echo $header_subnav_hover_bgcolor;?> !important;
}
.navigation ul ul ul a:hover {
color:<?php echo $header_subnav_hover_color;?>;
background:<?php echo $header_subnav_hover_bgcolor;?> !important;
}
.navigation ul li:hover > ul {
opacity: 1;
visibility: visible;
}
.navigation select {
display: none;
width:50%;
float:left;
color:<?php echo $header_nav_color;?>;
padding:6px;
margin:7px 0 0;
background-color:<?php echo $header_nav_bgcolr;?>;
border:#212121 solid 1px !important;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
.topindex {
position:relative;
z-index:10;
}
.selectnav {
display: none;
}
.top-icons{
float:right;
}
/*ul*/
.navigation ul > li > ul {
border-top: 4px solid <?php echo $header_nav_active_color;?> !important;
box-shadow: 0 0 4px rgba(0,0,0,0.2);
}
.navigation ul > li > ul > li > ul {
border-top: 4px solid <?php echo $header_nav_active_color;?> !important;
}
.navigation ul > li > ul > li {
border-top: 1px solid #ededed !important;
}
.navigation ul > li > ul > li > a {
font-size: 12px;
}
/* =================================== */
<?php if ( $header_styles == "header1" ){?>
/* Header 1 start */
.header-1 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-1 .main-menu{
border-top: 1px solid #E7E7E7;
-webkit-box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.3), 0 3px 0 2px #fff inset;
-moz-box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.3), 0 3px 0 2px #fff inset;
-o-box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.3), 0 3px 0 2px #fff inset;
box-shadow: 0 3px 4px -2px rgba(0, 0, 0, 0.3), 0 3px 0 2px #fff inset;
}
.header-1 .social-network,.header-11 .social-network{
border: medium none;
float: left;
padding: 5px 0;
width: auto;
white-space:nowrap;
}
.header-1 .social-network > h6{
color: <?php echo $header_top_strip_color;?> !important;
}
.header-1 .search-sec {
width: 380px;
}
.header-1 .search-sec .search-input {
padding-right: 65px;
}
.header-1 .search-sec label,.header-11 .search-sec label{
background: #8d8d8d;
}
.header-1 .navigation > ul,.header-11 .navigation > ul{
float:left;
text-align:left;
}
.header-1 .navigation > ul li,.header-11 .navigation > ul li{
position:relative;
}
.header-1 .navigation > ul li > a ,.header-11 .navigation > ul li > a{
border-left:none;
color:<?php echo $header_nav_color;?> !important;
position:relative;
}
.header-1 .navigation > ul li > a:before{
content:'';
border-left:1px solid rgba(202,196,196,0.3);
position:absolute;
left:0;
top:20px;
width:2px;
height:8px;
}
.header-1 .navigation > ul ul li > a:before,
.header-1 .navigation > ul li:first-child > a:before{
display:none;
}
.header-1 .navigation > ul li:before,
.header-1 .navigation > ul > li.current-menu-ancestor:before,
.header-1 .navigation > ul > li.current-menu-item:before{
content:'';
border-top: 3px solid <?php echo $header_nav_active_color;?> !important;
position:absolute;
left:0;
top: -3px;
width:100%;
height:2px;
display:none;
}
.header-1 .navigation ul li:hover:before,
.header-1 .navigation > ul li:hover:after,
.header-1 .navigation > ul > li.current-menu-ancestor:before,
.header-1 .navigation > ul > li.current-menu-item:before,
.header-1 .navigation > ul > li.current-menu-ancestor:before,
.header-1 .navigation > ul > li.current-menu-item:before{
display:block;
}
.header-1 .navigation ul ul li:hover:before,
.header-1 .navigation > ul ul li:hover:after{
display:none;
}
.header-1 .navigation > ul li:after,
.header-1 .navigation > ul > li.current-menu-ancestor:after,
.header-1 .navigation > ul > li.current-menu-item:after{
content:'';
border-color: <?php echo $header_nav_active_color;?> transparent transparent transparent !important;
border-style:solid;
border-width:7px 7px 0px 7px;
position:absolute;
top:-3px;
left:50%;
margin-left:-5px;
display:none;
}
.header-1 .navigation ul li:hover > a,
.header-1 .navigation ul li.current-menu-item > a,
.header-1 .navigation > ul > li.current-menu-ancestor > a{
background-color:transparent;
color:<?php echo $header_nav_active_color;?> !important;
}
.header-1 .navigation ul ul li:hover > a,
.header-1 .navigation ul ul li.current-menu-item > a,
.header-1 .navigation > ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color:<?php echo $header_subnav_active_color;?> !important;
}
/* updated css */
.header-1 .navigation > ul > li:hover > a{
color:<?php echo $header_nav_hover_color;?>;
background:<?php echo $header_nav_hover_bgcolor;?>;
}
.header-1 .navigation > ul > li > a:hover{
color:<?php echo $header_nav_hover_color;?> !important;
}
/* updated css end */
.header-1 .topnav{
background: rgba(0,0,0,0.1);
padding:6px 13px 7px;
}
.header-1 .info-box,.header-11 .info-box{
margin-right:15px;
}
.header-1 .search-input,.header-11 .search-input{
font-size: 11px;
}
.header-1 .navigation > ul > li.current-menu-ancestor:after,
.header-1 .navigation > ul > li.current-menu-item:after,
.header-11 .navigation > ul > li.current-menu-ancestor:after,
.header-11 .navigation > ul > li.current-menu-item:after{
display:block;
}
.header-1 .navigation ul > li > ul{
border-top: 4px solid <?php echo $header_subnav_active_color;?> !important;
}
/* Header 1 end */
/* =================================== */
<?php } elseif ( $header_styles == "header2" ){?>
/* header 2 start */
.header-1 ,.header-2 ,.header-4 ,.header-5,.header-6 , .header-7 ,.header-8 ,.header-9,.header-10,.header-11,.header-12{
box-shadow: 0 0 14px rgba(0, 0, 0, 0.1);
width: 100%;
position: relative;
z-index: 999;
}
.header-2 .top-strip{
background: <?php echo $header_top_strip_bg_color;?>;
}
.header-2 .search-sec input[type="submit"]{
background-color: rgba(0,0,0,0.1);
float:none;
text-indent: -9999px;
height: 32px;
position: absolute;
right: 0;
top:0px;
width: 30px;
border: none;
}
.header-2 .search-box {
position: static;
float: left;
}
.header-2 .top-nav a,.header-12 .top-nav a{
padding: 6px 12px;
}
.header-2 .search-sec input[type="text"] {
-moz-box-sizing: border-box;
height: 32px !important;
border: none;
font-size: 12px;
background-color:rgba(0,0,0,0.1);
}
.header-2 .search-box {
height: 33px !important;
background: none;
}
.header-2 .search-sec a i {
position: relative;
top: 7px;
}
.header-2 .navigation > ul > li:last-child,.header-12 .navigation > ul > li:last-child{
border:none;
}
.header-2 .navigation > ul > li > a,.header-12 .navigation > ul > li > a{
border:none;
position:relative;
padding:15px 23px 4px;
}
.header-2 .navigation > ul > li > ul,.header-12 .navigation > ul > li > ul{
left:0;
top:54px;
}
.header-2 .navigation > ul > li ul,.header-12 .navigation > ul > li ul{
border-top:4px solid rgba(202,196,196,0.3);
background-color:<?php echo $header_subnav_bgcolr;?> !important;
}
.header-2 .navigation > ul > li > a:before{
position:absolute;
content:"//";
top: 16px;
left: -4px;
width: 5px;
height: 5px;
color:#e2e2e2;
}
.header-2 .navigation > ul > li:first-child > a:before,.header-12 .navigation > ul > li:first-child > a:before{
display:none;
}
.header-2 .navigation > ul > li > a:after,
.header-2 .navigation > ul > li.current-menu-item > a:after,
.header-2 .navigation > ul > li.current-menu-ancestor > a:after
{
content:'';
position:absolute;
left:0;
top: -3px;
border-top:2px solid <?php echo $header_nav_active_color;?> !important;
width:100%;
height:2px;
display:none;
}
.header-2 .navigation > ul > li:hover > a:after,
.header-2 .navigation ul li.current-menu-item > a:after,
.header-2 .navigation > ul > li.current-menu-ancestor > a:after{
display:block;
}
.header-2 .navigation > ul > li{
float:left;
}
.header-2 .navigation > ul > li:first-child a:before{
background: none;
}
.header-2 .navigation ul li:hover > a{
background-color:transparent;
color:<?php echo $header_nav_hover_color;?> !important;
}
.header-2 .search-sec label{
border: medium none;
float:none;
text-indent: 0;
color:<?php echo $header_nav_color;?> !important;
height: 30px;
position: absolute;
right: 0;
top:0px;
text-align: center;
width: 30px;
}
.header-2 .search-sec label i {
position: relative;
text-indent: 0;
top: 21%;
z-index: 999999;
}
.header-2 .topnav {
background:rgba(0,0,0,0.1);
padding:6px 13px 7px;
}
.header-2 .topnav ul li a{
color:#7d7d7d;
}
.header-2 .search-sec form,
.header-2 .search-sec {
margin: 0;
}
.header-2 .search-sec .searchbtn {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.1);
position: relative;
top: 0;
padding: 0px;
width: 33px;
height:33px;
}
.header-2 .search-sec .searchbtn i{
color: <?php echo $header_top_strip_color;?>;
}
.header-2 .info-box {
float: left;
margin-right: 17px;
}
.header-2 .search-sec{
float:left;
}
.header-2 .social-network {
margin-top: 35px;
}
.header-2 .navigation ul ul li{
border-top:1px solid #ededed;
}
.header-2 .search-sec .search-input{
width:100%;
}
.header-2 .navigation > ul > li.current-menu-item > a,
.header-2 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
}
.header-2 .navigation ul ul li.current-menu-item > a,
.header-2 .navigation > ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color: <?php echo $header_subnav_active_color;?> !important;
border: none !important;
}
.header-2 .navigation ul > li > ul{
border-top: 4px solid <?php echo $header_subnav_active_color;?> !important;
}
/* header 2 end */
/* =================================== */
<?php } elseif ( $header_styles == "header3" ){?>
/* header 3 start */
.header-3 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-3 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
}
.header-3 .search-sec label,.header-2 .search-sec label {
background-color: rgba(0,0,0,0.5);
height:32px;
width: 30px;
}
.header-3 .search-sec input[type="submit"],.header-2 .search-sec input[type="submit"]{
background: none;
height:32px;
width: 30px;
}
.header-3 .search-sec input[type="text"] ,.header-2 .search-sec input[type="text"],.header-4 .search-sec input[type="text"]{
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
height: 32px !important;
padding:0px 0px 0px 10px;
}
.header-3 .search-box {
height: 33px !important;
position: static;
background-color:rgba(143, 143, 143, 0.1);
overflow: hidden;
float: right;
}
.header-3 .search-sec a i,.header-2 .search-sec a i {
position: relative;
top: 7px;
}
.header-3 .logo{
float:none;
text-align:center;
}
.header-3 .navigation > ul > li{
margin-top:-2px;
}
.header-3 .navigation > ul > li > a{
border-top:none;
}
.header-3 .navigation > ul > li > a:hover{
background-color: none !important;
}
.header-3 .search-sec .search-input {
width: 250px;
border: none;
font-size: 11px;
}
.header-3 .search-sec form,
.header-3 .search-sec{
margin: 0;
}
.header-3 .search-sec .searchbtn i{
color: <?php echo $header_top_strip_color;?>;
}
.header-3{
background-color:rgba(143, 143, 143, 0.1);
}
.header-3 .info-box {
float: left;
margin-right: 35px;
}
.header-3 .search-sec{
float:left;
}
.header-3 .topnav{
padding:6px 6px 7px 13px;
background-color:rgba(143,143,143,0.1);
}
.header-3 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?>;
border-top:none;
}
.header-3 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?>;
border-top:none;
}
.header-3 .navigation ul li:hover > a{
background: none !important;
color:<?php echo $header_nav_hover_color;?> !important;
}
.header-3 .navigation ul ul li:hover a{
border-top:none !important;
}
.header-3 .navigation ul ul li a:hover{
color:<?php echo $header_subnav_hover_color;?> !important;
}
.header-3 .navigation ul ul li{
border-top:none;
}
.header-3 .navigation > ul > li:last-child{
border:none;
}
.header-3 .navigation > ul > li > a{
border:none;
position:relative;
color:<?php echo $header_nav_color;?> !important;
}
.header-3 .navigation > ul > li > a:before{
position:absolute;
content:"//";
top: 16px;
left: -4px;
width: 5px;
height: 5px;
color:#e2e2e2;
}
.header-3 .navigation > ul > li:first-child > a:before{
display:none;
}
.header-3 .navigation > ul > li > a:after,
.header-3 .navigation ul li.current-menu-item > a:after,
.header-3 .navigation > ul > li.current-menu-ancestor > a:after{
content:'';
position:absolute;
left:0;
top:0;
border-top:2px solid <?php echo $header_nav_hover_color;?> !important;
width:100%;
height:2px;
display:none;
}
.header-3 .navigation > ul > li:hover > a:after,
.header-3 .navigation ul li.current-menu-item > a:after,
.header-3 .navigation > ul > li.current-menu-ancestor > a:after{
display:block;
}
.header-3 .navigation ul li.current-menu-item > a,
.header-3 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
}
.header-3 .navigation ul ul li.current-menu-item > a,
.header-3 .navigation ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color: <?php echo $header_subnav_active_color;?> !important;
}
.header-3 .navigation ul > li > ul{
border-top: 4px solid <?php echo $header_subnav_active_color;?> !important;
}
.header-3 .navigation > ul > li > ul > li > a:after{
display:none !important;
}
.header-3 .social-network > h6{
color: <?php echo $header_top_strip_color;?> !important;
}
/* header 3 end */
/* =================================== */
<?php } elseif ( $header_styles == "header4" ){?>
/* header 4 start */
.header-4 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-4 .top-strip {
background: <?php echo $header_top_strip_bg_color;?>;
}
.header-4 .search-sec form,
.header-4 .search-sec {
margin: 0;
}
.header-4 .search-sec label {
height:32px;
width: 30px;
}
.header-4 .search-sec input[type="submit"]{
height:32px;
width: 30px;
background-color:rgba(0, 0, 0, 0.1);
}
.header-4 .search-sec input[type="text"] {
-moz-box-sizing: border-box;
height: 32px !important;
margin:0;
}
.header-4 .search-box {
height: 33px !important;
position: static;
background: none;
float: right;
overflow: hidden;
background: rgba(143, 143, 143, 0.1);
}
.header-4 .search-sec a i {
position: relative;
top: 7px;
}
.header-4 .search-sec .searchbtn {
border:none;
position: relative;
top: 0;
float: right;
padding: 0px;
width: 33px;
height:33px;
}
.header-4 .search-sec .searchbtn i{
color: <?php echo $header_top_strip_color;?>;
}
.header-4 .info-box {
float: left;
margin-right: 20px;
}
.top-icons-head4{
float:left;
}
.header-4 .topnav{
padding:5px 9px 6px;
}
.header-4 .navigation{
background-color:<?php echo $header_nav_bgcolr; ?>
}
.header-4 .search-sec .search-input{
background-color: transparent;
border: medium none;
font-size: 11px;
height: 33px;
margin: 0 -5px 0 0;
width: 250px;
}
.header-4 .navigation > ul > li > a:before{
background-color: rgba(69,63,62,0.2);
border-radius: 20px;
position:absolute;
content:"";
top: 23px;
left: -23px;
width: 5px;
height: 5px;
}
.header-4 .navigation {
float: right;
margin-top: 30px;
width: 890px;
}
.header-4 .navigation > ul > li > a {
border: none;
position: relative;
padding-left:0;
padding-right:0;
margin:0 20px;
color:<?php echo $header_nav_color;?> !important;
}
.header-4 .navigation ul ul a{
text-align:left;
}
.header-4 .navigation > ul > li:first-child a:before {
display:none;
}
.header-4 .navigation > ul > li:last-child{
border:none;
}
.header-4 .navigation > ul{
text-align:right;
}
.header-4 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?>;
border-bottom: 1px solid <?php echo $header_nav_hover_bgcolor;?> !important;
}
.header-4 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?>;
border-bottom: 1px solid <?php echo $header_nav_active_bgcolor;?> !important;
}
.header-4 .navigation ul li:hover > a,
.header-4 .navigation ul li.current-menu-item > a,
.header-4 .navigation > ul > li.current-menu-ancestor > a{
background: none !important;
border-bottom: 1px solid <?php echo $header_nav_active_bgcolor;?> !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-4 .navigation ul ul li:hover > a{
background: <?php echo $header_subnav_hover_bgcolor;?> !important;
color: <?php echo $header_subnav_hover_color;?> !important;
border:none !important;
}
.header-4 .navigation ul ul li.current-menu-item > a,
.header-4 .navigation > ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color: <?php echo $header_subnav_active_color;?> !important;
border:none !important;
}
.header-4 .navigation ul li ul li:hover > a{
border-bottom:none !important;
color: <?php echo $header_subnav_hover_color;?> !important;
}
.header-4 .navigation ul li.current-menu-item > a,
.header-4 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
}
.header-4 .navigation ul > li > ul{
border-top: 4px solid <?php echo $header_subnav_hover_color;?> !important;
}
/* header 4 End */
/* =================================== */
<?php } elseif ( $header_styles == "header5" ){?>
/* header 5 start */
.header-5 {
box-shadow: 0 0 14px rgba(0, 0, 0, 0.1);
width: 100%;
position: relative;
z-index: 999;
}
.header-5 .navigation > ul > li > a {
border: none;
position: relative;
padding:0;
margin:15px 23px 0;
color: <?php echo $header_nav_color;?> !important;
}
.header-5 .navigation > ul > li:last-child{
border:none;
}
.header-5 .navigation > ul{
text-align:right;
}
.header-5 .navigation{
float: left;
margin-top: 30px;
width: 850px;
}
.header-5 .navigation{
background-color:<?php echo $header_nav_bgcolr; ?>
}
.header-5 .topnav{
border-left:1px dashed #e1e1e1;
margin:45px 0 0 2px;
padding:0px 0 0px 17px;
}
.header-5 .search-box {
background:rgba(143,143,143,0.1);
z-index: 9999;
height:30px;
float: right;
}
.header-5 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?>;
border-bottom: 1px solid <?php echo $header_nav_hover_bgcolor;?> !important;
}
.header-5 .navigation > ul > li.current-menu-item > a{
background: none !important;
}
.header-5 .navigation ul li:hover > a{
background: none !important;
border-bottom: 1px solid <?php echo $header_nav_hover_color;?> !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-5 .navigation ul li.current-menu-item > a,
.header-5 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
border-bottom: 1px solid <?php echo $header_nav_active_color;?>;
}
.header-5 .navigation ul ul li.current-menu-item > a,
.header-5 .navigation > ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color:<?php echo $header_subnav_active_color;?> !important;
border-bottom: 1px solid <?php echo $header_subnav_active_bgcolor;?>;
}
.header-5 .navigation ul li ul li:hover > a{
border-bottom:none !important;
background: <?php echo $header_subnav_hover_bgcolor;?> !important;
}
.header-5 .navigation > ul > li > ul > li > a{
border-bottom: none !important;
}
.header-5 .navigation ul > li > ul{
border-top: 4px solid <?php echo $header_subnav_hover_color;?> !important;
}
.header-5 .navigation ul ul li:hover > a{
border-bottom:none !important;
color: <?php echo $header_subnav_hover_color;?> !important;
}
.header-5 .search-sec .search-input {
}
.header-5 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
border-radius: 0px !important;
border: none;
height:30px;
}
.header-5 .search-sec .searchbtn{
background: none;
color: #b3b3b3;
height: 30px;
position: relative;
top: 0px;
padding: 0px;
width: 40px;
float: right;
z-index: 99999;
border:none;
}
.search-sec input[type="text"]{
font-size: 11px !important;
}
.header-5 .search {
border-left: 1px solid rgba(143,143,143,0.2);
margin-left: 10px;
}
.header-5 .search-box {
position: relative;
float: right;
}
.header-5 .search-sec label {
border-left: 3px dotted #b3b3b3;
height: 25px;
position: relative;
width: 40px;
top: 13px;
}
.header-5 .search .icon-search {
color: #B3B3B3;
position: relative;
top: 16%;
}
.header-5 .info-box {
float: left;
}
.header-5 .search-sec{
margin:0;
}
/* header 5 end */
/* =================================== */
<?php } elseif ( $header_styles == "header6" ){?>
/* header 6 start */
.header-6 {
box-shadow: none !important;
width: 100%;
position: relative;
z-index: 999;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
border-top: 4px solid #565656;
}
.header-6 .search-sec input[type="submit"] {
top: 4px;
right:4px;
}
.header-6 .navigation > ul > li > a {
border: medium none;
position: relative;
padding-left:0;
padding-right:0;
margin:0px 23px 0;
color: <?php echo $header_nav_color;?> !important;
}
.header-6 .search-box:after{
font-family:Fontawesome;
content:"\f002";
color: #ddd;
position:absolute;
right:18px;
top:15px;
z-index:9999;
cursor:pointer;
font-size:16px;
}
.header-6 .navigation > ul > li:last-child{
border:none;
}
.header-6 .navigation > ul{
text-align:left;
}
.header-6 .navigation{
width: 72%;
float:left;
background:<?php echo $header_nav_bgcolr;?> !important;
}
.header-6 .navigation ul ul{
width:190px;
border-top: 4px solid <?php echo $header_subnav_hover_color;?> !important;
}
.header-6 .navigation ul{
float:right;
width: auto;
}
.header-6 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?>;
border-bottom: 1px solid <?php echo $header_nav_hover_bgcolor;?> !important;
}
.header-6 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?>;
border-bottom: 1px solid <?php echo $header_nav_active_color;?> !important;
}
.header-6 .navigation ul li:hover > a{
background: none !important;
border-bottom: 1px solid <?php echo $header_nav_hover_color;?> !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-6 .navigation ul li.current-menu-item > a,
.header-6 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
border-bottom: 1px solid <?php echo $header_nav_active_color;?> ;
}
.header-6 .navigation ul ul li.current-menu-item > a,
.header-6 .navigation > ul > ul > li.current-menu-ancestor > a{
color:<?php echo $header_subnav_active_color;?> !important;
background:<?php echo $header_subnav_active_bgcolor;?> ;
border:none !important;
}
.header-6 .navigation ul li ul li:hover > a{
border-bottom:none !important;
background: <?php echo $header_subnav_hover_bgcolor;?> !important;
}
.header-6 .search-sec .searchbtn:hover > i {
color: #2E2E2E;
}
.header-6 .navigation > ul > ul > li a{
border: none !important;
}
.header-6 .navigation ul ul li:hover > a{
border-bottom:none !important;
color: <?php echo $header_subnav_hover_color;?> !important;
}
.header-6 .navigation{
margin-top : 22px;
}
.header-6 .topnav, .header-6 .search-sec{
margin-top:20px;
}
.header-6 .topnav{
border-left:3px dotted #e8e8e8;
margin-top:30px;
padding:0px 0px 0px 17px;
}
.header-6 .search-box {
background: #fafafa;
z-index: 9999;
padding:5px;
border:1px solid #e0e0e0;
top:60px;
box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
}
.header-6 .search-sec .searchbtn{
background: none repeat scroll 0 0 transparent;
color: #B3B3B3;
height: 25px;
padding: 0;
position: relative;
top: 10px;
width: 40px;
border:none;
border-left: 3px dotted #B3B3B3;
z-index: 99999;
}
.header-6 .search-sec .searchbtn i {
vertical-align: top;
}
.header-6 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
height:38px;
border-radius: 0px !important;
border: 1px solid #E7E7E7;
background-color:#fff;
float:left;
width: 100%;
padding:0px 65px 0px 10px;
}
.header-6 .search-box:before{
content:'';
position:absolute;
top:-7px;
right:9px;
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* Internet Explorer */
-moz-transform:rotate(45deg); /* Firefox */
-webkit-transform:rotate(45deg); /* Safari and Chrome */
-o-transform:rotate(45deg); /* Opera */
background: #fafafa;
border-style: solid none none solid;
border-width: 1px medium medium 1px;
border-color: #E0E0E0 transparent transparent #E0E0E0;
width:12px;
height: 12px;
}
.header-6 .search-sec label {
border-left: 3px dotted #b3b3b3;
height: 25px;
position: relative;
width: 40px;
top: 13px;
}
.header-6 .search .icon-search {
color: #B3B3B3;
position: relative;
}
.header-6 .info-box {
float: right;
}
.header-6 .search-sec{
float:left;
}
/* header 6 end */
/* =================================== */
<?php } elseif ( $header_styles == "header7" ){?>
/* header 7 start */
.header-7 {
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-7 .header-section{
min-height: 85px;
border-top: 1px solid #a3a3a3;
}
.header-7 .logo{
margin: 15px 0px;
}
.header-7 .search-sec input.submit{
height: 40px;
right:4px;
top: 4px;
}
.header-7 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?>;
border-bottom: 1px solid <?php echo $header_nav_hover_color;?> !important;
}
.header-7 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?>;
border-bottom: 1px solid <?php echo $header_nav_active_color;?> !important;
}
.header-7 .navigation ul li:hover > a{
background: none !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-7 .navigation ul li.current-menu-item > a{
color:<?php echo $header_nav_active_color;?> !important;
border-bottom: 1px solid <?php echo $header_nav_active_color;?>;
}
.header-7 .navigation ul ul li.current-menu-item > a{
color:<?php echo $header_subnav_active_color;?> !important;
background: <?php echo $header_subnav_active_bgcolor;?> !important;
}
.header-7 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important;
border-bottom: 1px solid <?php echo $header_nav_active_color;?>;
}
.header-7 .navigation > ul > ul > li:hover > a,.header-7 .navigation > ul > ul > li > a{
border-bottom:none !important;
}
.header-7 .navigation ul li ul li:hover > a{
border-bottom:none !important;
background:<?php echo $header_subnav_hover_bgcolor; ?> !important;
}
.header-7 .navigation ul ul li:hover > a{
border-bottom:none !important;
color: <?php echo $header_subnav_hover_color;?> !important;
}
.header-7 .info-box {
float: right;
}
.header-7 .search-box {
background: #fafafa;
z-index: 9999;
top:60px;
padding:5px;
border:1px solid #d0cbcf;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
.header-7 .search-box:after{
font-family:Fontawesome;
content:"\f002";
color: #ddd;
position:absolute;
right:18px;
top:15px;
z-index:9999;
cursor:pointer;
font-size:16px;
}
.header-7 .search-sec .searchbtn {
background: none;
border-left: 3px dotted #b3b3b3;
color: #b3b3b3;
height: 25px;
position: relative;
top: 10px;
padding: 0px;
width: 40px;
border: none;
}
.header-7 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
border-radius: 0px !important;
border: 1px solid #E7E7E7;
background-color:#fff;
}
.header-7 .search-sec .searchbtn{
background: none;
border-left: 3px dotted #b3b3b3;
color: #b3b3b3;
height: 25px;
position: relative;
top: 10px;
padding: 0px;
width: 40px;
z-index: 99999;
}
.header-7 .search-sec label {
border-left: 3px dotted #b3b3b3;
height: 25px;
position: relative;
width: 40px;
top: 13px;
}
.header-7 .search .icon-search {
color: #B3B3B3;
position: relative;
top: 16%;
}
.header-7 .search-sec,
.header-7 .navigation{
margin-top : 26px;
}
.header-7 .navigation{
float: right;
margin-top: 25px;
width: 870px;
background:<?php echo $header_nav_bgcolr;?> !important;
}
.header-7 .navigation > ul{
text-align:right;
}
.header-7 .navigation > ul > li:last-child{
border:none;
}
.header-7 .navigation > ul > li > a {
border: medium none;
position: relative;
padding-left:0;
padding-right:0;
margin:0px 23px 0 23px;
color:<?php echo $header_nav_color;?> !important;
}
.header-7 .navigation > ul > li > a:before{
content:'//';
position:absolute;
left:-27px;
top:16px;
color:<?php echo $header_nav_color;?> !important;
}
.header-7 .navigation > ul > li:first-child > a:before{
display:none;
}
.header-7 {
position:<?php echo $position ?> !important;
}
.header-7 .header-section{
position:relative;
}
.home .header-7 .header-section {
position:absolute !important;
top: 0px;
z-index: 999;
}
.header-7 .header-section {
background: transparent !important;
}
.header-7 .header-section:before {
content: '';
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
opacity: 0.8;
background: <?php echo $header_bg_color;?>;
}
.header-7 .header-section .container{
position: relative;
z-index: 999;
}
.header-7 .search-box {
background: #fafafa;
z-index: 9999;
padding:5px;
border:1px solid #e0e0e0;
top:60px;
box-shadow: 0 0 5px 0 rgba(0,0,0,0.1);
}
.header-7 .search-sec .searchbtn{
background: none repeat scroll 0 0 transparent;
color: #B3B3B3;
height: 25px;
padding: 0;
position: relative;
top: 10px;
width: 40px;
border:none;
border-left: 3px dotted #B3B3B3;
z-index: 99999;
}
.header-7 .search-sec .searchbtn i {
vertical-align: top;
}
.header-7 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
box-shadow: none;
height:38px;
border-radius: 0px !important;
border: 1px solid #E7E7E7;
background-color:#fff;
float:left;
width: 100%;
padding:0px 65px 0px 10px;
}
.header-7 .search-box:before{
content:'';
position:absolute;
top:-7px;
right:9px;
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* Internet Explorer */
-moz-transform:rotate(45deg); /* Firefox */
-webkit-transform:rotate(45deg); /* Safari and Chrome */
-o-transform:rotate(45deg); /* Opera */
background: #fafafa;
border-style: solid none none solid;
border-width: 1px medium medium 1px;
border-color: #E0E0E0 transparent transparent #E0E0E0;
width:12px;
height: 12px;
}
.header-7 .search-sec label {
border-left: 3px dotted #b3b3b3;
height: 25px;
position: relative;
width: 40px;
top: 13px;
}
.header-7 .search .icon-search {
color: #B3B3B3;
position: relative;
}
.header-7 .info-box {
float: right;
}
/* header 7 end */
/* =================================== */
<?php } elseif ( $header_styles == "header8" ){?>
/* header 8 */
.header-8 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-8 .navigation > ul > li:last-child{
border:none;
}
.header-8 .logo{
text-align: center;
float:none;
}
.header-8 .navigation{
float:left;
width: 72%;
}
.header-8 .navigation > ul > li > a {
border: none;
padding:8px 23px 0;
position: relative;
color:<?php echo $header_nav_color;?> !important;
}
.header-8 .navigation > ul > li > a:before{
content:'//';
position:absolute;
left:0px;
top:9px;
color:<?php echo $header_nav_color;?> !important;
}
.header-8 .navigation > ul > li:first-child > a:before{
display:none;
}
.header-8 .navigation > ul > li > a:after{
content:'';
position:absolute;
top:-3px;
left:0;
width:100%;
height:2px;
border-top:2px solid <?php echo $header_nav_color;?> !important;
display:none;
}
.header-8 .navigation > ul > li:hover > a:after{
display:block;
}
.header-8 .navigation ul ul a{
text-align:left;
}
.header-8 .navigation ul ul{
top: 100%;
}
.header-8 .navigation > ul > li:first-child a:before {
background: none;
}
.header-8 .navigation > ul > li:last-child{
border:none;
}
.header-8 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-8 .navigation > ul > li.current-menu-ancestor > a:after,
.header-8 .navigation > ul > li.current-menu-item > a:after{
display:block !important;
}
.header-8 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?> !important;
padding:10px 23px 0;
}
.header-8 .navigation ul li:hover > a{
background: none !important;
color:<?php echo $header_nav_hover_color;?> !important
}
.header-8 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important
}
.header-8 .navigation ul ul li.current-menu-item > a{
background:<?php echo $header_subnav_active_bgcolor;?> !important;
color:<?php echo $header_subnav_active_color;?> !important;
}
.header-8 .navigation ul li ul li:hover > a{
border-bottom:none !important;
background:<?php echo $header_subnav_hover_bgcolor; ?> !important;
}
.header-8 .navigation ul ul li:hover > a{
border-bottom:none !important;
color: <?php echo $header_subnav_hover_color;?> !important;
}
.header-8 .navigation > ul > li > a {
border: none;
line-height: 26px;
position: relative;
}
.header-8 .navigation > ul > li {
height: auto;
}
.header-8 .navigation > ul{
float:left;
text-align:left;
}
.header-8 .search-sec .search-input {
background: none repeat scroll 0 0 rgba(143, 143, 143, 0.1);
border: medium none;
float: right;
font-size: 11px;
height: 43px;
margin: 0;
width: 250px;
}
.header-8 .search-sec input[type="submit"]{
background: none;
}
.header-8 .search-sec .searchbtn {
background: none;
height: 44px;
width: 36px;
}
.header-8 .search-sec label{
background: none;
height: 44px;
width: 36px;
}
.header-8 .search-sec {
margin: 0;
}
/* header 8 end */
/* =================================== */
<?php } elseif ( $header_styles == "header9" ){?>
/* header 9 */
.header-9 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-9 .search-sec{
margin:0px;
}
.header-9 .info-box {
float: left;
margin-right: 20px;
}
.header-9 .search-sec{
float:left;
}
.header-9 .topnav{
padding: 5px 14px 5px 14px;
border-right:1px solid #E1E1E1;
}
.header-9 .search-box{
background: none;
height: 30px;
float: left;
background: rgba(143, 143, 143, 0.1);
position: relative;
}
.header-9 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
height: 31px;
box-shadow: none;
border-radius: 0px !important;
border: 1px solid #E7E7E7;
}
.header-9 .search-sec .searchbtn{
border-left: 1px solid #e1e1e1;
border-right: 1px solid #e1e1e1;
border-bottom: none;
border-top: none;
background: none;
color: #b3b3b3;
height: 30px;
position: relative;
top: 0 !important;
padding: 0px;
width: 40px;
z-index: 999;
float: right;
}
.header-9 .search-sec .searchbtn i {
float: left;
width:30px;
height: 30px;
line-height: 30px;
top: 0 !important;
}
.header-9 .search-sec,
.header-9 .search-sec .search{
float:right;
}
.header-9 .search-sec label {
border-left: 3px solid #b3b3b3;
border-right: 3px solid #b3b3b3;
height: 25px;
position: relative;
width: 40px;
top: 0px;
}
.header-9 .search .icon-search {
color: #B3B3B3;
position: relative;
top: 28%;
}
.header-9 .topnav{
border-left: 1px solid #E1E1E1;
border-right: 1px solid #E1E1E1;
border-top: 1px solid #E1E1E1;
padding: 5px 14px;
float:left;
}
.header-9 .info-box p{
padding:5px 0;
}
.header-9 .top-nav a{
padding: 5px 10px;
}
.header-9 .top-nav a:before{
top:13px;
}
.header-4 .top-nav a:before {
background-color: transparent;
}
.header-9 .navigation > ul > li{
border: medium none;
height: auto;
}
.header-9 .navigation > ul > li > a {
border: medium none;
line-height: 25px;
color: <?php echo $header_nav_color;?> !important;
padding:11px 23px 0;
}
.header-9 .navigation > ul > li > a:hover{
background: none !important;
color: <?php echo $header_nav_hover_color;?> !important;
}
.header-9 .navigation ul li:hover > a,
.header-9 .navigation ul li.current-menu-item > a,
.header-9 .navigation > ul > li.current-menu-ancestor > a{
background: none !important;
color:<?php echo $header_nav_hover_color;?> !important
}
.header-9 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?> !important;
}
.header-9 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important
}
.header-9 .navigation ul ul li.current-menu-item > a,
.header-9 .navigation > ul ul > li.current-menu-ancestor > a{
color:<?php echo $header_subnav_active_color;?> !important;
background: <?php echo $header_subnav_active_bgcolor;?> !important;
}
.header-9 .navigation ul ul li:hover > a{
color:<?php echo $header_subnav_hover_color;?> !important;
}
.header-9 .navigation ul li ul li:hover > a{
border-bottom:none !important;
background:<?php echo $header_subnav_hover_bgcolor; ?> !important;
}
.header-9 .navigation ul ul li{
}
.header-9 .logo{
float:none;
text-align:center;
}
/* header 9 end */
/* =================================== */
<?php } elseif ( $header_styles == "header10" ){?>
/* header 10 start */
.header-10 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-10 .header-section {
border-top: 4px solid <?php echo $header_nav_hover_bgcolor;?> !important;;
}
.header-10 .search-sec{
margin:0px;
float:left;
}
.header-10 .search-sec input[type="text"] {
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
background: #fff;
height: 40px;
box-shadow: none;
border-radius: 0px !important;
border: 1px solid #e7e7e7;
padding:0px 65px 0px 15px;
width: 100%;
}
.header-10 .search-box{
height:40px;
background-color:#fafafa;
padding:5px;
top:60px;
box-shadow: 0 0 5px rgba(0,0,0,0.1);
border:1px solid #e7e7e7;
}
.header-10 .search-box:before{
content:'';
position:absolute;
top:-7px;
right:9px;
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* Internet Explorer */
-moz-transform:rotate(45deg); /* Firefox */
-webkit-transform:rotate(45deg); /* Safari and Chrome */
-o-transform:rotate(45deg); /* Opera */
background: #fafafa;
border-style: solid none none solid;
border-width: 1px medium medium 1px;
border-color: #E0E0E0 transparent transparent #E0E0E0;
width:12px;
height: 12px;
}
.header-10 .search:before {
content: '';
width: 100%;
position: absolute;
left: 0;
bottom: -40px;
height: 40px;
z-index: 9999;
}
.header-10 .search-sec input.submit {
height:40px
}
.header-10 .search .searchbtn i {
top: 0;
width: 50px;
height: 50px;
line-height: 50px;
display: block;
}
.header-10 .social-network{
border: medium none;
float: right;
padding: 5px 0;
width: auto;
border-right:1px solid rgba(202,196,196,0.3);
}
.header-10 .search-sec input[type="submit"]{
background: #fff;
top: 5px;
right: 6px;
border: 1px solid #D0D0D0;
}
.header-10 .search-box:after{
font-family:Fontawesome;
content:"\f002";
color: #ddd;
position:absolute;
right:20px;
top:16px;
z-index:9999;
cursor:pointer;
font-size:16px;
}
.header-10 .search-sec .searchbtn{
border-left:1px solid rgba(202,196,196,0.3);
border-right:1px solid rgba(202,196,196,0.3);
border-bottom: none;
border-top: none;
background: none;
color: #b3b3b3;
height: 50px;
position: relative;
top: 0px;
padding: 0px;
width: 50px;
z-index: 99999;
}
.header-10 .topnav{
padding:14px 11px 14px 15px;
border-right:1px solid rgba(202,196,196,0.3);
}
.header-10 .search-sec label {
border-left: 1px solid #b3b3b3;
border-right: 1px solid #b3b3b3;
height: 48px;
position: relative;
width: 64px;
top: 0px;
}
.header-10 .search-sec .icon-search {
color: #b3b3b3;
position: relative;
top: 30%;
}
.header-10 .navigation {
float: left;
width: 90%;
}
.header-10 .social-network {
border-radius: 3px;
padding: 0;
font-size: 0;
}
.header-10 .social-network > h6 {
margin: 0;
padding: 10px 15px;
position: relative;
}
.header-10 .social-network > a{
border-left:1px solid rgba(202,196,196,0.3);
padding: 8px 10px;
margin:0;
-moz-transition: all 0.3s ease-in-out 0s;
-webkit-transition: all 0.3s ease-in-out 0s;
-o-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
border-top:1px solid rgba(202,196,196,0.3);
border-bottom:1px solid rgba(202,196,196,0.3);
}
.header-10 .social-network > a:hover{
background: #444;
color:#fff !important;
}
.header-10 .navigation > ul{
text-align:left;
}
.header-10 .navigation > ul > li{
height: auto;
}
.header-10 .navigation > ul > li.current-menu-item > a{
background: none !important;
color:<?php echo $header_nav_active_color;?> !important;
}
.header-10 .navigation > ul > li.current-menu-ancestor > a{
color:<?php echo $header_nav_active_color;?> !important
}
.header-10 .navigation > ul > li > a {
line-height: 24px;
padding:13px 23px 2px;
color: <?php echo $header_nav_color;?> !important;
border-left:1px solid rgba(202,196,196,0.3);
}
.header-10 .navigation > ul > li:hover > a{
color: <?php echo $header_nav_hover_color;?> !important;
}
.search-sec form{
position:relative;
}
.header-10 .search-sec form:before, .header-7 .search-sec form:before,
.header-10 .info-box{
padding-top: 10px;padding-right: 13px;
}
.header-10 .header-section .top-icons {
padding-top: 26px;
}
.header-10 .navigation ul li:hover > a{
background: none !important;
color:<?php echo $header_nav_hover_color;?> !important
}
.header-10 .social-network > h6 {
display:none;
}
/* header 10 end */
/* =================================== */
<?php } elseif ( $header_styles == "header11" ){?>
/* Header 11 start */
.header-11 {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 100%;
}
.header-11 .social-network > h6{
color: #0c0c0c;
}
.header-11 .social-network > a{
color: #d8d8d8 !important;
}
.header-11 .social-network > a:hover{
color: rgba(131,131,131,0.5 !important);
}
.header-11 .main-menu{
float: left;
border: 1px solid rgba(202, 196, 196, 0.3);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0px 3px 0 1px #f5f5f5 inset;
-moz-box-shadow: 0px 3px 0 1px #f5f5f5 inset;
-o-box-shadow: 0px 3px 0 1px #f5f5f5 inset;
box-shadow: 0px 3px 0 1px #f5f5f5 inset;
}
.header-11 .logo {
margin-top: 33px;
}
.header-11 .social-network{
border: medium none;
float: left;
padding: 5px 0;
width: auto;
}
.header-11 .search-sec label{
background: #8d8d8d;
}
.header-11 .navigation > ul{
float:left;
text-align:left;
}
.header-11 .navigation > ul li{
position:relative;
}
.header-11 .navigation > ul > li{
position:relative;
border-left: 1px solid rgba(202, 196, 196, 0.3);
}
.header-11 .navigation > ul li > a{
border-left:none;
color:<?php echo $header_nav_color;?> !important;
position:relative;
}
.header-11 .navigation ul ul li.current-menu-item > a {
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color: <?php echo $header_subnav_active_color;?> !important;
}
.header-11 .navigation > ul ul li > a:before,
.header-11 .navigation > ul li:first-child > a:before{
display:none;
}
.header-11 .navigation ul li:hover:before,
.header-11 .navigation > ul li:hover:after{
display:block;
}
.header-11 .navigation ul ul li:hover:before,
.header-11 .navigation > ul ul li:hover:after{
display:none;
}
.header-11 .navigation ul li:hover > a{
color:<?php echo $header_nav_active_color;?> !important;
}
.header-11 .info-box{
margin-right:15px;
padding-left: 5px;
}
.header-11 .search-input{
font-size: 11px;
}
/* Header 1 end */
/* =================================== */
<?php } elseif ( $header_styles == "header12" ){?>
/* header 12 start */
.header-1 ,.header-2 ,.header-4 ,.header-5,.header-6 , .header-7 ,.header-8 ,.header-9,.header-10, .header-11 ,.header-12 {
box-shadow: none !important;
width: 100%;
position: relative;
z-index: 999;
}
.header-12 .main-menu {
float: left;
margin-bottom: 20px;
border: 1px solid rgba(202, 196, 196, 0.3);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
box-shadow: none;
position: relative;
width: 100.1%;
}
.header-12 .main-menu .container{
background: <?php echo $header_nav_bgcolr;?> !important;
position: relative;
z-index: 99999999;
float: left;
}
.header-12 .main-menu:before,
.header-12 .main-menu:after{
position:absolute;
z-index:0;
content:"";
}
.header-12 .main-menu:before,
.header-12 .main-menu:after {
bottom:16px;
left:19px;
width:50%;
height:20%;
max-width:50%;
-webkit-box-shadow: 0 18px 20px rgba(0, 0, 0, 0.7);
-moz-box-shadow: 0 18px 20px rgba(0, 0, 0, 0.7);
box-shadow: 0 18px 20px rgba(0, 0, 0, 0.7);
-webkit-transform:rotate(-1deg);
-moz-transform:rotate(-1deg);
-ms-transform:rotate(-1deg);
-o-transform:rotate(-1deg);
transform:rotate(-1deg);
}
.header-12 .main-menu:after {
right:16px;
left:auto;
-webkit-transform:rotate(1deg);
-moz-transform:rotate(1deg);
-ms-transform:rotate(1deg);
-o-transform:rotate(1deg);
transform:rotate(1deg);
}
.header-12 .top-strip{
background: <?php echo $header_top_strip_bg_color;?>;
}
.header-12 .search-sec input[type="submit"]{
background-color: transparent;
float:none;
text-indent: -9999px;
height: 32px;
position: absolute;
right: 0;
top:0px;
width: 30px;
border: none;
}
.header-12 .top-nav a{
padding: 6px 12px;
}
.header-12 .search-sec input[type="text"] {
-moz-box-sizing: border-box;
height: 32px !important;
border: none;
font-size: 12px;
}
.header-12 .search-box {
height: 33px !important;
background: none;
}
.header-12 .search-sec a i {
position: relative;
top: 7px;
}
.header-12 .navigation {
float: left;
width: auto;
}
.header-12 .navigation > ul > li:last-child{
border:none;
}
.header-12 .navigation > ul > li > a{
border:none;
position:relative;
padding:18px 23px 4px;
}
.header-12 .navigation > ul > li > ul{
left:0;
top:54px;
}
.header-12 .navigation > ul > li ul{
border-top:4px solid rgba(202,196,196,0.3);
background-color:<?php echo $header_subnav_bgcolr;?> !important;
}
.header-12 .navigation > ul > li > a:before{
position:absolute;
content:"//";
top: 19px;
left: -4px;
width: 5px;
height: 5px;
color:#444444;
}
.header-12 .navigation > ul > li:first-child > a:before{
display:none;
}
.header-12 .navigation > ul > li > a:after{
content:'';
position:absolute;
left:0;
top:-2px;
border-top:2px solid <?php echo $header_nav_active_bgcolor;?> !important;
width:100%;
height:2px;
display:none;
}
.header-12 .navigation > ul > li:hover > a:after{
display:block;
}
.header-12 .navigation ul li:hover > a,
.header-12 .navigation ul li.current-menu-item > a,
.header-12 .navigation > ul > li.current-menu-ancestor > a{
color: <?php echo $header_nav_active_color;?> !important;
}
.header-12 .navigation ul ul li:hover > a,
.header-12 .navigation ul ul li.current-menu-item > a,
.header-12 .navigation > ul > ul > li.current-menu-ancestor > a{
background: <?php echo $header_subnav_active_bgcolor;?> !important;
color: <?php echo $header_subnav_active_color;?> !important;
}
.header-12 .navigation > ul > li.current_page_item > a:after,
.header-12 .navigation ul li:hover > a:after,
.header-12 .navigation ul li.current-menu-item > a:after,
.header-12 .navigation > ul > li.current-menu-ancestor > a:after{
display:block;
}
.header-12 .navigation > ul > li{
float:left;
}
.header-12 .navigation > ul > li:first-child a:before {
background: none;
}
.navigation > ul > li.current-menu-item > a{
background-color:transparent;
}
.header-12 .navigation ul li:hover > a{
background-color:transparent;
color:<?php echo $header_nav_active_color;?> !important;
}
.header-12 .search-sec label{
border: medium none;
float:none;
text-indent: 0;
color:<?php echo $header_nav_color;?> !important;
height: 30px;
position: absolute;
right: 0;
top:12px;
text-align: center;
width: 30px;
}
.header-12 .search-sec label i {
position: relative;
text-indent: 0;
top: 21%;
z-index: 999999;
}
.header-12 .topnav {
background:transparent;
border-right: 1px solid rgba(0,0,0,0.1);
border-left: 1px solid rgba(0,0,0,0.1);
padding:6px 13px 7px;
}
.header-12 .topnav ul li a{
color:#7d7d7d;
}
.header-12 .search-sec form,
.header-12 .search-sec {
margin: 0;
}
.header-12 .search-sec .searchbtn {
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.5);
position: relative;
top: 0;
padding: 0px;
width: 33px;
height:33px;
}
.header-12 .info-box {
float: left;
margin-right: 17px;
}
.header-12 .search-sec{
float:right;
width: 220px;
height: 55px;
padding-top: 13px;
margin-right: 1px;
margin-top: 0;
background-color: #383838;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.header-12 .social-network {
margin-top: 35px;
}
.header-12 .social-network .tooltip-inner{
background-color: rgba(0,0,0,0.7) !important;
}
.header-12 .tooltip.top .tooltip-arrow{
border-top-color: rgba(0,0,0,0.7)
}
.header-12 .navigation ul ul li{
border-top:1px solid #ededed;
}
.header-12 .search-sec .search-input{
width:100%;
padding: 8px 30px 8px 18px !important;
}
.header-12 .search-sec .search-input:focus,
.header-12 .search-sec .search-input:active{
outline:none !important;
box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
-o-box-shadow: none;
}
/* header 12 end */
<?php }?>
</style>
<?php
}
}
function cs_custom_styles() {
global $cs_theme_option;
if ( isset($_POST['heading_color']) ) {
$_SESSION['sess_heading_color'] = $_POST['heading_color'];
$heading_color_scheme = $_SESSION['sess_heading_color'];
}
elseif (isset($_SESSION['sess_heading_color']) and $_SESSION['sess_heading_color'] <> '') {
$heading_color_scheme = $_SESSION['sess_heading_color'];
}
else{
$heading_color_scheme = $cs_theme_option['heading_color_scheme'];
}
if ( isset($_POST['style_sheet']) ) {
$_SESSION['sess_style_sheet'] = $_POST['style_sheet'];
$cs_color_scheme = $_SESSION['sess_style_sheet'];
}
elseif (isset($_SESSION['sess_style_sheet']) and $_SESSION['sess_style_sheet'] <> '') {
$cs_color_scheme = $_SESSION['sess_style_sheet'];
}
else{
$cs_color_scheme = $cs_theme_option['custom_color_scheme'];
}
?>
<style type="text/css">
@charset "utf-8";
/* CSS Document */
.colr, .widget-twitter .tweet h6, .widget-twitter .tweet h6 a, .colrhover:hover, .thumblist .text > header h5 a:hover, .shar_btn:hover i, .accordion-heading .accordion-toggle:hover, .accordion-heading .accordion-toggle.active,
.portfolio article:hover .text h6 a, .filter_nav ul li.selected-1 a, .filter_nav ul li.selected-2 a, .filter_nav ul li.selected-0 a, .filter_nav ul li a:hover,
.blog_admin article:hover, .pagenone .navigation ul li a:hover, .count a, .comment-edit-link, .comment-reply-link, .comment-reply-title, .comment-reply-title a, .post-edit-link,.prject_main_text h4, .headlines article .text h6 a, .alert-info h4, .widget_tag_cloud a:hover,.bolg_column article:hover figcaption h4 a,
.post-options li a:hover, .event article .text .top p a:hover, .pricing-box .plan-inside li span, .services article:hover .icon-lightbulb, .services article:hover .icon-bar-chart, .services article:hover .icon-laptop, .services article:hover .icon-external-link, .services article:hover h2 a,
.team-shortcode article:hover, .testimonial-author, .detail_info article p a:hover, .bolg_column article:hover figure figcaption h6 a, .accordion-heading .accordion-toggle:hover:before
{color:<?php echo $cs_color_scheme ?> !important;}
#submit-comment, .backcolr, .backcolrhover:hover, .jcarousel-control a.active,
.jcarousel-skin-tango .jcarousel-next-horizontal:hover, .jcarousel-skin-tango .jcarousel-prev-horizontal:hover, .upcoming_event article:hover .date,
.widget_categories ul li:hover, .postlist article figure a img:before, .coursesarticle:hover .rating, #wp-calendar caption, #wp-calendar tbody td a, .table thead,
.countdownit span.countdown_section, .typo p:first-letter, .widget_archive ul li:hover, .widget_nav_menu ul li a:hover, .widget_links ul li:hover,
.widget_meta ul li:hover, .widget_pages ul li a:hover, .widget_recent_entries ul li:hover, .widget_recent_comments ul li:hover, .postlist .blog_text:before,.blog article #flexslider .flex-direction-nav a:hover,.audiobox ,#banner .flexslider .flex-control-nav li a.flex-active,
.dropcap:first-letter, .vertical .nav-tabs li.active a, .wpcf7-submit, .nivo-directionNav a:hover, .show-nav-testimonial .flex-direction-nav a:hover, .widget_ns_mailchimp input[type="submit"],
.services article.service-v2:hover a i, .latest_article .flex-direction-nav a:hover, .headlines .flex-direction-nav a:hover, .blog .flex-direction-nav a:hover,
.fig_text i, .bolg_column article figure span.icon-hover, .bolg_column article figure figcaption h6:before, .portfolio article figure figcaption,.flex-direction-nav a:hover, .progrees-rating-bar span, .portfolio .filter_nav ul li.active a, .portfolio .filter_nav ul li a:hover, .event .filter_nav ul li.active a, .event .filter_nav ul li a:hover, .pagination ul li:hover a, .pagination ul li a.active,
.featured
{background-color:<?php echo $cs_color_scheme ?> !important;}
.bordercolr, .bordercolrhover:hover, #respond form p input:focus, #respond form p textarea:focus, .pagination ul li:hover a, .pagination ul li a.active,.nav-tabs > .active > a:before, .nav-tabs > li > a:hover:before
{border-color:<?php echo $cs_color_scheme ?> !important;}
.coursesarticle:hover .rating:before, .blog_admin article:hover .cuting_border, .team-shortcode article:hover .cuting_border
{border-color:transparent <?php echo $cs_color_scheme ?> !important;}
.coursesarticle:hover .rating:before
{border-color:transparent transparent <?php echo $cs_color_scheme ?> transparent !important;}
h2.section-title,h2.post-title,h1.heading-color,.heading h2, article h1,article h2,article h3,article h4,article h5,article h6,body.date h2,.widget h1,.widget h2,.widget h3,.widget h4,.widget h5,.widget h6,
rich_editor_text h1,.rich_editor_text h2,.rich_editor_text h3,.rich_editor_text h4,.rich_editor_text h5,.rich_editor_text h6,h2.cs-heading-color,h6.cs-heading-color,.cs-heading-color{
color:<?php echo $heading_color_scheme;?> !important;
}
footer{
background-color:<?php echo $cs_theme_option['footer_bg_color'];?> !important;
}
footer:before{
border-color:transparent transparent <?php echo $cs_theme_option['footer_bg_color'];?> !important;
}
footer p{
color:<?php echo $cs_theme_option['footer_text_color'];?> !important;
}
</style>
<?php
}
// custom sidebar start
$cs_theme_option = get_option('cs_theme_option');
if ( isset($cs_theme_option['sidebar']) and !empty($cs_theme_option['sidebar']) ) {
foreach ( $cs_theme_option['sidebar'] as $sidebar ){
//foreach ( $parts as $val ) {
register_sidebar(array(
'name' => $sidebar,
'id' => $sidebar,
'description' => 'This widget will be displayed on right side of the page.',
'before_widget' => '<div class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => ' <header class="heading"><h2 class="section-title heading-color cs-heading-color">',
'after_title' => '</h2></header>'
));
}
}
// custom sidebar end
//footer widget
register_sidebar( array(
'name' => 'Footer Widget',
'id' => 'footer-widget',
'description' => 'This Widget Show the Content in Footer Area.',
'before_widget' => '<div class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => ' <header class="heading"><h6 class="cs-heading-color">',
'after_title' => '</h6></header>'
) );
function cs_add_menuid($ulid) {
return preg_replace('/<ul>/', '<ul id="menus">', $ulid, 1);
}
add_filter('wp_page_menu','cs_add_menuid');
function cs_remove_div ( $menu ){
return preg_replace( array( '#^<div[^>]*>#', '#</div>$#' ), '', $menu );
}
add_filter( 'wp_page_menu', 'cs_remove_div' );
function cs_register_my_menus() {
register_nav_menus(
array(
'main-menu' => __('Main Menu','Perspective'),
'top-menu' => __('Top Menu','Perspective')
)
);
}
add_action( 'init', 'cs_register_my_menus' );
add_filter('nav_menu_css_class', 'cs_add_parent_css', 10, 2);
function cs_add_parent_css($classes, $item) {
global $menu_children;
if ($menu_children)
$classes[] = 'parent';
return $classes;
}
// adding custom images while uploading media start
add_image_size('cs_media_0', 1900, 120, true);
add_image_size('cs_media_1', 1900, 529, true);
add_image_size('cs_media_2', 1170, 490, true);
add_image_size('cs_media_3', 585, 440, true);
add_image_size('cs_media_4', 398, 168, true);
add_image_size('cs_media_5', 360, 370, true);
add_image_size('cs_media_6', 370, 208, true);
// adding custom images while uploading media end
If (!function_exists('PixFill_comment')) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own PixFill_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
*/
function PixFill_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
$args['reply_text'] = __('Reply', 'Perspective');
switch ( $comment->comment_type ) :
case '' :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div class="thumblist" id="comment-<?php comment_ID(); ?>">
<ul>
<li>
<figure>
<a href="#"><?php echo get_avatar( $comment, 63 ); ?></a>
</figure>
<div class="text">
<header>
<?php printf( __( '%s', 'Perspective' ), sprintf( '<h5><a class="colrhover">%s</a></h5>', get_comment_author_link() ) ); ?>
<?php
/* translators: 1: date, 2: time */
printf( __( '<time>%1$s</time>', 'Perspective' ), get_comment_date()); ?>
<?php edit_comment_link( __( '(Edit)', 'Perspective' ), ' ' );?>
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
<?php if ( $comment->comment_approved == '0' ) : ?>
<div class="comment-awaiting-moderation colr"><?php _e( 'Your comment is awaiting moderation.', 'Perspective' ); ?></div>
<?php endif; ?>
</header>
<?php comment_text(); ?>
</div>
</li>
</ul>
</div>
<?php
break;
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php comment_author_link(); ?><?php edit_comment_link( __( '(Edit)', 'Perspective' ), ' ' ); ?></p>
<?php
break;
endswitch;
}
endif;
// password protect post/page
if ( ! function_exists( 'cs_password_form' ) ) {
function cs_password_form() {
global $post,$cs_theme_option;
$label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
$o = '<div class="password_protected">
<img src="'.get_template_directory_uri().'/images/protected.png" alt=""><p>' . __( "This post is password protected. To view it please enter your password below:",'Perspective' ) . '</p>';
$o .= '<div>
<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" method="post"><input name="post_password" id="' . $label . '" type="password" size="20" /><input class="backcolr" type="submit" name="Submit" value="' . $cs_theme_option['trans_unlock'] . '" />
</form>
</div>
</div>';
return $o;
}
}
add_filter( 'the_password_form', 'cs_password_form' );
// breadcrumb function
if ( ! function_exists( 'cs_breadcrumbs' ) ) {
function cs_breadcrumbs() {
/* === OPTIONS === */
$text['home'] = 'Home'; // text for the 'Home' link
$text['category'] = '%s'; // text for a category page
$text['search'] = '%s'; // text for a search results page
$text['tag'] = '%s'; // text for a tag page
$text['author'] = '%s'; // text for an author page
$text['404'] = 'Error 404'; // text for the 404 page
$showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show
$showOnHome = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show
$delimiter = ''; // delimiter between crumbs
$before = '<li class="active">'; // tag before the current crumb
$after = '</li>'; // tag after the current crumb
/* === END OF OPTIONS === */
global $post;
$homeLink = home_url() . '/';
$linkBefore = '<li>';
$linkAfter = '</li>';
$linkAttr = '';
$link = $linkBefore . '<a' . $linkAttr . ' href="%1$s">%2$s</a>' . $linkAfter;
$linkhome = $linkBefore . '<a' . $linkAttr . ' href="%1$s">%2$s</a>' . $linkAfter;
if (is_home() || is_front_page()) {
if ($showOnHome == "1") echo '<div class="breadcrumbs"><ul>'.$before.'<a href="' . $homeLink . '">' . $text['home'] . '</a>'.$after.'</ul></div>';
} else {
echo '<div class="breadcrumbs"><ul>' . sprintf($linkhome, $homeLink, $text['home']) . $delimiter;
if ( is_category() ) {
$thisCat = get_category(get_query_var('cat'), false);
if ($thisCat->parent != 0) {
$cats = get_category_parents($thisCat->parent, TRUE, $delimiter);
$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);
$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);
echo $cats;
}
echo $before . sprintf($text['category'], single_cat_title('', false)) . $after;
} elseif ( is_search() ) {
echo $before . sprintf($text['search'], get_search_query()) . $after;
} elseif ( is_day() ) {
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;
echo sprintf($link, get_month_link(get_the_time('Y'),get_the_time('m')), get_the_time('F')) . $delimiter;
echo $before . get_the_time('d') . $after;
} elseif ( is_month() ) {
echo sprintf($link, get_year_link(get_the_time('Y')), get_the_time('Y')) . $delimiter;
echo $before . get_the_time('F') . $after;
} elseif ( is_year() ) {
echo $before . get_the_time('Y') . $after;
} elseif ( is_single() && !is_attachment() ) {
if ( get_post_type() != 'post' ) {
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
printf($link, $homeLink . '/' . $slug['slug'] . '/', $post_type->labels->singular_name);
if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;
} else {
$cat = get_the_category(); $cat = $cat[0];
$cats = get_category_parents($cat, TRUE, $delimiter);
if ($showCurrent == 0) $cats = preg_replace("#^(.+)$delimiter$#", "$1", $cats);
$cats = str_replace('<a', $linkBefore . '<a' . $linkAttr, $cats);
$cats = str_replace('</a>', '</a>' . $linkAfter, $cats);
echo $cats;
if ($showCurrent == 1) echo $before . substr(get_the_title(),0,35) . $after;
}
} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) {
$post_type = get_post_type_object(get_post_type());
echo $before . $post_type->labels->singular_name . $after;
}elseif ( is_page() && !$post->post_parent ) {
if ($showCurrent == 1) echo $before . get_the_title() . $after;
} elseif ( is_page() && $post->post_parent ) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ($parent_id) {
$page = get_page($parent_id);
$breadcrumbs[] = sprintf($link, get_permalink($page->ID), get_the_title($page->ID));
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse($breadcrumbs);
for ($i = 0; $i < count($breadcrumbs); $i++) {
echo $breadcrumbs[$i];
if ($i != count($breadcrumbs)-1) echo $delimiter;
}
if ($showCurrent == 1) echo $delimiter . $before . get_the_title() . $after;
} elseif ( is_tag() ) {
echo $before . sprintf($text['tag'], single_tag_title('', false)) . $after;
} elseif ( is_author() ) {
global $author;
$userdata = get_userdata($author);
echo $before . sprintf($text['author'], $userdata->display_name) . $after;
} elseif ( is_404() ) {
echo $before . $text['404'] . $after;
}
if ( get_query_var('paged') ) {
// if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' (';
// echo __('Page') . ' ' . get_query_var('paged');
// if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')';
}
echo '</ul></div>';
}
}
}
if ( ! function_exists( 'cs_logo' ) ) {
function cs_logo($logo_url, $log_width, $logo_height){
?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo $logo_url; ?>" style="width:<?php echo $log_width; ?>px; height:<?php echo $logo_height; ?>px" alt="<?php echo bloginfo('name'); ?>" /></a>
<?php
}
}
function cs_uc_logo(){
global $cs_theme_option;
?>
<a href="<?php echo home_url(); ?>"><img src="<?php echo $cs_theme_option['logo']; ?>" style="width:<?php echo $cs_theme_option['logo_width']; ?>px; height:<?php echo $cs_theme_option['logo_height']; ?>px" alt="<?php echo bloginfo('name'); ?>" /></a>
<?php
}
if ( ! function_exists( 'cs_navigation' ) ) {
function cs_navigation(){
global $cs_theme_option;
// Menu parameters
$defaults = array(
'theme_location' => "main-menu",
'menu' => '',
'container' => '',
'container_class' => '',
'container_id' => '',
'menu_class' => '',
'menu_id' => 'menus',
'echo' => false,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s">%3$s</ul>',
'depth' => 0,
'walker' => '',);
echo do_shortcode(wp_nav_menu($defaults));
}
}
function top_strip_navigation($nav){
global $cs_theme_option;
// Menu parameters
$defaults = array(
'theme_location' => "$nav",
'menu' => '',
'container' => '',
'container_class' => '',
'container_id' => '',
'menu_class' => '',
'menu_id' => 'top_strip_menus',
'echo' => false,
'fallback_cb' => 'wp_page_menu',
'before' => '',
'after' => '',
'link_before' => '',
'link_after' => '',
'items_wrap' => '<ul id="%1$s">%3$s</ul>',
'depth' => 0,
'walker' => '',);
echo do_shortcode(wp_nav_menu($defaults));
}
/*
* Ccustom Header Styles Top Strip
*/
if ( ! function_exists( 'cs_header_top_strip' ) ) {
function cs_header_top_strip($top_strip_menu='', $top_strip_right_area_text='', $social_icons='', $header_search='', $header_styles, $user_login) {
global $cs_theme_option;
if($header_styles=='header4' || $header_styles=='header9' || $header_styles=='header2' || $header_styles=='header3'){?>
<div class="top-strip">
<!-- Container Start -->
<div class="container">
<?php if(isset($header_styles) && $header_styles=='header4'){?>
<div class="top-icons-head4">
<!-- Top Nav Start -->
<?php if(isset($top_strip_menu) && !empty($top_strip_menu)){?>
<div class="top-nav">
<?php top_strip_navigation($top_strip_menu); ?>
</div>
<?php }
?>
<?php if($user_login=='on' && ($header_styles=='header4')){
cs_login(true, true);
}
?>
</div>
<?php } else {
?>
<?php if(isset($top_strip_menu) && !empty($top_strip_menu)){?>
<div class="top-nav">
<?php top_strip_navigation($top_strip_menu); ?>
</div>
<?php }
}
?>
<?php
if(isset($social_icons) && $social_icons=='on' && $header_styles=='header3'){
/* Social Network Start */
cs_social_network();
/* Social Network End */
}
?>
<!-- Top Nav End -->
<div class="top-icons">
<!-- Infobox Start -->
<?php if(isset($top_strip_right_area_text) && !empty($top_strip_right_area_text)){?>
<div class="info-box">
<p><?php echo $top_strip_right_area_text;?></p>
</div>
<?php }?>
<!-- Infobox End -->
<?php if(isset($header_search) && $header_search=='simple'){?>
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search($header_search); ?>
</div>
<!-- Search End -->
<?php } elseif(isset($header_search) && $header_search=='toggle'){?>
<div class="search-sec">
<?php cs_header_search($header_search); ?>
</div>
<?php }?>
<?php if($user_login=='on' && ($header_styles=='header2' || $header_styles=='header9')){
cs_login(true, true);
}
if($user_login=='on' && ($header_styles=='header3')){
cs_login();
}
?>
</div>
</div>
<!-- Container End -->
</div>
<?php
} else {
?>
<div class="top-strip">
<!-- Container Start -->
<div class="container">
<!-- Top Nav Start -->
<?php if(isset($top_strip_menu) && !empty($top_strip_menu)){?>
<div class="top-nav">
<?php
top_strip_navigation($top_strip_menu);
?>
</div>
<?php }?>
<!-- Top Nav End -->
<?php if($header_styles=='header1' || $header_styles=='header11'){
if(isset($top_strip_right_area_text) && !empty($top_strip_right_area_text)){?>
<div class="info-box">
<p><?php echo $top_strip_right_area_text;?></p>
</div>
<?php }
}
?>
<!-- Infobox Start -->
<div class="top-icons">
<?php
if(isset($top_strip_right_area_text) && !empty($top_strip_right_area_text) && $header_styles<>'header1' && $header_styles<>'header11'){?>
<div class="info-box">
<p><?php echo $top_strip_right_area_text;?></p>
</div>
<?php }?>
<!-- Infobox End -->
<?php
if(isset($social_icons) && $social_icons=='on'){
//<!-- Social Network Start -->
cs_social_network();
//<!-- Social Network End -->
}
?>
<?php if(isset($header_search) && $header_search=='simple'){?>
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search($header_search); ?>
</div>
<!-- Search End -->
<?php } elseif(isset($header_search) && $header_search=='toggle'){?>
<div class="search-sec">
<?php cs_header_search($header_search); ?>
</div>
<?php }?>
<?php if($user_login=='on' && ($header_styles=='header2' || $header_styles=='header1' || $header_styles=='header12' || $header_styles=='header11' || $header_styles=='header3' || $header_styles=='header9')){
cs_login('User Login', 'Logout');
}?>
</div>
</div>
<!-- Container End -->
</div>
<?php
}
}
}
/*
* Ccustom Header Styles 1 -10
*/
function cs_custom_header_styles($header_styles) {
global $cs_theme_option;
if ( $header_styles == "header1" )
{
?>
<!-- Header Start -->
<header class="header-1">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_1_strip']) && $cs_theme_option['header_1_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_1_top_strip_menu'], $cs_theme_option['header_1_top_strip_right_area_text'], $cs_theme_option['header_1_social_icons'], '', $header_styles, $cs_theme_option['header_1_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_1_logo']) && !empty($cs_theme_option['header_1_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_1_logo'], $cs_theme_option['header_1_logo_width'], $cs_theme_option['header_1_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('simple');?>
</div>
<!-- Search End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php }elseif ( $header_styles == "header2" ){ ?>
<!-- Header Start -->
<header class="header-2">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_2_strip']) && $cs_theme_option['header_2_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_2_top_strip_menu'], $cs_theme_option['header_2_top_strip_right_area_text'], '', 'toggle', $header_styles, $cs_theme_option['header_2_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_2_logo']) && !empty($cs_theme_option['header_2_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_2_logo'], $cs_theme_option['header_2_logo_width'], $cs_theme_option['header_2_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Social Network Start -->
<?php if(isset($cs_theme_option['header_2_social_icons']) && $cs_theme_option['header_2_social_icons']=='on'){
cs_social_network();
}?>
<!-- Social Network End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php }elseif ( $header_styles == "header3" ){ ?>
<!-- Header Start -->
<header class="header-3">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_3_strip']) && $cs_theme_option['header_3_strip']=='on'){
cs_header_top_strip('', $cs_theme_option['header_3_top_strip_right_area_text'], $cs_theme_option['header_3_social_icons'], 'toggle', $header_styles, $cs_theme_option['header_3_login']);
}
?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_3_logo']) && !empty($cs_theme_option['header_3_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_3_logo'], $cs_theme_option['header_3_logo_width'], $cs_theme_option['header_3_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header4") {?>
<!-- Header Start -->
<header class="header-4">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_4_strip']) && $cs_theme_option['header_4_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_4_top_strip_menu'], $cs_theme_option['header_4_top_strip_right_area_text'], '', 'toggle', $header_styles, $cs_theme_option['header_4_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_4_logo']) && !empty($cs_theme_option['header_4_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_4_logo'], $cs_theme_option['header_4_logo_width'], $cs_theme_option['header_4_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header5") {?>
<!-- Header Start -->
<header class="header-5">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_5_strip']) && $cs_theme_option['header_5_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_5_top_strip_menu'], $cs_theme_option['header_5_top_strip_right_area_text'], '', 'toggle', $header_styles, '');
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_5_logo']) && !empty($cs_theme_option['header_5_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_5_logo'], $cs_theme_option['header_5_logo_width'], $cs_theme_option['header_5_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Search Start -->
<!-- <div class="search-sec">
<?php cs_header_search('toggle');?>
</div>-->
<!-- Search End -->
<div class="top-icons">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
<?php if($cs_theme_option['header_5_login']=='on'){
cs_login();
}?>
</div>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header6") {?>
<!-- Header Start -->
<header class="header-6">
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_6_logo']) && !empty($cs_theme_option['header_6_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_6_logo'], $cs_theme_option['header_6_logo_width'], $cs_theme_option['header_6_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
<div class="top-icons">
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('custom');?>
</div>
<!-- Search End -->
<?php if($cs_theme_option['header_6_login']=='on'){
cs_login();
}?>
</div>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header7") {?>
<!-- Header Start -->
<header class="header-7">
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_7_logo']) && !empty($cs_theme_option['header_7_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_7_logo'], $cs_theme_option['header_7_logo_width'], $cs_theme_option['header_7_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('custom');?>
</div>
<!-- Search End -->
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header8") {?>
<!-- Header Start -->
<header class="header-8">
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_8_logo']) && !empty($cs_theme_option['header_8_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_8_logo'], $cs_theme_option['header_8_logo_width'], $cs_theme_option['header_8_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('simple');?>
</div>
<!-- Search End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header9") {?>
<!-- Header Start -->
<header class="header-9">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_9_strip']) && $cs_theme_option['header_9_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_9_top_strip_menu'], $cs_theme_option['header_9_top_strip_right_area_text'], '', 'toggle', $header_styles, $cs_theme_option['header_9_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_9_logo']) && !empty($cs_theme_option['header_9_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_9_logo'], $cs_theme_option['header_9_logo_width'], $cs_theme_option['header_9_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header10") {?>
<!-- Header Start -->
<header class="header-10">
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_10_logo']) && !empty($cs_theme_option['header_10_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_10_logo'], $cs_theme_option['header_10_logo_width'], $cs_theme_option['header_10_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<div class="top-icons">
<?php if(isset($cs_theme_option['header_10_top_strip_right_area_text']) && !empty($cs_theme_option['header_10_top_strip_right_area_text'])){ ?>
<div class="info-box">
<p><?php echo $cs_theme_option['header_10_top_strip_right_area_text']; ?></p>
</div>
<?php }?>
<!-- Social Network Start -->
<?php if(isset($cs_theme_option['header_10_social_icons']) && $cs_theme_option['header_10_social_icons']=='on'){?>
<?php cs_social_network(); ?>
<?php }?>
<!-- Social Network End -->
</div>
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
<div class="top-icons">
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('custom');?>
</div>
<!-- Search End -->
<?php if($cs_theme_option['header_10_login']=='on'){
cs_login();
}?>
</div>
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header11") {?>
<!-- Header Start -->
<header class="header-11">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_11_strip']) && $cs_theme_option['header_11_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_11_top_strip_menu'], $cs_theme_option['header_11_top_strip_right_area_text'], $cs_theme_option['header_11_social_icons'], '', $header_styles, $cs_theme_option['header_11_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_11_logo']) && !empty($cs_theme_option['header_11_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_11_logo'], $cs_theme_option['header_11_logo_width'], $cs_theme_option['header_11_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<?php if(isset($cs_theme_option['header_11_advertisement_img']) && !empty($cs_theme_option['header_11_advertisement_img'])){ ?>
<!-- Advertisement Start -->
<div class="advertisement-sec">
<a href="<?php echo $cs_theme_option['header_11_advertisement_link'];?>" target="_blank" ><image src="<?php echo $cs_theme_option['header_11_advertisement_img'];?>" alt="" ></a>
</div>
<!-- Advertisement End -->
<?php }?>
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php } elseif ($header_styles == "header12") {?>
<!-- Header Start -->
<header class="header-12">
<!-- Top Strip Start -->
<?php if(isset($cs_theme_option['header_12_strip']) && $cs_theme_option['header_12_strip']=='on'){
cs_header_top_strip($cs_theme_option['header_12_top_strip_menu'], $cs_theme_option['header_12_top_strip_right_area_text'], '', '', $header_styles, $cs_theme_option['header_12_login']);
}?>
<!-- Top Strip End -->
<!-- Header Section Start -->
<div class="header-section">
<!-- Container Start -->
<div class="container">
<?php if(isset($cs_theme_option['header_12_logo']) && !empty($cs_theme_option['header_12_logo'])){ ?>
<!-- Logo Start -->
<div class="logo">
<?php cs_logo($cs_theme_option['header_12_logo'], $cs_theme_option['header_12_logo_width'], $cs_theme_option['header_12_logo_height']); ?>
</div>
<!-- Logo End -->
<?php }?>
<!-- Social Network Start -->
<?php if(isset($cs_theme_option['header_12_social_icons']) && $cs_theme_option['header_12_social_icons']=='on'){
cs_social_network();
}?>
<!-- Social Network End -->
<!-- Main Menu Start -->
<div class="main-menu">
<!-- Container Start -->
<div class="container">
<!-- Navigation Start -->
<nav class="navigation">
<?php cs_navigation(); ?>
</nav>
<!-- Navigation End -->
<!-- Search Start -->
<div class="search-sec">
<?php cs_header_search('simple');?>
</div>
<!-- Search End -->
</div>
<!-- Container End -->
</div>
<!-- Main Menu End -->
</div>
<!-- Container End -->
</div>
<!-- Header Section End -->
</header>
<!-- Header End -->
<?php }
}
/*
* Ccustom Header Styles 1 -10 End
*/
// Header simple, toggle and custom Search at front end//
function cs_header_search($type='simple'){
?>
<form action="<?php echo home_url() ?>" method="get">
<?php if($type <> 'simple'){?>
<div class="search">
<button class="searchbtn webkit"><i class="icon-search icon-2"></i></button>
<div class="search-box" id="inputfocus">
<?php }?>
<input type="text" onblur="if(this.value=='') {this.value='<?php _e('Search for:', 'LakeCity'); ?>';}" onfocus="if(this.value=='<?php _e('Search for:', 'LakeCity'); ?>') {this.value='';}" value="<?php _e('Search for:', 'LakeCity'); ?>" class="search-input" name="s">
<?php if ($type=='simple'){ ?>
<label><i class="icon-search"></i><input type="submit" name="submit"></label>
<?php
} else {
if($type=='custom'){?>
<input type="submit" name="submit" value="Submit" class="submit">
<?php } ?>
</div>
</div>
<?php }?>
</form>
<?php
}
if ( ! function_exists( 'cs_login' ) ) {
function cs_login($login='', $logout=''){
?>
<nav class="topnav">
<ul>
<?php
if ( is_user_logged_in() ) { ?>
<li><a class="logout" href="<?php echo wp_logout_url("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']); ?>"><?php if($logout == true){ _e('Log out', 'Perspective');}?></a></li>
<?php }else{?>
<li><a href="#loginbox" class="login" role="button" data-toggle="modal"><?php if($login == true){ _e('Log In', 'Perspective');}?></a></li>
<?php } ?>
</ul>
</nav>
<?php
}
}
if ( ! function_exists( 'cs_under_construction' ) ) {
function cs_under_construction(){
global $cs_theme_option, $post;
if(isset($post)){ $post_name = $post->post_name; }else{ $post_name = ''; }
if ( $cs_theme_option['under-construction'] == "on" or $post_name == "pf-under-construction" ) {
?>
<div class="bottom_strip">
<div class="container">
<div class="logo">
<?php if($cs_theme_option['showlogo'] == "on"){ cs_uc_logo(); } ?>
</div>
</div>
</div>
<div id="undercontruction">
<div id="midarea">
<div class="container">
<?php echo '<p>'.htmlspecialchars_decode($cs_theme_option['under_construction_text']).'</p>';?>
<?php
$launch_date = $cs_theme_option['launch_date'];
$year = date("Y", strtotime($launch_date));
$month = date("m", strtotime($launch_date));
$month_event_c = date("M", strtotime($launch_date));
$day = date("d", strtotime($launch_date));
$time_left = date("H,i,s", strtotime($launch_date));
?>
<script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/scripts/frontend/jquery.countdown.js"></script>
<script>
jQuery(function () {
var austDay = new Date();
austDay = new Date(<?php echo $year;?>, <?php echo $month;?>-1, <?php echo $day;?>,<?php echo $time_left?>)
jQuery('#defaultCountdown').countdown({until: austDay});
jQuery('#year').text(austDay.getFullYear());
});
</script>
<div class="countdownit">
<div id="defaultCountdown"></div>
</div>
</div>
</div>
<!-- Footer Widgets Start -->
<div id="footer-widgets">
<!-- Container Start -->
<div class="container">
<!-- Social Network Start -->
<?php if($cs_theme_option['socialnetwork'] == "on"){
cs_social_network();
} ?>
<!-- Social Network End -->
</div>
<!-- Container End -->
</div>
<!-- Footer Start -->
<footer>
<!-- Container Start -->
<div class="container">
<a id="back-top" class="gotop" href="#"><i class="icon-chevron-up icon-2x"></i></a>
<p><?php echo htmlspecialchars_decode($cs_theme_option['copyright']); ?> <a href="#" class="colrhover"><?php echo htmlspecialchars_decode($cs_theme_option['powered_by']); ?></a></p>
</div>
<!-- Container End -->
</footer>
<!-- Footer End -->
</div>
<?php die();
}
}
}
// widget start
// widget_facebook start
class cs_facebook_module extends WP_Widget
{
function cs_facebook_module()
{
$widget_ops = array('classname' => 'facebok_widget', 'description' => 'Facebook widget like box total customized with theme.' );
$this->WP_Widget('cs_facebook_module', 'CS : Facebook', $widget_ops);
}
function form($instance)
{
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = $instance['title'];
$pageurl = isset( $instance['pageurl'] ) ? esc_attr( $instance['pageurl'] ) : '';
$showfaces = isset( $instance['showfaces'] ) ? esc_attr( $instance['showfaces'] ) : '';
$showstream = isset( $instance['showstream'] ) ? esc_attr( $instance['showstream'] ) : '';
$showheader = isset( $instance['showheader'] ) ? esc_attr( $instance['showheader'] ) : '';
$fb_bg_color = isset( $instance['fb_bg_color'] ) ? esc_attr( $instance['fb_bg_color'] ) : '';
//$likebox_width = isset( $instance['likebox_width'] ) ? esc_attr( $instance['likebox_width'] ) : '';
$likebox_height = isset( $instance['likebox_height'] ) ? esc_attr( $instance['likebox_height'] ) : '';
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">
Title:
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size='40' name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('pageurl'); ?>">
Page URL:
<input class="upcoming" id="<?php echo $this->get_field_id('pageurl'); ?>" size='40' name="<?php echo $this->get_field_name('pageurl'); ?>" type="text" value="<?php echo esc_attr($pageurl); ?>" />
<br />
<small>Please enter your page or User profile url example: http://www.facebook.com/profilename OR <br />
https://www.facebook.com/pages/wxyz/123456789101112
</small><br />
<!--<strong>Only People Will Be Shown Please Use Height to Manage Your View.</strong>-->
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showfaces'); ?>">
Show Faces:
<input class="upcoming" id="<?php echo $this->get_field_id('showfaces'); ?>" name="<?php echo $this->get_field_name('showfaces'); ?>" type="checkbox" <?php if(esc_attr($showfaces) != '' ){echo 'checked';}?> />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showstream'); ?>">
Show Stream:
<input class="upcoming" id="<?php echo $this->get_field_id('showstream'); ?>" name="<?php echo $this->get_field_name('showstream'); ?>" type="checkbox" <?php if(esc_attr($showstream) != '' ){echo 'checked';}?> />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('likebox_height'); ?>">
Like Box Height:
<input class="upcoming" id="<?php echo $this->get_field_id('likebox_height'); ?>" size='2' name="<?php echo $this->get_field_name('likebox_height'); ?>" type="text" value="<?php echo esc_attr($likebox_height); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('fb_bg_color'); ?>">
Background Color:
<input type="text" name="<?php echo $this->get_field_name('fb_bg_color'); ?>" size='4' id="<?php echo $this->get_field_id('fb_bg_color'); ?>" value="<?php if(!empty($fb_bg_color)){ echo $fb_bg_color;}else{ echo "#fff";}; ?>" class="fb_bg_color upcoming" />
</label>
</p>
<?php
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['pageurl'] = $new_instance['pageurl'];
$instance['showfaces'] = $new_instance['showfaces'];
$instance['showstream'] = $new_instance['showstream'];
$instance['showheader'] = $new_instance['showheader'];
$instance['fb_bg_color'] = $new_instance['fb_bg_color'];
//$instance['likebox_width'] = $new_instance['likebox_width'];
$instance['likebox_height'] = $new_instance['likebox_height'];
return $instance;
}
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$pageurl = empty($instance['pageurl']) ? ' ' : apply_filters('widget_title', $instance['pageurl']);
$showfaces = empty($instance['showfaces']) ? ' ' : apply_filters('widget_title', $instance['showfaces']);
$showstream = empty($instance['showstream']) ? ' ' : apply_filters('widget_title', $instance['showstream']);
$showheader = empty($instance['showheader']) ? ' ' : apply_filters('widget_title', $instance['showheader']);
$fb_bg_color = empty($instance['fb_bg_color']) ? ' ' : apply_filters('widget_title', $instance['fb_bg_color']);
//$likebox_width = empty($instance['likebox_width']) ? ' ' : apply_filters('widget_title', $instance['likebox_width']);
$likebox_height = empty($instance['likebox_height']) ? ' ' : apply_filters('widget_title', $instance['likebox_height']);
if(isset($showfaces) AND $showfaces == 'on'){$showfaces ='true';}else{$showfaces = 'false';}
if(isset($showstream) AND $showstream == 'on'){$showstream ='true';}else{$showstream ='false';}
echo $before_widget;
// WIDGET display CODE Start
if (!empty($title))
echo $before_title;
echo $title;
echo $after_title;
global $wpdb, $post;?>
<style type="text/css" scoped="scoped">
.facebookOuter {
background-color:<?php echo $fb_bg_color ?>;
width:100%;
padding:0;
float:left;
}
.facebookInner {
float: left;
width: 100%;
}
.facebook_module, .fb_iframe_widget > span, .fb_iframe_widget > span > iframe {
width: 100% !important;
}
.fb_iframe_widget, .fb-like-box div span iframe {
width: 100% !important;
float: left;
}
</style>
<div class="facebook">
<div class="facebookOuter">
<div class="facebookInner">
<div class="fb-like-box"
colorscheme="light" data-height="<?php echo $likebox_height;?>" data-width="190"
data-href="<?php echo $pageurl;?>"
data-border-color="#fff" data-show-faces="<?php echo $showfaces;?>" data-show-border="false"
data-stream="<?php echo $showstream;?>" data-header="false">
</div>
</div>
</div>
</div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<?php echo $after_widget;
}
}
add_action( 'widgets_init', create_function('', 'return register_widget("cs_facebook_module");') );
// widget_facebook end
// widget_gallery start
class cs_gallery extends WP_Widget {
function cs_gallery() {
$widget_ops = array('classname' => 'widget_gallery', 'description' => 'Select any gallery to show in widget.');
$this->WP_Widget('cs_gallery', 'CS : Gallery Widget', $widget_ops);
}
function form($instance) {
$instance = wp_parse_args((array) $instance, array('title' => '', 'get_names_gallery' => 'new'));
$title = $instance['title'];
$get_names_gallery = isset($instance['get_names_gallery']) ? esc_attr($instance['get_names_gallery']) : '';
$showcount = isset($instance['showcount']) ? esc_attr($instance['showcount']) : '';
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">
Title:
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size="40" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('get_names_gallery'); ?>">
Select Gallery:
<select id="<?php echo $this->get_field_id('get_names_gallery'); ?>" name="<?php echo $this->get_field_name('get_names_gallery'); ?>" style="width:225px;">
<?php
global $wpdb, $post;
$newpost = 'posts_per_page=-1&post_type=cs_gallery&order=ASC&post_status=publish';
$newquery = new WP_Query($newpost);
while ($newquery->have_posts()): $newquery->the_post();
?>
<option <?php
if (esc_attr($get_names_gallery) == $post->post_name) {
echo 'selected';
}
?> value="<?php echo $post->post_name; ?>" >
<?php echo substr(get_the_title($post->ID), 0, 20);
if (strlen(get_the_title($post->ID)) > 20)
echo "...";
?>
</option>
<?php endwhile; ?>
</select>
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showcount'); ?>">
Number of Images:
<input class="upcoming" id="<?php echo $this->get_field_id('showcount'); ?>" size="2" name="<?php echo $this->get_field_name('showcount'); ?>" type="text" value="<?php echo esc_attr($showcount); ?>" />
</label>
</p>
<?php
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['get_names_gallery'] = $new_instance['get_names_gallery'];
$instance['showcount'] = $new_instance['showcount'];
return $instance;
}
function widget($args, $instance) {
extract($args, EXTR_SKIP);
global $wpdb, $post;
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$get_names_gallery = isset($instance['get_names_gallery']) ? esc_attr($instance['get_names_gallery']) : '';
$showcount = isset($instance['showcount']) ? esc_attr($instance['showcount']) : '';
if (empty($showcount)) {
$showcount = '12';
}
// WIDGET display CODE Start
echo $before_widget;
if (strlen($get_names_gallery) <> 1 || strlen($get_names_gallery) <> 0) {
echo $before_title . $title . $after_title;
}
if ($get_names_gallery <> '') {
// galery slug to id start
$get_gallery_id = '';
$args=array(
'name' => $get_names_gallery,
'post_type' => 'cs_gallery',
'post_status' => 'publish',
'showposts' => 1,
);
$get_posts = get_posts($args);
if($get_posts){
$get_gallery_id = $get_posts[0]->ID;
}
// galery slug to id end
if($get_gallery_id <> ''){
$cs_meta_gallery_options = get_post_meta($get_gallery_id, "cs_meta_gallery_options", true);
if ($cs_meta_gallery_options <> "") {
$xmlObject = new SimpleXMLElement($cs_meta_gallery_options);
if ($showcount > count($xmlObject)) {
$showcount = count($xmlObject);
}
?>
<ul class="gallery-list lightbox">
<?php
cs_enqueue_gallery_style_script();
for ($i = 0; $i < $showcount; $i++) {
$path = $xmlObject->gallery[$i]->path;
$title = $xmlObject->gallery[$i]->title;
$description = $xmlObject->gallery[$i]->description;
$social_network = $xmlObject->gallery[$i]->social_network;
$use_image_as = $xmlObject->gallery[$i]->use_image_as;
$video_code = $xmlObject->gallery[$i]->video_code;
$link_url = $xmlObject->gallery[$i]->link_url;
$image_url = cs_attachment_image_src($path, 60, 60);
$image_url_full = cs_attachment_image_src($path, 0, 0);
?>
<li>
<a <?php if ( $description <> '' ) { echo 'data-title="'.$description.'"'; }?> href="<?php if ($use_image_as == 1)echo $video_code; elseif($use_image_as==2) echo $link_url; else echo $image_url_full;?>" target="<?php if($use_image_as==2){ echo '_blank'; }else{ echo '_self'; }; ?>" data-rel="<?php if ($use_image_as == 1) echo "prettyPhoto"; elseif($use_image_as==2) echo ""; else echo "prettyPhoto[gallery1]"?>"><?php echo "<img width='60' height='60' src='" . $image_url . "' data-alt='" . $title . "' alt='' />" ?></a>
</li>
<?php } ?>
</ul>
<?php }}else{
echo '<h4>'.__( 'No results found.', 'Perspective' ).'</h4>';
}} // endif of Category Selection?>
<?php
echo $after_widget; // WIDGET display CODE End
}
}
add_action('widgets_init', create_function('', 'return register_widget("cs_gallery");'));
// widget_gallery end
// widget_recent_post start
class cs_recentposts extends WP_Widget
{
function cs_recentposts()
{
$widget_ops = array('classname' => 'widget_latest_news', 'description' => 'Recent Posts from category.' );
$this->WP_Widget('cs_recentposts', 'CS : Recent Posts', $widget_ops);
}
function form($instance)
{
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = $instance['title'];
$select_category = isset( $instance['select_category'] ) ? esc_attr( $instance['select_category'] ) : '';
$showcount = isset( $instance['showcount'] ) ? esc_attr( $instance['showcount'] ) : '';
$thumb = isset( $instance['thumb'] ) ? esc_attr( $instance['thumb'] ) : '';
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">
Title:
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size="40" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('select_category'); ?>">
Select Category:
<select id="<?php echo $this->get_field_id('select_category'); ?>" name="<?php echo $this->get_field_name('select_category'); ?>" style="width:225px">
<?php
$categories = get_categories();
if($categories <> ""){
foreach ( $categories as $category ) {?>
<option <?php if($select_category == $category->slug){echo 'selected';}?> value="<?php echo $category->slug;?>" ><?php echo $category->name;?></option>
<?php }?>
<?php }?>
</select>
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showcount'); ?>">
Number of Posts To Display:
<input class="upcoming" id="<?php echo $this->get_field_id('showcount'); ?>" size='2' name="<?php echo $this->get_field_name('showcount'); ?>" type="text" value="<?php echo esc_attr($showcount); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('thumb'); ?>">
Display Thumbinals:
<input class="upcoming" id="<?php echo $this->get_field_id('thumb'); ?>" size='2' name="<?php echo $this->get_field_name('thumb'); ?>" value="true" type="checkbox" <?php if(isset($instance['thumb']) ) echo 'checked="checked"'; ?> />
</label>
</p>
<?php
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['select_category'] = $new_instance['select_category'];
$instance['showcount'] = $new_instance['showcount'];
$instance['thumb'] = $new_instance['thumb'];
return $instance;
}
function widget($args, $instance)
{
global $node;
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$select_category = empty($instance['select_category']) ? ' ' : apply_filters('widget_title', $instance['select_category']);
$showcount = empty($instance['showcount']) ? ' ' : apply_filters('widget_title', $instance['showcount']);
$thumb = isset( $instance['thumb'] ) ? esc_attr( $instance['thumb'] ) : '';
if($instance['showcount'] == ""){$instance['showcount'] = '-1';}
echo $before_widget;
// WIDGET display CODE Start
if (!empty($title))
echo $before_title;
echo $title;
echo $after_title;
global $wpdb, $post;?>
<!-- Recent Posts Start -->
<?php
wp_reset_query();
$args = array( 'posts_per_page' => "$showcount",'post_type' => 'post','category_name' => "$select_category");
$custom_query = new WP_Query($args);
if ( $custom_query->have_posts() <> "" ) {
while ( $custom_query->have_posts()) : $custom_query->the_post();
$post_xml = get_post_meta($post->ID, "post", true);
$xmlObject = new stdClass();
if ( $post_xml <> "" ) {
$xmlObject = new SimpleXMLElement($post_xml);
$post_view = '';
$post_view = $xmlObject->post_thumb_view;
$post_image = $xmlObject->post_thumb_image;
$post_video = $xmlObject->post_thumb_video;
$post_audio = $xmlObject->post_thumb_audio;
$post_slider = $xmlObject->post_thumb_slider;
$post_slider_type = $xmlObject->post_thumb_slider_type;
$width = 370;
$height = 208;
$image_url = cs_get_post_img_src($post->ID, $width, $height);
}
?>
<!-- Upcoming Widget Start -->
<article class="viewme">
<?php if($thumb == "true"){?>
<figure class="viewme">
<?php
if ($post_view == "Map" and $post_view <> ''){
$node = new stdClass();
$node->map_lat = $xmlObject->post_thumb_map_lat;
$node->map_lon = $xmlObject->post_thumb_map_lon;
$node->map_zoom = $xmlObject->post_thumb_map_zoom;
$node->map_address = $xmlObject->post_thumb_map_address;
$node->map_controls = $xmlObject->post_thumb_map_controls;
$node->map_height = $height;
echo cs_map_page();
}elseif( $post_view == "Slider" and $post_slider_type == "Flex Slider" and $post_view <> ''){
$node = '';
cs_flex_slider($width,$height,$post_slider);
}elseif ( $post_view == "Slider" and $post_slider_type == "Nivo Slider" and $post_view <> ''){
$node = '';
cs_nivo_slider($width,$height,$post_slider);
}elseif($post_view == "Single Image" and $post_view <> ''){
cs_enqueue_gallery_style_script();
echo "<a class='icon-hover' href='".get_permalink()."' ><img src='".$image_url."' alt=''></a>
<figcaption class='webkit'>
<a class='linkme' href='".get_permalink()."'></a>
</figcaption>
";
}elseif($post_view == "Video" and $post_view <> ''){
$url = parse_url($post_video);
if($url['host'] == $_SERVER["SERVER_NAME"]){?>
<video width="100%" class="mejs-wmp" height="370" src="<?php echo $post_video ?>" id="player1" poster="<?php echo $image_url; ?>" controls="controls" preload="none"></video>
<?php
}else{
echo wp_oembed_get($post_video,array('width'=>360,'height' => 370));
}
}elseif($post_view == "Audio" and $post_audio <> ''){
?>
<audio style="width:100%;" src="<?php echo $post_audio; ?>" controls="controls"></audio>
<?php
}
?>
</figure>
<div class="text">
<h6><a href="<?php the_permalink();?>" class="colrhover"><?php echo substr(get_the_title(),0,30); if ( strlen(get_the_title()) > 30) echo "..."; ?></a></h6>
<p class="line"><?php cs_get_the_excerpt(100,true);?></p>
</div>
<?php }else{ ?>
<div class="text">
<h6><a href="<?php echo get_permalink();?>" class="colrhover"><?php echo substr(get_the_title(),0,30);if ( strlen(get_the_title()) > 30) echo "..."; ?></a></h6>
<p class="line"><?php cs_get_the_excerpt(100,true);?></p>
</div>
<?php } ?>
</article>
<?php endwhile; ?>
<?php
}
else {
echo '<h4>'.__( 'No results found.', 'Perspective' ).'</h4>';
}?>
<!-- Recent Posts End -->
<?php
echo $after_widget;
}
}
add_action( 'widgets_init', create_function('', 'return register_widget("cs_recentposts");') );
// widget_recent_post end
// widget_twitter start
class cs_twitter_widget extends WP_Widget {
function cs_twitter_widget() {
$widget_ops = array('classname' => 'widget widget_newslatter widget-twitter', 'description' => 'twitter widget');
$this->WP_Widget('cs_twitter_widget', 'CS : Twitter Widget', $widget_ops);
}
function form($instance) {
$instance = wp_parse_args((array) $instance, array('title' => ''));
$title = $instance['title'];
$username = isset($instance['username']) ? esc_attr($instance['username']) : '';
$numoftweets = isset($instance['numoftweets']) ? esc_attr($instance['numoftweets']) : '';
?>
<label for="<?php echo $this->get_field_id('title'); ?>">
<span>Title: </span>
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size="40" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
<label for="screen_name">User Name<span class="required">(*)</span>: </label>
<input class="upcoming" id="<?php echo $this->get_field_id('username'); ?>" size="40" name="<?php echo $this->get_field_name('username'); ?>" type="text" value="<?php echo esc_attr($username); ?>" />
<label for="tweet_count">
<span>Num of Tweets: </span>
<input class="upcoming" id="<?php echo $this->get_field_id('numoftweets'); ?>" size="2" name="<?php echo $this->get_field_name('numoftweets'); ?>" type="text" value="<?php echo esc_attr($numoftweets); ?>" />
<div class="clear"></div>
</label>
<?php
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['username'] = $new_instance['username'];
$instance['numoftweets'] = $new_instance['numoftweets'];
return $instance;
}
function widget($args, $instance) {
global $cs_theme_option;
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$username = $instance['username'];
$numoftweets = $instance['numoftweets'];
if($numoftweets == ''){$numoftweets = 2;}
// WIDGET display CODE Start
if (!empty($title))
echo $before_widget;
echo $before_title . $title . $after_title;
if(strlen($username) > 1){
$numoftweets=$numoftweets+1;
$return = '';
$response = '';
$exclude_replies = '0';
$include_rts = '0';
$token = get_option( 'TWITTER_BEARER_TOKEN' );
if($token && $username) {
$args = array(
'httpversion' => '1.1',
'blocking' => true,
'headers' => array(
'Authorization' => "Bearer $token"
)
);
add_filter('https_ssl_verify', '__return_false');
$api_url = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=$username&count=$numoftweets&exclude_replies=$exclude_replies&include_rts=$include_rts";
$response = wp_remote_get( $api_url, $args );
if(!is_wp_error($response) and $response <> ""){
$tweets = json_decode($response['body']);
$return .= "<div class='twitter_sign webkit'>
<div class='tweets-wrapper'>
";
foreach($tweets as $i => $tweet) {
$text = $tweet->{'text'};
foreach($tweet->{'entities'} as $type => $entity) {
if($type == 'urls') {
foreach($entity as $j => $url) {
$update_with = '<a href="' . $url->{'url'} . '" target="_blank" title="' . $url->{'expanded_url'} . '">' . $url->{'display_url'} . '</a>';
$text = str_replace($url->{'url'}, $update_with, $text);
}
} else if($type == 'hashtags') {
foreach($entity as $j => $hashtag) {
$update_with = '<a href="https://twitter.com/search?q=%23' . $hashtag->{'text'} . '&src=hash" target="_blank" title="' . $hashtag->{'text'} . '">#' . $hashtag->{'text'} . '</a>';
$text = str_replace('#'.$hashtag->{'text'}, $update_with, $text);
}
} else if($type == 'user_mentions') {
foreach($entity as $j => $user) {
$update_with = '<a href="https://twitter.com/' . $user->{'screen_name'} . '" target="_blank" title="' . $user->{'name'} . '">@' . $user->{'screen_name'} . '</a>';
$text = str_replace('@'.$user->{'screen_name'}, $update_with, $text);
}
}
}
$large_ts = time();
$n = $large_ts - strtotime($tweet->{'created_at'});
if($n < (60)){ $posted = sprintf(__('%d seconds ago','Perspective'),$n); }
elseif($n < (60*60)) { $minutes = round($n/60); $posted = sprintf(_n('About a Minute Ago','%d Minutes Ago',$minutes,'Perspective'),$minutes); }
elseif($n < (60*60*16)) { $hours = round($n/(60*60)); $posted = sprintf(_n('About an Hour Ago','%d Hours Ago',$hours,'Perspective'),$hours); }
elseif($n < (60*60*24)) { $hours = round($n/(60*60)); $posted = sprintf(_n('About an Hour Ago','%d Hours Ago',$hours,'Perspective'),$hours); }
elseif($n < (60*60*24*6.5)) { $days = round($n/(60*60*24)); $posted = sprintf(_n('About a Day Ago','%d Days Ago',$days,'Perspective'),$days); }
elseif($n < (60*60*24*7*3.5)) { $weeks = round($n/(60*60*24*7)); $posted = sprintf(_n('About a Week Ago','%d Weeks Ago',$weeks,'Perspective'),$weeks); }
elseif($n < (60*60*24*7*4*11.5)) { $months = round($n/(60*60*24*7*4)) ; $posted = sprintf(_n('About a Month Ago','%d Months Ago',$months,'Perspective'),$months);}
elseif($n >= (60*60*24*7*4*12)){$years=round($n/(60*60*24*7*52)) ; $posted = sprintf(_n('About a year Ago','%d years Ago',$years,'Perspective'),$years);}
$user = $tweet->{'user'};
$return .="<div id='tweet-1' class='tweet webkit'>";
$return .= "<h6 class='heading-color'>" . $text . "</h6>";
$return .= "<p><a class='hour colrhover'>" . $posted. "</a></p>";
$return .="</div>";
}
$return .= "</div><i class='icon-twitter icon-2x'></i><a href='http://twitter.com/".$username."' class='colr follow-me'>".$cs_theme_option['trans_follow_twitter']."</a><div class='clear'></div></div>";
echo $return;
}
}else{
if($response <> ""){
echo $response->errors['http_failure'][0];
}else{
_e( 'No results found.', 'Perspective' );
}
}
}else{
//echo '<h4>No User information given.</h4>';
}
echo $after_widget;
// WIDGET display CODE End
}
}
add_action('widgets_init', create_function('', 'return register_widget("cs_twitter_widget");'));
// widget_twitter end
// widget end
// widget_recent_post start
class cs_reviews extends WP_Widget
{
function cs_reviews()
{
$widget_ops = array('classname' => 'widget_latest_reviews', 'description' => 'Recent Reviews from Selected Category.' );
$this->WP_Widget('cs_reviews', 'CS : Reviews', $widget_ops);
}
function form($instance)
{
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );
$title = $instance['title'];
$select_category = isset( $instance['select_category'] ) ? esc_attr( $instance['select_category'] ) : '';
$showcount = isset( $instance['showcount'] ) ? esc_attr( $instance['showcount'] ) : '';
$thumb = isset( $instance['thumb'] ) ? esc_attr( $instance['thumb'] ) : '';
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">
Title:
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size="40" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('select_category'); ?>">
Select Category:
<?php
wp_dropdown_categories( array( 'taxonomy' => 'review-category', 'name' => $this->get_field_name('select_category'), 'show_count' => '1', 'hierarchical'=> '1', 'selected' => $this->get_field_id('select_category')));
?>
<!-- <select id="<?php echo $this->get_field_id('select_category'); ?>" name="<?php echo $this->get_field_name('select_category'); ?>" style="width:225px">
<?php
$categories = get_categories();
if($categories <> ""){
foreach ( $categories as $category ) {?>
<option <?php if($select_category == $category->slug){echo 'selected';}?> value="<?php echo $category->slug;?>" ><?php echo $category->name;?></option>
<?php }?>
<?php }?>
</select>-->
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showcount'); ?>">
Number of Posts To Display:
<input class="upcoming" id="<?php echo $this->get_field_id('showcount'); ?>" size='2' name="<?php echo $this->get_field_name('showcount'); ?>" type="text" value="<?php echo esc_attr($showcount); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('thumb'); ?>">
Display Thumbinals:
<input class="upcoming" id="<?php echo $this->get_field_id('thumb'); ?>" size='2' name="<?php echo $this->get_field_name('thumb'); ?>" value="true" type="checkbox" <?php if(isset($instance['thumb']) ) echo 'checked="checked"'; ?> />
</label>
</p>
<?php
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['select_category'] = $new_instance['select_category'];
$instance['showcount'] = $new_instance['showcount'];
$instance['thumb'] = $new_instance['thumb'];
return $instance;
}
function widget($args, $instance)
{
global $node;
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$select_category = empty($instance['select_category']) ? ' ' : apply_filters('widget_title', $instance['select_category']);
$showcount = empty($instance['showcount']) ? ' ' : apply_filters('widget_title', $instance['showcount']);
$thumb = isset( $instance['thumb'] ) ? esc_attr( $instance['thumb'] ) : '';
if($instance['showcount'] == ""){$instance['showcount'] = '-1';}
echo $before_widget;
// WIDGET display CODE Start
if (!empty($title))
echo $before_title;
echo $title;
echo $after_title;
global $wpdb, $post;?>
<!-- Recent Posts Start -->
<?php
wp_reset_query();
$argms = array(
'posts_per_page' => "-1",
'post_type' => 'reviews',
'cat_id' => "$select_category",
'post_status' => 'publish',
'order' => 'ASC',
);
$custom_query = new WP_Query($argms);
$post_count = $custom_query->post_count;
$args = array( 'posts_per_page' => "$showcount",'post_type' => 'reviews','cat_id' => "$select_category", 'post_status' => 'publish', 'order' => 'DESC',);
$custom_query = new WP_Query($args);
if ( $custom_query->have_posts() <> "" ) {
while ( $custom_query->have_posts()) : $custom_query->the_post();
$post_xml = get_post_meta($post->ID, "cs_review", true);
if ( $post_xml <> "" ) {
$xmlObject = new SimpleXMLElement($post_xml);
$review_social = $xmlObject->review_social;
}
else {
$review_social = '';
}
$image_id = cs_get_post_img($post->ID, 70, 70);
?>
<!-- Upcoming Widget Start -->
<article <?php if( !isset($image_id) || empty($image_id) || $thumb <> "true"){ echo 'class="no-img"';}?>>
<?php if($thumb == "true"){
if(isset($image_id) && !empty($image_id)){
?>
<figure>
<a href="<?php the_permalink(); ?>"><?php echo $image_id;?></a>
<figcaption class="webkit">
<a class="linkme" href="<?php the_permalink();?>"></a>
</figcaption>
</figure>
<?php }}?>
<div class="text">
<h5><a href="<?php the_permalink();?>" class="colrhover"><?php echo substr(get_the_title(),0,44); if ( strlen(get_the_title()) > 44) echo "..."; ?></a></h5>
<?php
$rating_value = get_post_meta($post->ID, "rating_value", true);
if($rating_value == ''){
$rating_value = 8;
}
?>
<div class="reviews">
<span class="stars-large">
<span style="width:<?php cs_user_rating(); ?>%"></span>
</span>
<p>
<?php
if ( get_post_meta(get_the_id(), "rating_vote_counter", true) > 0 ) {
$rating_vote_counter = get_post_meta(get_the_id(), "rating_vote_counter", true);
}
else {
$rating_vote_counter = 0;
}
echo "" . $rating_vote_counter . " Reviews";
?>
</p>
</div>
</div>
</article>
<?php endwhile; ?>
<?php
}
else {
echo '<h4>'.__( 'No results found.', 'Perspective' ).'</h4>';
}?>
<!-- Recent Posts End -->
<?php
echo $after_widget;
}
}
add_action( 'widgets_init', create_function('', 'return register_widget("cs_reviews");') );
// widget_reviews end
// Event Widget
class cs_upcoming_events extends WP_Widget
{
function cs_upcoming_events()
{
$widget_ops = array('classname' => 'upcoming_event', 'description' => 'Select Event to show its countdown.' );
$this->WP_Widget('cs_upcoming_events', 'CS : Upcoming Events', $widget_ops);
}
function form($instance)
{
$instance = wp_parse_args( (array) $instance, array( 'title' => '' ,'widget_names_events' =>'new') );
$title = $instance['title'];
$get_post_slug = isset( $instance['get_post_slug'] ) ? esc_attr( $instance['get_post_slug'] ) : '';
$showcount = isset( $instance['showcount'] ) ? esc_attr( $instance['showcount'] ) : '';
?>
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">
Title:
<input class="upcoming" id="<?php echo $this->get_field_id('title'); ?>" size="40" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" />
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('get_post_slug'); ?>">
Select Event:
<select id="<?php echo $this->get_field_id('get_post_slug'); ?>" name="<?php echo $this->get_field_name('get_post_slug'); ?>" style="width:225px">
<option value=""> Select Category</option>
<?php
global $wpdb,$post;
$categories = get_categories('taxonomy=event-category&child_of=0&hide_empty=0');
if($categories != ''){}
foreach ( $categories as $category){ ?>
<option <?php if(esc_attr($get_post_slug) == $category->slug){echo 'selected';}?> value="<?php echo $category->slug;?>" >
<?php echo substr($category->name, 0, 20); if ( strlen($category->name) > 20 ) echo "...";?>
</option>
<?php }?>
</select>
</label>
</p>
<p>
<label for="<?php echo $this->get_field_id('showcount'); ?>">
Number of Events:
<input class="upcoming" id="<?php echo $this->get_field_id('showcount'); ?>" size="2" name="<?php echo $this->get_field_name('showcount'); ?>" type="text" value="<?php echo esc_attr($showcount); ?>" />
</label>
</p>
<?php
}
function update($new_instance, $old_instance)
{
$instance = $old_instance;
$instance['title'] = $new_instance['title'];
$instance['get_post_slug'] = $new_instance['get_post_slug'];
$instance['showcount'] = $new_instance['showcount'];
return $instance;
}
function widget($args, $instance)
{
extract($args, EXTR_SKIP);
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
$get_post_slug = isset( $instance['get_post_slug'] ) ? esc_attr( $instance['get_post_slug'] ) : '';
$showcount = isset( $instance['showcount'] ) ? esc_attr( $instance['showcount'] ) : '';
if(empty($showcount)){$showcount = '4';}
// WIDGET display CODE Start
echo $before_widget;
wp_reset_query();
if (!empty($title))
echo $before_title . $title . $after_title;
global $wpdb, $post;
//$term = get_term( $get_names_events, 'event-category' );
if($get_post_slug <> ''){
$newterm = get_term_by('slug', $get_post_slug, 'event-category');
$args = array(
'posts_per_page' => $showcount,
'post_type' => 'events',
'event-category' => "$get_post_slug",
'post_status' => 'publish',
'meta_key' => 'cs_event_from_date',
'meta_value' => date('Y-m-d'),
'meta_compare' => ">=",
'orderby' => 'meta_value',
'order' => 'ASC'
);
$custom_query = new WP_Query($args);
if ( $custom_query->have_posts() <> "" ) {
$counter_events = 0;
while ( $custom_query->have_posts() ): $custom_query->the_post();
$counter_events++;
$cs_event_from_date = get_post_meta($post->ID, "cs_event_from_date", true);
$year_event = date("Y", strtotime($cs_event_from_date));
$month_event = date("M", strtotime($cs_event_from_date));
$day_event = date("d", strtotime($cs_event_from_date));
$cs_event_meta = get_post_meta($post->ID, "cs_event_meta", true);
if ( $cs_event_meta <> "" ) {
$cs_event_meta = new SimpleXMLElement($cs_event_meta);
$event_start_time = $cs_event_meta->event_start_time;
}
$cs_event_loc = get_post_meta($cs_event_meta->event_address, "cs_event_loc_meta", true);
if ( $cs_event_loc <> "" ) {
$xmlObject = new SimpleXMLElement($cs_event_loc);
$loc_address = $xmlObject->loc_address;
}else{
$loc_address = '';
}
?>
<!-- Events Widget Start -->
<article>
<!-- Date Start -->
<div class="date webkit">
<h2><?php echo $day_event;?></h2>
<span class="uppercase"><?php echo $month_event; ?></span>
</div>
<!-- Date End -->
<!-- Text Start -->
<div class="text">
<h6><a href="<?php echo get_permalink()?>" class="colrhover"><?php echo substr(get_the_title(), 0, 60); if ( strlen(get_the_title()) > 60) echo "...";?></a></h6>
<time datetime="<?php echo date('Y-m-d',strtotime(get_the_date()));?>"><i class="icon-time"></i>
<?php
if ( $xmlObject->event_all_day == "" ) {
echo date(get_option("time_format"), strtotime($event_start_time));
}
else {
if($cs_theme_option['trans_switcher']== "on"){ echo _e('All Day','Perspective');}else{ echo $cs_theme_option['trans_all_day']; }
}
?>,</time>
<?php if($loc_address <> '') { ?>
<a href="<?php echo get_permalink()?>" class="loc colrhover"><i class="icon-map-marker"></i><?php echo $loc_address;?></a>
<?php } ?>
</div>
<!-- Text End -->
</article>
<!-- Events Widget End -->
<?php endwhile;?>
<?php }else{
echo '<h3 class="heading-color">';_e( 'No results found.', 'Perspective' ); echo '</h3>';
}
} // endif of Category Selection
echo $after_widget; // WIDGET display CODE End
}
}
add_action( 'widgets_init', create_function('', 'return register_widget("cs_upcoming_events");') );
// Event widgt End
/**
* Archives widget class
*/
class chimp_Widget_Archives extends WP_Widget {
function chimp_Widget_Archives() {
$widget_ops = array('classname' => 'widget_archive', 'description' =>'A monthly archive Widget');
$this->WP_Widget('chimp_archives', 'Archives', $widget_ops);
}
function widget($args, $instance) {
global $wpdb, $wp_locale;
$output = $selectbox = '';
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? 'Archives' : $instance['title']);
$count = $instance['count'];
$dropdown = $instance['dropdown'];
echo $before_widget;
if ($title)
echo $before_title . $title . $after_title;
$post_types = array('post', 'reviews', 'events','portfolio');
//
$where = apply_filters('getarchives_where', "WHERE (post_type='post'|| post_type='reviews' || post_type='events' || post_type = 'portfolio') AND post_status = 'publish'", '');
$join = apply_filters('getarchives_join', "", '');
$query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC";
$key = md5($query);
$cache = wp_cache_get('wp_get_archives', 'general');
if (!isset($cache[$key])) {
$arcresults = $wpdb->get_results($query);
$cache[$key] = $arcresults;
wp_cache_add('wp_get_archives', $cache, 'general');
} else {
$arcresults = $cache[$key];
}
if ($arcresults) {
//$afterafter = $after;
foreach ((array) $arcresults as $arcresult) {
$url = get_month_link($arcresult->year, $arcresult->month);
$text = sprintf(__('%1$s %2$d','Perspective'), $wp_locale->get_month($arcresult->month), $arcresult->year);
if (isset($count) && $count <> '')
$text .= ' (' . $arcresult->posts . ')';
$output .= get_archives_link($url, $text, '', '<li>', '</li>');
if (isset($dropdown) && $dropdown <> '') {
$selectbox.='<option value="' . $url . '">' . $text . '</option>';
}
}
}
if (isset($dropdown) && $dropdown <> '') {
?>
<ul>
<li>
<select name="archive-dropdown" onchange='document.location.href = this.options[this.selectedIndex].value;'>
<option value=""><?php echo _e('Select Month',CSDOMAIN); ?></option>
<?php echo $selectbox; ?>
</select>
</li>
</ul>
<?php
} else {
echo '<ul>' . $output . '</ul>';
}
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance = $old_instance;
$new_instance = wp_parse_args((array) $new_instance, array('title' => '', 'count' => 0, 'dropdown' => ''));
$instance['title'] = strip_tags($new_instance['title']);
$instance['count'] = $new_instance['count'] ? 1 : 0;
$instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0;
return $instance;
}
function form($instance) {
$instance = wp_parse_args((array) $instance, array('title' => '', 'count' => 0, 'dropdown' => ''));
$title = strip_tags($instance['title']);
$count = $instance['count'] ? 'checked="checked"' : '';
$dropdown = $instance['dropdown'] ? 'checked="checked"' : '';
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>">Title:</label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>
<p>
<input class="checkbox" type="checkbox" <?php echo $count; ?> id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" /> <label for="<?php echo $this->get_field_id('count'); ?>">Show post counts</label>
<br />
<input class="checkbox" type="checkbox" <?php echo $dropdown; ?> id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>" /> <label for="<?php echo $this->get_field_id('dropdown'); ?>">Display as a drop down</label>
</p>
<?php
}
}
function chimp_widget_init() {
// unregister some default widgets
unregister_widget('WP_Widget_Archives');
// register my own widgets
register_widget('chimp_Widget_Archives');
}
add_action('widgets_init', 'chimp_widget_init');
$args = array(
'default-color' => '',
'default-image' => '',
);
add_theme_support('custom-background', $args);
add_theme_support('custom-header', $args);
// This theme styles the visual editor with editor-style.css to match the theme style.
add_editor_style();
// This theme uses post thumbnails
add_theme_support('post-thumbnails');
// Add default posts and comments RSS feed links to head
add_theme_support('automatic-feed-links');
// Make theme available for translation
// Translations can be filed in the /languages/ directory
load_theme_textdomain('Perspective', get_template_directory() . '/languages');
if (!isset($content_width)) $content_width = 1170;
?>