-
Notifications
You must be signed in to change notification settings - Fork 40
/
sidebar-woocommerce-left.php
47 lines (42 loc) · 1.42 KB
/
sidebar-woocommerce-left.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
43
44
45
46
47
<?php
/**
* The WooCommerce left sidebar widget area.
*
* @package ColorMag
*
* @since ColorMag 2.2.8
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<div id="cm-secondary" class="cm-secondary">
<?php do_action( 'colormag_before_sidebar' ); ?>
<?php
if ( ! is_active_sidebar( 'colormag_woocommerce_left_sidebar' ) ) :
the_widget(
'WP_Widget_Text',
array(
'title' => esc_html__( 'Example Widget', 'colormag' ),
'text' => sprintf(
/* Translators: 1. Opening of the link for widgets.php WordPress section, 2. Closing of the link for widgets.php WordPress section */
esc_html__( 'This is an example widget to show how the WooCommerce Left Sidebar looks by default. You can add custom widgets from the %swidgets screen%s in the admin. If custom widgets is added than this will be replaced by those widgets.', 'colormag' ),
current_user_can( 'edit_theme_options' ) ? '<a href="' . admin_url( 'widgets.php' ) . '">' : '',
current_user_can( 'edit_theme_options' ) ? '</a>' : ''
),
'filter' => true,
),
array(
'before_widget' => '<aside class="widget widget_text clearfix">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="cm-widget-title"><span>',
'after_title' => '</span></h3>',
)
);
else :
dynamic_sidebar( 'colormag_woocommerce_left_sidebar' );
endif;
?>
<?php do_action( 'colormag_after_sidebar' ); ?>
</div>