<?php if( ! defined( 'ABSPATH' ) ) { die(); } /* * Please do not modify this file on your child theme to add scripts to Head section. * Refer to this post - https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-head-section and use functions.php file instead */ global $avia_config; $lightbox_option = avia_get_option( 'lightbox_active' ); $avia_config['use_standard_lightbox'] = empty( $lightbox_option ) || ( 'lightbox_active' == $lightbox_option ) ? 'lightbox_active' : 'disabled'; /** * Allow to overwrite the option setting for using the standard lightbox * Make sure to return 'disabled' to deactivate the standard lightbox - all checks are done against this string * * @added_by Günter * @since 4.2.6 * @param string $use_standard_lightbox 'lightbox_active' | 'disabled' * @return string 'lightbox_active' | 'disabled' */ $avia_config['use_standard_lightbox'] = apply_filters( 'avf_use_standard_lightbox', $avia_config['use_standard_lightbox'] ); $style = $avia_config['box_class']; $responsive = avia_get_option( 'responsive_active' ) != 'disabled' ? 'responsive' : 'fixed_layout'; $blank = isset( $avia_config['template'] ) ? $avia_config['template'] : ''; $preloader = avia_get_option( 'preloader' ) == 'preloader' ? 'av-preloader-active av-preloader-enabled' : 'av-preloader-disabled'; $html_classes = array(); $body_classes = array(); $html_classes[] = "html_{$style}"; $html_classes[] = $responsive; $html_classes[] = $preloader; $html_classes[] = avia_header_class_filter( avia_header_class_string() ); $html_classes[] = 'av-no-preview'; /*required for live previews*/ if( $avia_config['use_standard_lightbox'] != 'disabled' ) { $html_classes[] = 'av-default-lightbox'; /** * Hide scrollbars when lightbox is opened to avoid scroll of lightbox and body * (might cause flicker when scrollbars are removed) * * @since 5.1 * @param boolean no_scroll * @return false|mixed */ if( false !== apply_filters( 'avf_default_lightbox_no_scroll', false ) ) { $html_classes[] = 'av-default-lightbox-no-scroll'; } } else { $html_classes[] = 'av-custom-lightbox'; } $body_classes[] = $style; $body_classes[] = $blank; $body_classes[] = avia_get_option( 'sidebar_styling' ); if( 'disable_mobile_css_animations' == avia_get_option( 'disable_mobile_css_animations' ) ) { $body_classes[] = 'avia-mobile-no-animations'; } /** * Get footer stylings and post overrides */ $the_id = avia_get_the_id(); //use avia get the id instead of default get id. prevents notice on 404 pages $body_layout = avia_get_option( 'color-body_style' ); $footer_options = avia_get_option( 'display_widgets_socket', 'all' ); $footer_behavior = avia_get_option( 'footer_behavior' ); $footer_media = avia_get_option( 'curtains_media' ); $footer_post = get_post_meta( $the_id, 'footer', true ); $footer_behavior_post = get_post_meta( $the_id, 'footer_behavior', true ); /** * Reset individual page override to defaults if widget or page settings are different (user might have changed theme options) * (if user wants a page as footer he must select this in main options - on individual page it's only possible to hide the page) */ if( false !== strpos( $footer_options, 'page' ) ) { /** * User selected a page as footer in main options */ if( ! in_array( $footer_post, array( 'page_in_footer_socket', 'page_in_footer', 'nofooterarea' ) ) ) { $footer_post = ''; } } else { /** * User selected a widget based footer in main options */ if( in_array( $footer_post, array( 'page_in_footer_socket', 'page_in_footer' ) ) ) { $footer_post = ''; } } $footer_option = ! empty( $footer_post ) ? $footer_post : $footer_options; switch ( $footer_behavior_post ) { case 'scroll': $footer_behavior = ''; break; case 'curtain_footer': $footer_behavior = 'curtain_footer'; break; default: break; } if( 'stretched' != $body_layout ) { $footer_behavior = ''; $footer_media = ''; } else { if( empty( $footer_media ) ) { $footer_media = '70'; } } $avia_config['footer_option'] = $footer_option; $avia_config['footer_behavior'] = $footer_behavior; $avia_config['footer_media'] = $footer_media; /** * If title attribute is missing for an image default lightbox displays the alt attribute * * @since 4.7.6.2 * @param bool * @return false|mixed anything except false will activate this feature */ $body_classes[] = false !== apply_filters( 'avf_lightbox_show_alt_text', false ) ? 'avia-mfp-show-alt-text' : ''; /** * Allows to alter default settings Enfold-> Main Menu -> General -> Menu Items for Desktop * @since 4.4.2 */ $is_burger_menu = apply_filters( 'avf_burger_menu_active', avia_is_burger_menu(), 'header' ); $html_classes[] = $is_burger_menu ? 'html_burger_menu_active' : 'html_text_menu_active'; if( ! $is_burger_menu ) { $handling = avia_get_option( 'header_mobile_device_handling' ); $html_classes[] = 'mobile_switch_portrait' != $handling ? 'av-mobile-menu-switch-default' : 'av-mobile-menu-switch-portrait'; } /** * Add additional custom body classes * e.g. to disable default image hover effect add av-disable-avia-hover-effect * * @since 4.4.2 * @param string $custom_body_classes * @return string */ $body_classes[] = apply_filters( 'avf_custom_body_classes', '' ); /** * @since 4.2.3 we support columns in rtl order (before they were ltr only). To be backward comp. with old sites use this filter. */ $body_classes[] = 'yes' == apply_filters( 'avf_rtl_column_support', 'yes' ) ? 'rtl_columns' : ''; /** * @since 4.8.6.3 */ $body_classes[] = 'curtain_footer' == $avia_config['footer_behavior'] ? 'av-curtain-footer' : ''; $body_classes[] = is_numeric( $footer_media ) || empty( $footer_media ) ? 'av-curtain-numeric' : "av-curtain-screen {$footer_media}"; $html_classes = implode( ' ', array_unique( array_filter( $html_classes ) ) ); ?><!DOCTYPE html> <html <?php language_attributes(); ?> class="<?php echo $html_classes; ?>"> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <?php /* * outputs a rel=follow or nofollow tag to circumvent google duplicate content for archives * located in framework/php/function-set-avia-frontend.php */ if( function_exists( 'avia_set_follow' ) ) { echo avia_set_follow(); } ?> <!-- mobile setting --> <?php $meta_viewport = ( strpos( $responsive, 'responsive' ) !== false ) ? '<meta name="viewport" content="width=device-width, initial-scale=1">' : ''; /** * @since 4.7.6.4 * @param string * @return string */ echo apply_filters( 'avf_header_meta_viewport', $meta_viewport ); ?> <!-- Scripts/CSS and wp_head hook --> <?php /* Always have wp_head() just before the closing </head> * tag of your theme, or you will break many plugins, which * generally use this hook to add elements to <head> such * as styles, scripts, and meta tags. */ wp_head(); ?> </head> <?php $body_classes[] = $avia_config['font_stack']; $body_classes = implode( ' ', array_unique( array_filter( $body_classes ) ) ); ?> <body id="top" <?php body_class( $body_classes ); avia_markup_helper( array( 'context' => 'body' ) ); ?>> <?php /** * WP 5.2 add a new function - stay backwards compatible with older WP versions and support plugins that use this hook * https://make.wordpress.org/themes/2019/03/29/addition-of-new-wp_body_open-hook/ * * @since 4.5.6 */ if( function_exists( 'wp_body_open' ) ) { wp_body_open(); } else { do_action( 'wp_body_open' ); } do_action( 'ava_after_body_opening_tag' ); if( 'av-preloader-active av-preloader-enabled' === $preloader ) { echo avia_preload_screen(); } ?> <div id='wrap_all'> <?php if( ! $blank ) //blank templates dont display header nor footer { //fetch the template file that holds the main menu, located in includes/helper-menu-main.php get_template_part( 'includes/helper', 'main-menu' ); } ?> <div id='main' role='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting( 'header_scroll_offset' ); ?>'> <?php if( isset( $avia_config['temp_logo_container'] ) ) { echo $avia_config['temp_logo_container']; } do_action( 'ava_after_main_container' ); <?php if( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly /* * Please do not modify this file on your child theme to add scripts to Footer (before closing of Body tag) section. * Refer to this post - https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/#add-a-script-to-footer-section and use functions.php file instead */ global $avia_config; /** * Fixes a bug started with WP 5.8.1 */ if( ! isset( $the_id ) ) { $the_id = avia_get_the_id(); } /** * Fired before footer output starts * * @since ??? */ do_action( 'ava_before_footer' ); $blank = isset( $avia_config['template'] ) ? $avia_config['template'] : ''; // reset wordpress query in case we modified it wp_reset_query(); // get link to previous and next post/portfolio entry $avia_post_nav = avia_post_nav(); // set in header.php $footer_option = $avia_config['footer_option']; if( 'nofooterarea' != $footer_option && 'curtain_footer' == $avia_config['footer_behavior'] ) { $data = is_numeric( $avia_config['footer_media'] ) ? " data-footer_max_height='{$avia_config['footer_media']}'" : ''; echo '<div class="av-curtain-footer-container"' . $data . '>'; } /** * Fired after a possible footer container has been added and actual footer output starts * . * @since 4.8.6.3 */ do_action( 'ava_before_footer_output' ); /* * Check if we should display a page content as footer */ if( ! $blank && in_array( $footer_option, array( 'page_in_footer_socket', 'page_in_footer' ) ) ) { /** * Allows 3rd parties to change page id's, e.g. translation plugins */ $post = AviaCustomPages()->get_custom_page_object( 'footer_page', '' ); if( ( $post instanceof WP_Post ) && ( $post->ID != $the_id ) ) { /** * Make sure that footerpage is set to fullwidth */ $old_avia_config = $avia_config; $avia_config['layout']['current'] = array( 'content' => 'av-content-full alpha', 'sidebar' => 'hidden', 'meta' => '', 'entry' => '', 'main' => 'fullsize' ); $builder_stat = ( 'active' == Avia_Builder()->get_alb_builder_status( $post->ID ) ); $avia_config['conditionals']['is_builder'] = $builder_stat; $avia_config['conditionals']['is_builder_template'] = $builder_stat; /** * @used_by config-bbpress\config.php * @since 4.5.6.1 * @param WP_Post $post * @param int $the_id */ do_action( 'ava_before_page_in_footer_compile', $post, $the_id ); $content = Avia_Builder()->compile_post_content( $post ); /** * Remove leading <p> tag that is added by 'the_content' filter * https://kriesi.at/support/topic/small-gutenburg-issue/ * * @since 4.8.8 */ $content = trim( $content ); if( 0 === strpos( $content, '<p>' ) ) { $content = substr( $content, 3 ); } $avia_config = $old_avia_config; /** * @since 4.7.4.1 * @param string * @param WP_Post $post * @param int $the_id */ $extra_class = apply_filters( 'avf_page_as_footer_extra_classes', 'footer-page-content footer_color', $post, $the_id ); /** * Wrap footer page in case we need extra CSS changes * * @since 4.7.4.1 * @since 6.0.9 added <footer> tag */ if( 'page_in_footer' == $footer_option ) { echo '<footer class="' . $extra_class . '" id="footer-page">'; echo $content; echo '</footer>'; } else { echo '<div class="' . $extra_class . '" id="footer-page">'; echo $content; echo '</div>'; } } } /** * Check if we should display a footer */ if( ! $blank && $footer_option != 'nofooterarea' ) { if( in_array( $footer_option, array( 'all', 'nosocket' ) ) ) { //get columns $columns = avia_get_option('footer_columns'); ?> <div class='container_wrap footer_color' id='footer'> <div class='container'> <?php do_action('avia_before_footer_columns'); //create the footer columns by iterating switch( $columns ) { case 1: $class = ''; break; case 2: $class = 'av_one_half'; break; case 3: $class = 'av_one_third'; break; case 4: $class = 'av_one_fourth'; break; case 5: $class = 'av_one_fifth'; break; case 6: $class = 'av_one_sixth'; break; default: $class = ''; break; } $firstCol = "first el_before_{$class}"; //display the footer widget that was defined at appearenace->widgets in the wordpress backend //if no widget is defined display a dummy widget, located at the bottom of includes/register-widget-area.php for( $i = 1; $i <= $columns; $i++ ) { $class2 = ''; // initialized to avoid php notices if( $i != 1 ) { $class2 = " el_after_{$class} el_before_{$class}"; } echo "<div class='flex_column {$class} {$class2} {$firstCol}'>"; if( ! ( function_exists( 'dynamic_sidebar' ) && dynamic_sidebar( 'Footer - Column ' . $i ) ) ) { avia_dummy_widget( $i ); } echo '</div>'; $firstCol = ''; } do_action( 'avia_after_footer_columns' ); ?> </div> <!-- ####### END FOOTER CONTAINER ####### --> </div> <?php } //endif array( 'all', 'nosocket' ) ?> <?php //copyright $copyright = do_shortcode( avia_get_option( 'copyright', '&copy; ' . __( 'Copyright', 'avia_framework' ) . " - <a href='" . home_url( '/' ) . "'>" . get_bloginfo('name') . '</a>' ) ); // you can filter and remove the backlink with an add_filter function // from your themes (or child themes) functions.php file if you dont want to edit this file // you can also remove the kriesi.at backlink by adding [nolink] to your custom copyright field in the admin area // you can also just keep that link. I really do appreciate it ;) $kriesi_at_backlink = kriesi_backlink( get_option( THEMENAMECLEAN . "_initial_version" ), 'Enfold' ); if( $copyright && strpos( $copyright, '[nolink]' ) !== false ) { $kriesi_at_backlink = ''; $copyright = str_replace( '[nolink]', '', $copyright ); } /** * @since 4.5.7.2 * @param string $copyright * @param string $copyright_option * @return string */ $copyright_option = avia_get_option( 'copyright' ); $copyright = apply_filters( 'avf_copyright_info', $copyright, $copyright_option ); if( in_array( $footer_option, array( 'all', 'nofooterwidgets', 'page_in_footer_socket' ) ) ) { $aria_label = 'aria-label="' . __( 'Copyright and company info', 'avia_framework' ) . '"'; /** * @since 6.0.3 * @param string $aria_label * @param string $context * @param mixed $additional_args * @return string */ $aria_label = apply_filters( 'avf_aria_label_for_footer', $aria_label, __FILE__, null ); ?> <footer class='container_wrap socket_color' id='socket' <?php echo $aria_label . ' ' . avia_markup_helper( array( 'context' => 'footer' ) ); ?>> <div class='container'> <span class='copyright'><?php echo $copyright . $kriesi_at_backlink; ?></span> <?php if( avia_get_option( 'footer_social', 'disabled' ) != 'disabled' ) { $social_args = array( 'outside'=>'ul', 'inside'=>'li', 'append' => '' ); echo avia_social_media_icons( $social_args, false ); } $avia_theme_location = 'avia3'; $avia_menu_class = $avia_theme_location . '-menu'; $args = array( 'theme_location' => $avia_theme_location, 'menu_id' => $avia_menu_class, 'container_class' => $avia_menu_class, 'items_wrap' => '<ul role="menu" class="%2$s" id="%1$s">%3$s</ul>', 'fallback_cb' => '', 'depth' => 1, 'echo' => false, 'walker' => new avia_responsive_mega_menu( array( 'megamenu' => 'disabled' ) ) ); $menu = wp_nav_menu( $args ); if( $menu ) { echo "<nav class='sub_menu_socket' " . avia_markup_helper( array( 'context' => 'nav', 'echo' => false ) ) . '>'; echo $menu; echo '</nav>'; } ?> </div> <!-- ####### END SOCKET CONTAINER ####### --> </footer> <?php } //end nosocket check - array( 'all', 'nofooterwidgets', 'page_in_footer_socket' ) } //end blank & nofooterarea check /** * Fired before a possible footer container is closed * . * @since 4.8.6.3 */ do_action( 'ava_after_footer_output' ); if( 'nofooterarea' != $footer_option && 'curtain_footer' == $avia_config['footer_behavior'] ) { echo '</div>'; // class="av-curtain-footer-container" } ?> <!-- end main --> </div> <?php /** * Fired after footer container is closed * . * @since 4.8.6.3 */ do_action( 'ava_after_footer' ); //display link to previous and next portfolio entry echo $avia_post_nav; echo "<!-- end wrap_all --></div>"; if( isset( $avia_config['fullscreen_image'] ) ) { ?> <!--[if lte IE 8]> <style type="text/css"> .bg_container { -ms-filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale')"; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo $avia_config['fullscreen_image']; ?>', sizingMethod='scale'); } </style> <![endif]--> <?php echo "<div class='bg_container' style='background-image:url(" . $avia_config['fullscreen_image'] . ");'></div>"; } $icon_title = __( 'Scroll to top', 'avia_framework' ); $icon_top = avia_font_manager::get_frontend_icon( 'svg__scrolltop', false, [ 'aria-hidden' => 'true', 'title' => $icon_title, 'desc' => $icon_title ] ); ?> <a href='#top' title='<?php echo $icon_title; ?>' id='scroll-top-link' class='avia-svg-icon avia-font-svg_entypo-fontello' <?php echo $icon_top['attr']; ?> tabindex='-1' aria-hidden='true'> <?php echo $icon_top['svg']; ?> <span class="avia_hidden_link_text"><?php echo $icon_title; ?></span> </a> <div id="fb-root"></div> <?php /* Always have wp_footer() just before the closing </body> * tag of your theme, or you will break many plugins, which * generally use this hook to reference JavaScript files. */ wp_footer(); ?> </body> </html>