-
Notifications
You must be signed in to change notification settings - Fork 13
/
sidebar.php
39 lines (34 loc) · 1.16 KB
/
sidebar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* The sidebar containing the main widget area.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Suki
*/
// Prevent direct access.
if ( ! defined( 'ABSPATH' ) ) exit;
// Check current page's content container. Skip sidebar if it's a "narrow" layout.
if ( 'narrow' === suki_get_current_page_setting( 'content_container' ) ) return;
// Check current page's content layout. Skip sidebar if not needed in the layout.
if ( ! in_array( suki_get_current_page_setting( 'content_layout' ), array( 'left-sidebar', 'right-sidebar' ) ) ) return;
?>
<aside id="secondary" class="<?php echo esc_attr( implode( ' ', apply_filters( 'suki/frontend/sidebar_classes', array( 'widget-area', 'sidebar' ) ) ) ); ?>" role="complementary" itemscope itemtype="https://schema.org/WPSideBar">
<?php
/**
* Hook: suki/frontend/before_sidebar
*/
do_action( 'suki/frontend/before_sidebar' );
if ( is_active_sidebar( 'sidebar' ) ) :
?>
<div class="sidebar-inner">
<?php dynamic_sidebar( 'sidebar' ); ?>
</div>
<?php
endif;
/**
* Hook: suki/frontend/after_sidebar
*/
do_action( 'suki/frontend/after_sidebar' );
?>
</aside>