<?php
/**
* Register custom style.
*/
if ( ! function_exists( 'cyarb_custom_style' ) ) {
function cyarb_custom_style(){
$custom_style ='';
global $cyarb_opt;
$primary_color = isset( $cyarb_opt['primary_color']) ? $cyarb_opt['primary_color'] : '#ed1d61';
$nav_item_color = isset( $cyarb_opt['nav_item_color']) ? $cyarb_opt['nav_item_color'] : '#000000';
$nav_item_hover_color = isset( $cyarb_opt['nav_item_hover_color']) ? $cyarb_opt['nav_item_hover_color'] : '#ed1d61';
$sticky_nav_bg = isset( $cyarb_opt['sticky_nav_background']) ? $cyarb_opt['sticky_nav_background'] : '#ffffff';
$sticky_nav3_bg = isset( $cyarb_opt['sticky3_nav_background']) ? $cyarb_opt['sticky3_nav_background'] : '#000000';
$header_bg = isset( $cyarb_opt['header_bg']) ? $cyarb_opt['header_bg'] : '#ffffff';
$nav_button_gc1 = isset( $cyarb_opt['nav_button_gc1']) ? $cyarb_opt['nav_button_gc1'] : '#ED407E';
$nav_button_gc2 = isset( $cyarb_opt['nav_button_gc2']) ? $cyarb_opt['nav_button_gc2'] : '#8E42C9';
$nav_button_gc3 = isset( $cyarb_opt['nav_button_gc3']) ? $cyarb_opt['nav_button_gc3'] : '#5D7CE5';
$nav_button_hgc1 = isset( $cyarb_opt['nav_button_hgc1']) ? $cyarb_opt['nav_button_hgc1'] : '#6C42E4';
$nav_button_hgc2 = isset( $cyarb_opt['nav_button_hgc2']) ? $cyarb_opt['nav_button_hgc2'] : '#00B0EA';
$sticky_nav3_4_bg = isset( $cyarb_opt['sticky34_nav_background']) ? $cyarb_opt['sticky34_nav_background'] : '#1C0531';
$sticky_nav4_bg = isset( $cyarb_opt['stickyfour_nav_background']) ? $cyarb_opt['stickyfour_nav_background'] : '';
$custom_style .='
.wp-block-button .wp-block-button__link,.has-cyan-bluish-gray-background-color.has-cyan-bluish-gray-background-color, .page-links .current, .page-links .post-page-numbers:hover, .post-password-form input[type="submit"], .comment-navigation .nav-links .nav-previous a:hover, .comment-navigation .nav-links .nav-next a:hover, #comments .comment-list .comment-body .reply a:hover, .comment-respond .form-submit input, .pages-links .post-page-numbers.current, .pages-links .post-page-numbers:hover, .pages-links .post-page-numbers:focus, .single-footer-widget h3::before, .blog-sidebar .widget_search form button, .comments-title::before, .comment-respond .comment-reply-title::before, .search-form .search-submit, .widget-area .widget_categories ul li a::before { background-color: '.esc_attr($primary_color).'; }
.wp-block-file .wp-block-file__button, .wp-block-tag-cloud a:hover, .wp-block-tag-cloud a:focus, .wp-block-search button { background-color: '.esc_attr($primary_color).' !important; }
.sticky .post-content .title::before, .blog-details .blog-details-content code, .blog-details .blog-details-content ul a, .blog-details .blog-details-content .category li a:hover, .entry-meta li a:hover, .blog-details .blog-details-content ul.entry-meta li a:hover, #comments .comment-list .comment-body a, .wp-block-image figcaption a, .blog-details .blog-details-content p a, .blog-details .blog-details-content ol a, .wp-block-file a, table th a, .blog-details .blog-details-content kbd, .wp-caption .wp-caption-text a, .comments-area .comment-content code, .comments-area .comment-content kbd, table td a, table td a:hover, .blog-sidebar .widget ul li a:hover, .page-main-content .entry-content a, .page-main-content kbd, .page-main-content code, .learn-more-btn i, .learn-more-btn:hover, .single-blog-post .post-content .entry-meta li a:hover, .entry-meta li a:hover, .entry-meta li i, .wpcf7-list-item-label a, .sticky .learn-more-btn, a:hover, .pagination-area .page-numbers.current, .pagination-area .page-numbers:hover, .pagination-area .page-numbers:focus, .widget_cyarb_posts_thumbs .item .info .title a:hover, .widget-area .widget_tag_cloud .tagcloud a:hover, .blog-sidebar .tagcloud a:hover, .blog-sidebar .tagcloud a:focus, .single-blog-post .content .meta li a:hover, .single-footer-widget ul li a:hover, .sticky .post-content-two h3 a:hover, .copyright-area a:hover, .comment-respond .comment-reply-title #cancel-comment-reply-link, .single-resources-box .content .category a, .resources-box .content .category a, .blog-sidebar .wp-block-latest-comments .wp-block-latest-comments__comment-author:hover, .blog-sidebar .wp-block-latest-comments .wp-block-latest-comments__comment-link:hover, .copyright-area a { color: '.esc_attr ($primary_color).'; }
.sticky .post-content .entry-meta li a:hover, .is-style-outline .wp-block-button__link, .blog-details .blog-meta ul li a:hover, .blog-details .blog-meta ul li a:hover, table th a:hover { color: '.esc_attr ($primary_color).' !important; }
.widget-area .widget_tag_cloud .tagcloud a:hover, .blog-sidebar .tagcloud a:hover, .blog-sidebar .tagcloud a:focus { border-color: '.esc_attr( $primary_color ).'; }
.nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item a, .hospera-nav .navbar .others-options .cart-btn, .hospera-nav .navbar .others-options .option-item .search-btn, .navbar-brand h2, .cyard-nav .navbar .navbar-nav .nav-item a, .cyard-nav .navbar .navbar-nav .nav-item .dropdown-menu li a, .cyard-nav .navbar .others-option .option-item .search-cart li .search-icon, .cyard-nav .navbar .navbar-nav .nav-item .dropdown-toggle::before, .cyard-nav .navbar .others-option .option-item .social-links li a { color: '.esc_attr( $nav_item_color ).'; }
.nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item:hover a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item:focus a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item.dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:hover, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a:focus, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li a.active, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li .dropdown-menu li.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li .dropdown-menu li.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li .dropdown-menu li.active a, .nav-area .navbar-area .cyard-nav nav .navbar-nav .nav-item .dropdown-menu li.active a, .hospera-nav .navbar .others-options .cart-btn:hover, .hospera-nav .navbar .others-options .option-item .search-btn:hover, .hospera-nav .navbar .others-options .option-item .search-close-btn:hover, .search-overlay.search-popup .search-form .search-button:hover, .search-overlay.search-popup .search-form .search-button:focus, .hospera-responsive-nav .hospera-responsive-menu.mean-container .mean-nav ul li a.active, .hospera-responsive-nav .others-options .cart-btn:hover, .hospera-responsive-nav .others-options .option-item .search-btn:hover, .hospera-responsive-nav .others-options .option-item .search-close-btn:hover, .navbar-dark .cyard-nav nav .navbar-nav .nav-item a:hover, .cyard-nav .navbar .navbar-nav .nav-item:hover a, .cyard-nav .navbar .navbar-nav .nav-item.active a, .cyard-nav .navbar .navbar-nav .nav-item .dropdown-menu li.active a, .cyard-nav .navbar .navbar-nav .nav-item .dropdown-menu li a:hover, .cyard-nav .navbar .navbar-nav .nav-item:hover a::after, .cyard-nav .navbar .navbar-nav .nav-item:hover a::before, .cyard-nav .navbar .navbar-nav .nav-item.active a::after, .cyard-nav .navbar .navbar-nav .nav-item.active a::before, .cyard-nav .navbar .others-option .option-item .social-links li a:hover, .cyard-responsive-nav .cyard-responsive-menu.mean-container .mean-nav ul li.active a, .cyard-nav .navbar .others-option .option-item .search-cart li .search-icon:hover { color: '.esc_attr( $nav_item_hover_color ).'; }
.navbar-area { background-color: '.esc_attr ($header_bg ).'; }
.navbar-area.is-sticky { background-color: '.esc_attr($sticky_nav_bg ).' !important; }
.header-area.white-header .navbar-area.is-sticky { background-color: '.esc_attr($sticky_nav3_bg ).' !important; }
.navbar-area.cyard-new-navbar-area.is-sticky { background-color: '.esc_attr($sticky_nav3_4_bg ).' !important; }
.background-transparent-header .navbar-area.cyard-new-navbar-area.is-sticky { background-color: '.esc_attr($sticky_nav4_bg ).' !important; }
.navbar-area.cyard-new-navbar-area .cyard-nav .navbar .others-option .option-item .default-btn-two { background: linear-gradient(135.5deg, '.esc_attr($nav_button_gc1).' 1.15%, '.esc_attr($nav_button_gc2).' 50.99%, '.esc_attr($nav_button_gc3).' 99.15%);}
.navbar-area.cyard-new-navbar-area .cyard-nav .navbar .others-option .option-item .default-btn-two::before { background: linear-gradient(135deg, '.esc_attr($nav_button_hgc1).' 0%, '.esc_attr($nav_button_hgc2).' 100%);}
';
if( isset ($cyarb_opt['disable_sticky_header']) ):
if( $cyarb_opt['disable_sticky_header'] == true ):
$custom_style .='
.is-sticky {
display: none;
}
';
endif;
endif;
// Custom Css
if( isset($cyarb_opt['css_code'] ) && !empty($cyarb_opt['css_code']) ):
$custom_style .= $cyarb_opt['css_code'];
endif;
wp_add_inline_style('cyarb-main-style', $custom_style);
// Custom Js
$custom_script ='';
if( isset($cyarb_opt['js_code'] )){
$custom_script .= $cyarb_opt['js_code'];
}
wp_add_inline_style('cyarb-main', $custom_script);
}
}
add_action( 'wp_enqueue_scripts', 'cyarb_custom_style' );