-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
153 lines (133 loc) · 6.52 KB
/
footer.php
File metadata and controls
153 lines (133 loc) · 6.52 KB
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
149
150
151
152
153
<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content after
*
* @package Generate
*/
?>
</div><!-- #content -->
</div><!-- #page -->
<?php do_action( 'generate_before_footer' ); ?>
<div <?php generate_footer_class(); ?>>
<?php
do_action( 'generate_before_footer_content' );
global $post;
$generate_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_defaults()
);
$stored_meta = '';
if ( isset( $post ) ) :
$stored_meta = get_post_meta( $post->ID, '_generate-footer-widget-meta', true );
endif;
// Don't run the function unless we're on a page it applies to
if ( ! is_singular() ) :
$stored_meta = '';
endif;
if ( '' !== $stored_meta && false !== $stored_meta ) :
$generate_settings['footer_widget_setting'] = $stored_meta;
endif;
if ( ! empty( $generate_settings['footer_widget_setting'] ) && 0 !== $generate_settings['footer_widget_setting'] ) :
$widget_width = '';
if ( $generate_settings['footer_widget_setting'] == 1 ) {
$widget_width = '100';
}
if ( $generate_settings['footer_widget_setting'] == 2 ) {
$widget_width = '50';
}
if ( $generate_settings['footer_widget_setting'] == 3 ) {
$widget_width = '33';
}
if ( $generate_settings['footer_widget_setting'] == 4 ) {
$widget_width = '25';
}
if ( $generate_settings['footer_widget_setting'] == 5 ) {
$widget_width = '20';
}
?>
<div id="footer-widgets" class="site footer-widgets">
<div class="inside-footer-widgets grid-container grid-parent">
<?php if ( $generate_settings['footer_widget_setting'] >= 1 ) : ?>
<div class="footer-widget-1 grid-parent grid-<?php echo $widget_width; ?>">
<?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'footer-1' ) ): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e( 'Footer Widget 1', 'generate' ); ?></h4>
<div class="textwidget">
<p><?php _e( 'Replace this widget content by going to <a href="' . admin_url() . 'widgets.php"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 1.', 'generate' ); ?></p>
<p><?php _e( 'To remove or choose the number of footer widgets, go to <a href="' . admin_url() . 'customize.php"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.', 'generate' ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $generate_settings['footer_widget_setting'] >= 2 ) : ?>
<div class="footer-widget-2 grid-parent grid-<?php echo $widget_width; ?>">
<?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'footer-2' ) ): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e( 'Footer Widget 2', 'generate' ); ?></h4>
<div class="textwidget">
<p><?php _e( 'Replace this widget content by going to <a href="' . admin_url() . 'widgets.php"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 2.', 'generate' ); ?></p>
<p><?php _e( 'To remove or choose the number of footer widgets, go to <a href="' . admin_url() . 'customize.php"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.', 'generate' ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $generate_settings['footer_widget_setting'] >= 3 ) : ?>
<div class="footer-widget-3 grid-parent grid-<?php echo $widget_width; ?>">
<?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'footer-3' ) ): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e( 'Footer Widget 3', 'generate' ); ?></h4>
<div class="textwidget">
<p><?php _e( 'Replace this widget content by going to <a href="' . admin_url() . 'widgets.php"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 3.', 'generate' ); ?></p>
<p><?php _e( 'To remove or choose the number of footer widgets, go to <a href="' . admin_url() . 'customize.php"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.', 'generate' ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $generate_settings['footer_widget_setting'] >= 4 ) : ?>
<div class="footer-widget-4 grid-parent grid-<?php echo $widget_width; ?>">
<?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'footer-4' ) ): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e( 'Footer Widget 4', 'generate' ); ?></h4>
<div class="textwidget">
<p><?php _e( 'Replace this widget content by going to <a href="' . admin_url() . 'widgets.php"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 4.', 'generate' ); ?></p>
<p><?php _e( 'To remove or choose the number of footer widgets, go to <a href="' . admin_url() . 'customize.php"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.', 'generate' ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $generate_settings['footer_widget_setting'] >= 5 ) : ?>
<div class="footer-widget-5 grid-parent grid-<?php echo $widget_width; ?>">
<?php if ( ! function_exists( 'dynamic_sidebar' ) || ! dynamic_sidebar( 'footer-5' ) ): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e( 'Footer Widget 5', 'generate' ); ?></h4>
<div class="textwidget">
<p><?php _e( 'Replace this widget content by going to <a href="' . admin_url() . 'widgets.php"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 5.', 'generate' ); ?></p>
<p><?php _e( 'To remove or choose the number of footer widgets, go to <a href="' . admin_url() . 'customize.php"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.', 'generate' ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
<?php
endif;
do_action( 'generate_after_footer_widgets' );
?>
<footer class="site-info" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo">
<div class="inside-site-info grid-container grid-parent">
<?php do_action( 'generate_credits' ); ?>
</div>
</footer>
<!-- .site-info -->
<?php do_action( 'generate_after_footer_content' ); ?>
</div><!-- .site-footer -->
<?php wp_footer(); ?>
</body>
</html>