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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package Cryout Creations
* @subpackage mantra
* @since mantra 0.5
*/
$mantra_options = mantra_get_theme_options();
extract($mantra_options);
if ( is_page_template() &&
!is_page_template('templates/template-blog.php') &&
!is_page_template('templates/template-onecolumn.php') &&
!is_page_template('templates/template-page-with-intro.php') ) {
?>
<div id="primary" class="widget-area" role="complementary">
<?php cryout_before_primary_widgets_hook(); ?>
<?php if (!is_active_sidebar('primary-widget-area') && !is_active_sidebar('secondary-widget-area')): ?>
<ul class="xoxo">
<li class="widget-container widget-placeholder">
<h3 class="widget-title"><?php _e('Sidebar 1','mantra'); ?></h3>
<p><?php if (current_user_can('manage_options')) {
printf( __('You currently have no widgets set in the primary sidebar. You can add widgets via the <a href="%s">Dashboard</a>.','mantra'), esc_url( admin_url() . "widgets.php") ); echo "<br/>";
printf( __('To hide this sidebar, switch to a different Layout via the <a href="%s">Theme Settings</a>.','mantra'), esc_url( admin_url() . "themes.php?page=mantra-page") );
} ?></p>
</li>
</ul>
<?php endif; ?>
<ul class="xoxo">
<?php dynamic_sidebar( 'primary-widget-area' ); ?>
</ul>
<ul class="xoxo">
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
</ul>
<?php cryout_after_primary_widgets_hook(); ?>
</div><!-- #primary .widget-area -->
<?php
if ( is_page_template("templates/template-threecolumns-right.php") ||
is_page_template("templates/template-threecolumns-left.php") ||
is_page_template("templates/template-threecolumns-center.php")) { ?>
<div id="secondary" class="widget-area" role="complementary" >
<?php cryout_before_secondary_widgets_hook(); ?>
<?php if (!is_active_sidebar('third-widget-area') && !is_active_sidebar('fourth-widget-area')): ?>
<ul class="xoxo">
<li class="widget-container widget-placeholder">
<h3 class="widget-title"><?php _e('Sidebar 2','mantra'); ?></h3>
<p><?php if (current_user_can('manage_options')) {
printf( __('You currently have no widgets set in the secondary sidebar. You can add widgets via the <a href="%s">Dashboard</a>.','mantra'), esc_url( admin_url() . "widgets.php") ); echo "<br/>";
printf( __('To hide this sidebar, switch to a different Layout via the <a href="%s">Theme Settings</a>.','mantra'), esc_url( admin_url() . "themes.php?page=mantra-page") );
} ?></p>
</li>
</ul>
<?php endif; ?>
<ul class="xoxo">
<?php dynamic_sidebar( 'third-widget-area' ); ?>
</ul>
<ul class="xoxo">
<?php dynamic_sidebar( 'fourth-widget-area' ); ?>
</ul>
<?php cryout_after_secondary_widgets_hook(); ?>
</div><!-- #secondary .widget-area -->
<?php
} // second sidebar
} // if page_template
elseif ($mantra_side != "1c") { ?>
<div id="primary" class="widget-area" role="complementary">
<?php cryout_before_primary_widgets_hook(); ?>
<?php
if (!is_active_sidebar('primary-widget-area') && !is_active_sidebar('secondary-widget-area')): ?>
<ul class="xoxo">
<li class="widget-container widget-placeholder">
<h3 class="widget-title"><?php _e('Sidebar 1','mantra'); ?></h3>
<p><?php if (current_user_can('manage_options')) {
printf( __('You currently have no widgets set in the primary sidebar. You can add widgets via the <a href="%s">Dashboard</a>.','mantra'), esc_url( admin_url() . "widgets.php") ); echo "<br/>";
printf( __('To hide this sidebar, switch to a different Layout via the <a href="%s">Theme Settings</a>.','mantra'), esc_url( admin_url() . "themes.php?page=mantra-page") );
} ?></p>
</li>
</ul>
<?php endif; ?>
<ul class="xoxo">
<?php dynamic_sidebar( 'primary-widget-area' ) ; ?>
</ul>
<ul class="xoxo">
<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
</ul>
<?php cryout_after_primary_widgets_hook(); ?>
</div><!-- #primary .widget-area -->
<?php
// A second sidebar for widgets, just because.
if ( $mantra_side != "2cSr" && $mantra_side != "2cSl") { ?>
<div id="secondary" class="widget-area" role="complementary">
<?php cryout_before_secondary_widgets_hook(); ?>
<?php if (!is_active_sidebar('third-widget-area') && !is_active_sidebar('fourth-widget-area')): ?>
<ul class="xoxo">
<li class="widget-container widget-placeholder">
<h3 class="widget-title"><?php _e('Sidebar 2','mantra'); ?></h3>
<p><?php if (current_user_can('manage_options')) {
printf( __('You currently have no widgets set in the secondary sidebar. You can add widgets via the <a href="%s">Dashboard</a>.','mantra'), esc_url( admin_url() . "widgets.php") ); echo "<br/>";
printf( __('To hide this sidebar, switch to a different Layout via the <a href="%s">Theme Settings</a>.','mantra'), esc_url( admin_url() . "themes.php?page=mantra-page") );
} ?></p>
</li>
</ul>
<?php endif; ?>
<ul class="xoxo">
<?php dynamic_sidebar( 'third-widget-area' ); ?>
</ul>
<ul class="xoxo">
<?php dynamic_sidebar( 'fourth-widget-area' ); ?>
</ul>
<?php cryout_after_secondary_widgets_hook(); ?>
</div><!-- #secondary .widget-area -->
<?php }
} // 1c
// FIN
|