Files

176 lines
8.2 KiB
PHP
Raw Permalink Normal View History

2026-04-23 04:33:43 +03:30
<?php
/**
* The template for displaying the footer
*
* Contains the closing of the #content div and all content after.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Upstudy
*/
echo '</div>';
$upstudy_get_page_footer = get_post_meta( get_the_ID(), '_upstudy_mb_elementor_footer', true );
$footer = apply_filters( 'upstudy_get_footer_layout', Upstudy::setting( 'upstudy_get_elementor_footer' ) ) ?: 'theme-default-footer';
$default_footers = array( 'theme-default-footer' );
$footer_widget_area_column = Upstudy::setting( 'footer_widget_area_column' ) ?: '3_3_3_3';
$copyright_text = Upstudy::setting( 'copyright_text' );
$footer_variations = Upstudy::setting( 'footer_variations' );
$copyright_show = Upstudy::setting( 'copyright_show' ) ?: true;
echo '<footer id="colophon" class="site-footer">';
if ( $footer != 'theme-default-footer') :
upstudy_show_footer_builder( $footer );
elseif ( $footer == 'theme-default-footer' ) :
if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) :
if ( $footer_widget_area_column == '12' ) :
get_template_part( 'template-parts/footer/widgets-1' );
elseif( $footer_widget_area_column == '6_6' ) :
get_template_part( 'template-parts/footer/widgets-2' );
elseif( $footer_widget_area_column == '4_4_4' ) :
get_template_part( 'template-parts/footer/widgets-3' );
elseif( $footer_widget_area_column == '3_3_3_3' ) :
get_template_part( 'template-parts/footer/widgets-4' );
elseif( $footer_widget_area_column == '3_6_3' ) :
get_template_part( 'template-parts/footer/widgets-5' );
elseif( $footer_widget_area_column == '4_3_2_3' ) :
get_template_part( 'template-parts/footer/widgets-6' );
elseif( $footer_widget_area_column == '4_2_2_4' ) :
get_template_part( 'template-parts/footer/widgets-7' );
endif;
endif;
if ( $copyright_show) :
echo '<div class="upstudy-footer-default-wrapper site-footer footer-bottom">';
echo '<div class="site-info ' . esc_attr( apply_filters( 'upstudy_footer_site_info_container_class', 'upstudy-container' ) ) . '">';
echo '<div class="upstudy-row">';
if ( is_active_sidebar( 'copyright' ) ) :
echo '<div class="' . (has_nav_menu( 'footer_menu' ) ? 'upstudy-col-md-6' : 'upstudy-col-md-12 text-center') . '">';
dynamic_sidebar( 'copyright' );
echo '</div>';
else :
echo '<div class="' . (has_nav_menu( 'footer_menu' ) ? 'upstudy-col-md-6' : 'upstudy-col-md-12 text-center') . '">';
if ( $copyright_text ) :
echo wp_kses_post( $copyright_text );
else :
$allowed_html_array = array( 'a' => array( 'href' => array() ) );
echo wp_kses(
sprintf(
__( '&copy; %s - Upstudy. All Rights Reserved. Proudly powered by <a href="%s">Devthrow</a>', 'upstudy' ),
date( "Y" ),
esc_url( UPSTUDY_AUTHOR_SITE_URL )
),
$allowed_html_array
);
endif;
echo '</div>';
endif;
if ( is_active_sidebar( 'copyright_2' ) ) :
echo '<div class="upstudy-col-md-6 text-ml-left">';
dynamic_sidebar( 'copyright_2' );
echo '</div>';
else :
if ( has_nav_menu( 'footer_menu' ) ) :
echo '<div class="upstudy-col-md-6 text-right text-ml-left">';
echo '<nav class="social-navigation" role="navigation" aria-label="' . esc_attr__( 'Footer Menu', 'upstudy' ) . '">';
wp_nav_menu( array(
'theme_location' => 'footer_menu',
'container_class' => '',
'depth' => 1,
) );
echo '</nav>';
echo '</div>';
endif;
endif;
echo '</div>';
echo '</div>';
echo '</div>';
endif;
else:
if ( is_active_sidebar( 'footer-1' ) || is_active_sidebar( 'footer-2' ) || is_active_sidebar( 'footer-3' ) || is_active_sidebar( 'footer-4' ) ) :
if ( $footer_widget_area_column == '12' ) :
get_template_part( 'template-parts/footer/widgets-1' );
elseif( $footer_widget_area_column == '6_6' ) :
get_template_part( 'template-parts/footer/widgets-2' );
elseif( $footer_widget_area_column == '4_4_4' ) :
get_template_part( 'template-parts/footer/widgets-3' );
elseif( $footer_widget_area_column == '3_3_3_3' ) :
get_template_part( 'template-parts/footer/widgets-4' );
elseif( $footer_widget_area_column == '3_6_3' ) :
get_template_part( 'template-parts/footer/widgets-5' );
elseif( $footer_widget_area_column == '4_3_2_3' ) :
get_template_part( 'template-parts/footer/widgets-6' );
elseif( $footer_widget_area_column == '4_2_2_4' ) :
get_template_part( 'template-parts/footer/widgets-7' );
endif;
endif;
if ( $copyright_show) :
echo '<div class="upstudy-footer-default-wrapper site-footer footer-bottom">';
echo '<div class="site-info ' . esc_attr( apply_filters( 'upstudy_footer_site_info_container_class', 'upstudy-container' ) ) . '">';
echo '<div class="upstudy-row">';
if ( is_active_sidebar( 'copyright' ) ) :
echo '<div class="' . (has_nav_menu( 'footer_menu' ) ? 'upstudy-col-md-6' : 'upstudy-col-md-12 text-center') . '">';
dynamic_sidebar( 'copyright' );
echo '</div>';
else :
echo '<div class="' . (has_nav_menu( 'footer_menu' ) ? 'upstudy-col-md-6' : 'upstudy-col-md-12 text-center') . '">';
if ( $copyright_text ) :
echo wp_kses_post( $copyright_text );
else :
$allowed_html_array = array( 'a' => array( 'href' => array() ) );
echo wp_kses(
sprintf(
__( '&copy; %s - Upstudy. All Rights Reserved. Proudly powered by <a href="%s">Devthrow</a>', 'upstudy' ),
date( "Y" ),
esc_url( UPSTUDY_AUTHOR_SITE_URL )
),
$allowed_html_array
);
endif;
echo '</div>';
endif;
if ( is_active_sidebar( 'copyright_2' ) ) :
echo '<div class="upstudy-col-md-6 text-ml-left">';
dynamic_sidebar( 'copyright_2' );
echo '</div>';
else :
if ( has_nav_menu( 'footer_menu' ) ) :
echo '<div class="upstudy-col-md-6 text-right text-ml-left">';
echo '<nav class="social-navigation" role="navigation" aria-label="' . esc_attr__( 'Footer Menu', 'upstudy' ) . '">';
wp_nav_menu( array(
'theme_location' => 'footer_menu',
'container_class' => '',
'depth' => 1,
) );
echo '</nav>';
echo '</div>';
endif;
endif;
echo '</div>';
echo '</div>';
echo '</div>';
endif;
endif;
echo '</footer>';
echo '</div>';
wp_footer();
echo '</body>';
echo '</html>';