'image', 'color' => '#6F9C50', 'gradient_type' => 'linear', 'gradient_angle' => '90', 'gradient_start' => '#6F9C50', 'gradient_end' => '#568F0C', 'image' => get_template_directory_uri() . '/assets/images/accepta-hero-bg.jpg', 'size' => 'cover', 'repeat' => 'no-repeat', 'position' => 'center', 'attachment' => 'parallax', 'overlay_enabled' => true, 'overlay_color' => '#6F9C50', 'overlay_opacity' => '0.2', 'video_type' => 'youtube', 'video_url' => '', 'video_mp4' => '', 'video_autoplay' => true, 'video_loop' => true, 'video_muted' => true, 'video_controls' => false, ); } // Extract background values $bg_type = isset( $hero_bg['type'] ) ? $hero_bg['type'] : 'solid'; $bg_color = isset( $hero_bg['color'] ) ? $hero_bg['color'] : '#6F9C50'; $bg_gradient = isset( $hero_bg['gradient_type'] ) ? $hero_bg : null; $bg_image = isset( $hero_bg['image'] ) ? $hero_bg['image'] : ''; $bg_video_type = isset( $hero_bg['video_type'] ) ? $hero_bg['video_type'] : 'youtube'; $bg_video_url = isset( $hero_bg['video_url'] ) ? $hero_bg['video_url'] : ''; $bg_video_mp4 = isset( $hero_bg['video_mp4'] ) ? $hero_bg['video_mp4'] : ''; $bg_video_autoplay = isset( $hero_bg['video_autoplay'] ) ? (bool) $hero_bg['video_autoplay'] : true; $bg_video_loop = isset( $hero_bg['video_loop'] ) ? (bool) $hero_bg['video_loop'] : true; $bg_video_muted = isset( $hero_bg['video_muted'] ) ? (bool) $hero_bg['video_muted'] : true; $bg_video_controls = isset( $hero_bg['video_controls'] ) ? (bool) $hero_bg['video_controls'] : false; $bg_overlay_enabled = isset( $hero_bg['overlay_enabled'] ) ? (bool) $hero_bg['overlay_enabled'] : false; $bg_overlay_color = isset( $hero_bg['overlay_color'] ) ? $hero_bg['overlay_color'] : '#6F9C50'; $bg_overlay_opacity = isset( $hero_bg['overlay_opacity'] ) ? floatval( $hero_bg['overlay_opacity'] ) : 0.2; $bg_attachment = isset( $hero_bg['attachment'] ) ? $hero_bg['attachment'] : 'scroll'; $bg_size = isset( $hero_bg['size'] ) ? $hero_bg['size'] : 'cover'; $bg_position = isset( $hero_bg['position'] ) ? $hero_bg['position'] : 'center'; $use_parallax = ( $bg_type === 'image' && ! empty( $bg_image ) && $bg_attachment === 'parallax' ); $hero_heading = get_theme_mod( 'accepta_hero_heading', 'Build Bold! Build Beautiful!' ); $hero_text = get_theme_mod( 'accepta_hero_text', 'Accepta is a modern WordPress theme built to stand out: fullscreen hero, smooth parallax backgrounds,
and an overlay header that appears as you scroll. Change layout, colors, and fonts in the Customizer—no coding required.' ); $hero_button_text = get_theme_mod( 'accepta_hero_button_text', 'Check Now' ); $hero_button_url = get_theme_mod( 'accepta_hero_button_url', 'https://wpdino.com' ); $hero_button_style = get_theme_mod( 'accepta_hero_button_style', 'outline' ); $hero_heading_color = get_theme_mod( 'accepta_hero_heading_color', '#ffffff' ); $hero_heading_size = get_theme_mod( 'accepta_hero_heading_size', 48 ); $hero_text_color = get_theme_mod( 'accepta_hero_text_color', '#ffffff' ); $hero_text_size = get_theme_mod( 'accepta_hero_text_size', 18 ); // Get width setting $hero_width = get_theme_mod( 'accepta_hero_width', 'fullwidth' ); // Calculate width class $width_class = ''; if ( $hero_width === 'fullwidth' ) { $width_class = 'accepta-hero-fullwidth'; } else { $width_class = 'accepta-hero-boxed'; } // Calculate height class $height_class = ''; if ( $hero_height === 'fullscreen' ) { $height_class = 'accepta-hero-fullscreen'; } elseif ( $hero_height === 'min-height' ) { $height_class = 'accepta-hero-min-height'; } else { $height_class = 'accepta-hero-custom-height'; } // Build overlay style (overlay opacity is stored as 0-1, not 0-100) $overlay_style = ''; if ( $bg_overlay_enabled ) { $overlay_rgba = accepta_hex_to_rgba( $bg_overlay_color, $bg_overlay_opacity ); $overlay_style = 'background-color: ' . esc_attr( $overlay_rgba ) . ';'; } ?>