-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
42 lines (34 loc) · 1.04 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
40
41
42
<?php
/**
* The Sidebar containing the main widget areas.
*
* If no active widgets in sidebar, let's hide it completely.
*
* @package vogue
* @since 1.0.0
*/
// File Security Check
if ( ! defined( 'ABSPATH' ) ) { exit; }
if ( 'disabled' == presscore_get_config()->get( 'sidebar_position' ) ) {
return;
}
$sidebar = presscore_get_config()->get( 'sidebar_widgetarea_id' );
// default sidebar
if ( ! $sidebar ) {
$sidebar = apply_filters( 'presscore_default_sidebar', 'sidebar_1' );
}
// disable widget dividers
$dividers_off = '';
if ( ! presscore_get_config()->get( 'sidebar.style.with_dividers.horizontal_dividers' ) ) {
$dividers_off = ' widget-divider-off';
}
if ( is_active_sidebar( $sidebar ) ) : ?>
<aside id="sidebar" <?php echo presscore_sidebar_html_class(); ?>>
<div class="sidebar-content<?php echo $dividers_off; ?>">
<?php
do_action( 'presscore_before_sidebar_widgets' );
dynamic_sidebar( $sidebar );
?>
</div>
</aside><!-- #sidebar -->
<?php endif; ?>