$aasta_mod_v ) { set_theme_mod( $aasta_mod_k, $aasta_mod_v ); } } } add_action( 'after_switch_theme', 'aasta_light_parent_theme_options' ); /** * Fresh site activate * */ $fresh_site_activate = get_option( 'fresh_aasta_light_site_activate' ); if ( (bool) $fresh_site_activate === false ) { set_theme_mod( 'aasta_page_header_background_color', 'rgba(0,0,0,0.5)' ); set_theme_mod( 'aasta_testomonial_background_image', get_stylesheet_directory_uri().'/assets/img/theme-bg.jpg' ); set_theme_mod( 'aasta_theme_color_skin', 'theme-light' ); set_theme_mod( 'aasta_theme_color', 'theme-orange' ); update_option( 'fresh_aasta_light_site_activate', true ); } /** * Custom Theme Script */ function aasta_light_custom_theme_css() { $aasta_light_testomonial_background_image = get_theme_mod('aasta_testomonial_background_image'); ?> get_stylesheet_directory_uri().'/assets/img/aasta-light-page-header.jpg', 'default-text-color' => 'fff', 'width' => 1920, 'height' => 500, 'flex-height' => true, 'flex-width' => true, 'wp-head-callback' => 'aasta_light_header_style', ) ) ); } add_action( 'after_setup_theme', 'aasta_light_custom_header_setup' ); /** * Custom background * */ function aasta_light_custom_background_setup() { add_theme_support( 'custom-background', apply_filters( 'aasta_light_custom_background_args', array( 'default-color' => '202020', 'default-image' => '', ) ) ); } add_action( 'after_setup_theme', 'aasta_light_custom_background_setup' ); if ( ! function_exists( 'aasta_light_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see aasta_light_custom_header_setup(). */ function aasta_light_header_style() { $header_text_color = get_header_textcolor(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). */ if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?>