'949494', 'width' => 1600, 'height' => 230, 'wp-head-callback' => 'ad_agency_lite_header_style', 'default-text-color' => false, 'header-text' => false, ) ) ); } add_action( 'after_setup_theme', 'ad_agency_lite_custom_header_setup' ); if ( ! function_exists( 'ad_agency_lite_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see ad_agency_lite_custom_header_setup(). */ function ad_agency_lite_header_style() { ?>

label ); ?>

get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->add_setting('color_scheme',array( 'default' => '#523ccf', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => esc_html__('Color Scheme','ad-agency-lite'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); $wp_customize->add_setting('header_bg_color',array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'header_bg_color',array( 'label' => esc_html__('Header Background Color','ad-agency-lite'), 'section' => 'colors', 'settings' => 'header_bg_color' )) ); $wp_customize->add_setting('footer_text_color',array( 'default' => '#2d2d2d', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'footer_text_color',array( 'label' => esc_html__('Copyright Text Color','ad-agency-lite'), 'section' => 'colors', 'settings' => 'footer_text_color' )) ); $wp_customize->add_section('header_button',array( 'title' => esc_html__('Header Button','ad-agency-lite'), 'priority' => null )); $wp_customize->add_setting('header_btntext',array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('header_btntext',array( 'label' => esc_html__('Button Text','ad-agency-lite'), 'section' => 'header_button', 'setting' => 'header_btntext' )); $wp_customize->add_setting('header_btn_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('header_btn_link',array( 'label' => esc_html__('Button Link','ad-agency-lite'), 'section' => 'header_button', 'setting' => 'header_btn_link' )); // Hide Header Button $wp_customize->add_setting('hide_header_btn',array( 'sanitize_callback' => 'ad_agency_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_header_btn', array( 'section' => 'header_button', 'label' => esc_html__('Uncheck To Show Button In Header','ad-agency-lite'), 'type' => 'checkbox' )); // Hide Header Button // Inner Page Banner Settings $wp_customize->add_section('inner_page_banner',array( 'title' => esc_html__('Page Banner Settings','ad-agency-lite'), 'priority' => null )); $wp_customize->add_setting('inner_page_banner_thumb',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'inner_page_banner_thumb', array( 'section' => 'inner_page_banner', 'label' => esc_html__('Upload Default Banner Image','ad-agency-lite'), 'settings' => 'inner_page_banner_thumb', 'button_labels' => array(// All These labels are optional 'select' => 'Select Image', 'remove' => 'Remove Image', 'change' => 'Change Image', ) ))); $wp_customize->add_setting('inner_page_banner_option',array( 'sanitize_callback' => 'ad_agency_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'inner_page_banner_option', array( 'section' => 'inner_page_banner', 'label' => esc_html__('Uncheck To Show Page Banner On All Pages. For Display Different Banner Image On Each Page Set Page Featured Image. Set Image Size (1400 X 310) For Better Resolution.','ad-agency-lite'), 'type' => 'checkbox' )); // Inner Page Banner Settings // Inner Post Banner Settings $wp_customize->add_section('inner_post_banner',array( 'title' => esc_html__('Category / Archive And Single Post Banner Settings','ad-agency-lite'), 'priority' => null )); $wp_customize->add_setting('inner_post_banner_thumb',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'inner_post_banner_thumb', array( 'section' => 'inner_post_banner', 'label' => esc_html__('Upload Default Banner Image','ad-agency-lite'), 'settings' => 'inner_post_banner_thumb', 'button_labels' => array(// All These labels are optional 'select' => 'Select Image', 'remove' => 'Remove Image', 'change' => 'Change Image', ) ))); $wp_customize->add_setting('inner_post_banner_option',array( 'sanitize_callback' => 'ad_agency_lite_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'inner_post_banner_option', array( 'section' => 'inner_post_banner', 'label' => esc_html__('Uncheck To Show Inner Post Banner On Category / Archive And Single Post. For Display Different Banner Image On Each Post Set Post Featured Image. Set Image Size (1400 X 310) For Better Resolution.','ad-agency-lite'), 'type' => 'checkbox' )); // Inner Page Banner Settings $wp_customize->add_section('footer_text_copyright',array( 'title' => esc_html__('Footer Copyright Text','ad-agency-lite'), 'priority' => null )); $wp_customize->add_setting('footer_text',array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('footer_text',array( 'label' => esc_html__('Add Copyright Text Here','ad-agency-lite'), 'section' => 'footer_text_copyright', 'setting' => 'footer_text' )); } add_action( 'customize_register', 'ad_agency_lite_customize_register' ); //Integer function ad_agency_lite_sanitize_integer( $input ) { if( is_numeric( $input ) ) { return intval( $input ); } } function ad_agency_lite_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } //setting inline css. function ad_agency_lite_custom_css() { wp_enqueue_style( 'ad-agency-lite-custom-style', get_stylesheet_directory_uri() . '/css/ad-agency-lite-custom-style.css' ); $color = esc_html(get_theme_mod( 'color_scheme' )); $headerbgcolor = esc_html(get_theme_mod( 'header_bg_color' )); $footertextcolor = esc_html(get_theme_mod( 'footer_text_color' )); $header_trans = esc_html(get_theme_mod('option_header_transparent', 1)); $header_trans_inner = esc_html(get_theme_mod('option_inner_header_transparent', 1)); $custom_css = " #sidebar ul li a:hover, .blog_lists h4 a:hover, .recent-post h6 a:hover, .recent-post a:hover, .design-by a, .postmeta a:hover, .tagcloud a, .blocksbox:hover h3, .rdmore a, .main-navigation ul li:hover a, .main-navigation ul li a:focus, .main-navigation ul li a:hover, .main-navigation ul li.current-menu-item a, .main-navigation ul li.current_page_item a, .copyright-txt a:hover, #footermenu li.current-menu-item a, #footermenu li.current_page_item a, .header-phone-number, #sidebar li a:hover, .main-navigation ul li ul li a { color: {$color} !important; } .pagination .nav-links span.current, .pagination .nav-links a:hover, #commentform input#submit:hover, .wpcf7 input[type='submit'], input.search-submit, .recent-post .morebtn:hover, .read-more-btn, .woocommerce-product-search button[type='submit'], .head-info-area, .designs-thumb, .hometwo-block-button, .aboutmore, .service-thumb-box, .view-all-btn a:hover, .social-icons a:hover, .skt-header-quote-btn a:hover, .custom-cart-count { background-color: {$color} !important; } .titleborder span:after, .sticky{border-bottom-color: {$color} !important;} .header{background-color:{$headerbgcolor} !important;} .copyright-txt{color: {$footertextcolor} !important;} .main-navigation ul ul li a:hover, .main-navigation ul ul li a:focus {background-color: {$color} !important;} "; wp_add_inline_style( 'ad-agency-lite-custom-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'ad_agency_lite_custom_css' );