get( 'Version' ) ); } /*------------------------- Google Fonts --------------------------------------*/ if ( ! function_exists( 'articlewave_blogup_fonts_url' ) ) : /** * Register Google fonts * * @return string Google fonts URL for the theme. */ function articlewave_blogup_fonts_url() { $fonts_url = ''; $font_families = array(); /* * Translators: If there are characters in your language that are not supported * by Arvo, translate this to 'off'. Do not translate into your own language. */ if ( 'off' !== _x( 'on', 'Be Vietnam Pro font: on or off', 'articlewave-blog' ) ) { $font_families[] = 'Be Vietnam Pro:400,700,900'; } if( $font_families ) { $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return $fonts_url; } endif; /*------------------------- Enqueue scripts -----------------------------------*/ add_action( 'wp_enqueue_scripts', 'articlewave_blogup_scripts', 99 ); if ( ! function_exists( 'articlewave_blogup_scripts' ) ) : /** * function to load style and scripts for theme. * */ function articlewave_blogup_scripts() { wp_enqueue_style( 'articlewave-blogup-google-font', articlewave_blogup_fonts_url(), array(), null ); wp_dequeue_style( 'articlewave-style' ); wp_dequeue_style( 'articlewave-responsive-style' ); wp_enqueue_style( 'articlewave-blogup-parent-style', get_template_directory_uri() . '/style.css', array(), ARTICLEWAVE_BLOGUP_VERSION ); wp_enqueue_style( 'articlewave-blogup-parent-responsive', get_template_directory_uri() . '/assets/css/articlewave-responsive.css', array(), ARTICLEWAVE_BLOGUP_VERSION ); wp_enqueue_style( 'articlewave-blogup-style', get_stylesheet_uri(), array(), ARTICLEWAVE_BLOGUP_VERSION ); } endif; /*------------------------- BODY CLASS ------------------------------------------------*/ function articlewave_blogup_body_classes( $classes ) { $articlewave_enable_tabbed_title = get_theme_mod( 'articlewave_enable_tabbed_title', true ); $articlewave_enable_tabbed_recent = get_theme_mod( 'articlewave_enable_tabbed_recent', true ); $articlewave_enable_slider = get_theme_mod( 'articlewave_enable_slider' , true); if ( $articlewave_enable_tabbed_title == false && $articlewave_enable_tabbed_recent == false && $articlewave_enable_slider == false ) { $classes[] = 'articlewave-blogup-slider-banner-disable'; } elseif ( $articlewave_enable_tabbed_title == false && $articlewave_enable_tabbed_recent == false ) { $classes[] = 'articlewave-blogup-tab-disable'; } elseif ( $articlewave_enable_slider == false ) { $classes[] = 'articlewave-blogup-slider-disable'; } return $classes; } add_filter( 'body_class', 'articlewave_blogup_body_classes' ); /*------------------------- Controls --------------------------------------------*/ add_action( 'customize_register', 'articlewave_blogup_customize_register', 20 ); function articlewave_blogup_customize_register( $wp_customize ) { /** * Enable the bavkground animation for site * */ $wp_customize->get_setting( 'articlewave_primary_theme_color' )->default = '#d85c0f'; $wp_customize->get_setting( 'articlewave_link_hover_color' )->default = '#d85c0f'; $wp_customize->get_setting( 'articlewave_link_color' )->default = '#d85c0f'; $wp_customize->get_setting( 'background_color' )->default = '#fff'; $wp_customize->add_section( 'articlewave_section_bg_animation', array( 'priority' => 10, 'panel' => 'articlewave_general_setting', 'title' => __( 'Background Animation', 'articlewave-blogup' ) ) ); $wp_customize->add_setting( 'articlewave_blogup_bg_animation_option', array( 'capability' => 'edit_theme_options', 'default' => false, 'sanitize_callback' => 'articlewave_sanitize_checkbox' ) ); $wp_customize->add_control( new ArticleWave_Control_Toggle( $wp_customize, 'articlewave_blogup_bg_animation_option', array( 'label' => __( 'Enable Background Animation', 'articlewave-blogup' ), 'section' => 'articlewave_section_bg_animation', 'settings' => 'articlewave_blogup_bg_animation_option', 'priority' => 60, ) ) ); } /*------------------------- Dynamic CSS ------------------------------------------------*/ /** * function to handle the general css. * * @since 1.0.0 */ if ( ! function_exists( 'articlewave_blogup_general_css' ) ) : /** * function to handle the genral css for all sections. * * @since 1.0.0 */ function articlewave_blogup_general_css( $output_css ) { $custom_css = ''; $primary_color = get_theme_mod( 'articlewave_primary_theme_color', '#d85c0f' ) ; $articlewave_blogup_link_hover_color = get_theme_mod( 'articlewave_link_hover_color', '#d85c0f' ); $articlewave_blogup_link_color = get_theme_mod( 'articlewave_link_color', '#d85c0f' ); //Primary theme color $custom_css = " .no-results input[type='submit'], input[type='submit'], .button-back-home,.tabbed-section-wrapper .tab-button:hover, .tabbed-section-wrapper .tab-button.isActive, #site-navigation ul li:hover>a, #site-navigation ul li.current-menu-item>a, #site-navigation ul li.current_page_item>a, #site-navigation ul li.current-menu-ancestor>a, #site-navigation ul li.focus>a, .articlewave-wave .aw-rect , .articlewave-three-bounce .aw-child, .articlewave-folding-cube .aw-cube:before, .button-back-home,.navigation .nav-links a.page-numbers:hover, .navigation .nav-links .page-numbers.current, .articlewave-scrollup,.articlewave-blogup-circles li {background-color: ". esc_attr( $primary_color ) ."}\n"; // Hover Color $custom_css .= ".articlewave-button.read-more-button a:hover, .widget a:hover, .widget a:hover::before, .widget li:hover::before, .site-info .widget a:hover, .author-name:hover, a:hover, a:focus, a:active, entry-title:hover, .entry-title a:hover, .articlewave-content-wrapper .nav-previous .nav-title:hover, .articlewave-content-wrapper .nav-next .nav-title:hover, .author-nicename a:hover,.entry-cat .cat-links a:hover,.entry-cat a:hover,.byline:hover,.posted-on a:hover,.entry-meta span:hover::before{color: ". esc_attr( $articlewave_blogup_link_hover_color ) ."}\n"; // Link Color $custom_css .= ".author-website a {color: ". esc_attr( $articlewave_blogup_link_color ) ."}\n"; // Border Color $custom_css .= ".no-results input[type='submit'], input[type='submit'], .button-back-home,.tabbed-section-wrapper .tab-button:hover, .tabbed-section-wrapper .tab-button.isActive,.navigation .nav-links a.page-numbers:hover, .navigation .nav-links .page-numbers.current {border-color: ". esc_attr( $primary_color ) ."}\n"; if ( ! empty( $custom_css ) ) { $output_css .= $custom_css; } return $output_css; } endif; add_filter( 'articlewave_head_css', 'articlewave_blogup_general_css', 30 ); /*------------------------- Background Animation --------------------------------------------*/ if ( !function_exists ( 'articlewave_blogup_background_animation' ) ): /** * Footer Hook Handling * */ function articlewave_blogup_background_animation() { $background_animation = get_theme_mod( 'articlewave_blogup_bg_animation_option' , false ); if ( $background_animation == false ) { return; } echo '