| 1 | <?php |
|---|
| 2 | /** |
|---|
| 3 | * The template for displaying the footer. |
|---|
| 4 | * |
|---|
| 5 | * Contains the closing of the id=main div and all content after |
|---|
| 6 | * |
|---|
| 7 | * @package Generate |
|---|
| 8 | */ |
|---|
| 9 | ?> |
|---|
| 10 | |
|---|
| 11 | </div><!-- #content --> |
|---|
| 12 | </div><!-- #page --> |
|---|
| 13 | <?php do_action('generate_before_footer'); ?> |
|---|
| 14 | <div <?php generate_footer_class(); ?>> |
|---|
| 15 | <?php |
|---|
| 16 | do_action('generate_before_footer_content'); |
|---|
| 17 | global $post; |
|---|
| 18 | $generate_settings = wp_parse_args( |
|---|
| 19 | get_option( 'generate_settings', array() ), |
|---|
| 20 | generate_get_defaults() |
|---|
| 21 | ); |
|---|
| 22 | $stored_meta = ''; |
|---|
| 23 | if ( isset( $post ) ) : |
|---|
| 24 | $stored_meta = get_post_meta( $post->ID, '_generate-footer-widget-meta', true ); |
|---|
| 25 | endif; |
|---|
| 26 | |
|---|
| 27 | // Don't run the function unless we're on a page it applies to |
|---|
| 28 | if ( ! is_singular() ) : |
|---|
| 29 | $stored_meta = ''; |
|---|
| 30 | endif; |
|---|
| 31 | |
|---|
| 32 | if ( '' !== $stored_meta && false !== $stored_meta ) : |
|---|
| 33 | $generate_settings['footer_widget_setting'] = $stored_meta; |
|---|
| 34 | endif; |
|---|
| 35 | |
|---|
| 36 | if ( !empty( $generate_settings['footer_widget_setting'] ) && 0 !== $generate_settings['footer_widget_setting'] ) : |
|---|
| 37 | $widget_width = ''; |
|---|
| 38 | if ( $generate_settings['footer_widget_setting'] == 1 ) $widget_width = '100'; |
|---|
| 39 | if ( $generate_settings['footer_widget_setting'] == 2 ) $widget_width = '50'; |
|---|
| 40 | if ( $generate_settings['footer_widget_setting'] == 3 ) $widget_width = '33'; |
|---|
| 41 | if ( $generate_settings['footer_widget_setting'] == 4 ) $widget_width = '25'; |
|---|
| 42 | if ( $generate_settings['footer_widget_setting'] == 5 ) $widget_width = '20'; |
|---|
| 43 | ?> |
|---|
| 44 | <div id="footer-widgets" class="site footer-widgets"> |
|---|
| 45 | <div class="inside-footer-widgets grid-container grid-parent"> |
|---|
| 46 | <?php if ( $generate_settings['footer_widget_setting'] >= 1 ) : ?> |
|---|
| 47 | <div class="footer-widget-1 grid-parent grid-<?php echo $widget_width; ?>"> |
|---|
| 48 | <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-1')): ?> |
|---|
| 49 | <aside class="widget inner-padding widget_text"> |
|---|
| 50 | <h4 class="widget-title"><?php _e('Footer Widget 1','generate');?></h4> |
|---|
| 51 | <div class="textwidget"> |
|---|
| 52 | <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> |
|---|
| 53 | <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> |
|---|
| 54 | </div> |
|---|
| 55 | </aside> |
|---|
| 56 | <?php endif; ?> |
|---|
| 57 | </div> |
|---|
| 58 | <?php endif; |
|---|
| 59 | |
|---|
| 60 | if ( $generate_settings['footer_widget_setting'] >= 2 ) : ?> |
|---|
| 61 | <div class="footer-widget-2 grid-parent grid-<?php echo $widget_width; ?>"> |
|---|
| 62 | <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-2')): ?> |
|---|
| 63 | <aside class="widget inner-padding widget_text"> |
|---|
| 64 | <h4 class="widget-title"><?php _e('Footer Widget 2','generate');?></h4> |
|---|
| 65 | <div class="textwidget"> |
|---|
| 66 | <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> |
|---|
| 67 | <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> |
|---|
| 68 | </div> |
|---|
| 69 | </aside> |
|---|
| 70 | <?php endif; ?> |
|---|
| 71 | </div> |
|---|
| 72 | <?php endif; |
|---|
| 73 | |
|---|
| 74 | if ( $generate_settings['footer_widget_setting'] >= 3 ) : ?> |
|---|
| 75 | <div class="footer-widget-3 grid-parent grid-<?php echo $widget_width; ?>"> |
|---|
| 76 | <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-3')): ?> |
|---|
| 77 | <aside class="widget inner-padding widget_text"> |
|---|
| 78 | <h4 class="widget-title"><?php _e('Footer Widget 3','generate');?></h4> |
|---|
| 79 | <div class="textwidget"> |
|---|
| 80 | <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> |
|---|
| 81 | <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> |
|---|
| 82 | </div> |
|---|
| 83 | </aside> |
|---|
| 84 | <?php endif; ?> |
|---|
| 85 | </div> |
|---|
| 86 | <?php endif; |
|---|
| 87 | |
|---|
| 88 | if ( $generate_settings['footer_widget_setting'] >= 4 ) : ?> |
|---|
| 89 | <div class="footer-widget-4 grid-parent grid-<?php echo $widget_width; ?>"> |
|---|
| 90 | <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-4')): ?> |
|---|
| 91 | <aside class="widget inner-padding widget_text"> |
|---|
| 92 | <h4 class="widget-title"><?php _e('Footer Widget 4','generate');?></h4> |
|---|
| 93 | <div class="textwidget"> |
|---|
| 94 | <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> |
|---|
| 95 | <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> |
|---|
| 96 | </div> |
|---|
| 97 | </aside> |
|---|
| 98 | <?php endif; ?> |
|---|
| 99 | </div> |
|---|
| 100 | <?php endif; |
|---|
| 101 | |
|---|
| 102 | if ( $generate_settings['footer_widget_setting'] >= 5 ) : ?> |
|---|
| 103 | <div class="footer-widget-5 grid-parent grid-<?php echo $widget_width; ?>"> |
|---|
| 104 | <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-5')): ?> |
|---|
| 105 | <aside class="widget inner-padding widget_text"> |
|---|
| 106 | <h4 class="widget-title"><?php _e('Footer Widget 5','generate');?></h4> |
|---|
| 107 | <div class="textwidget"> |
|---|
| 108 | <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> |
|---|
| 109 | <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> |
|---|
| 110 | </div> |
|---|
| 111 | </aside> |
|---|
| 112 | <?php endif; ?> |
|---|
| 113 | </div> |
|---|
| 114 | <?php endif; ?> |
|---|
| 115 | </div> |
|---|
| 116 | </div> |
|---|
| 117 | <?php |
|---|
| 118 | endif; |
|---|
| 119 | do_action('generate_after_footer_widgets'); |
|---|
| 120 | ?> |
|---|
| 121 | <footer class="site-info" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo"> |
|---|
| 122 | <div class="inside-site-info grid-container grid-parent"> |
|---|
| 123 | <?php do_action( 'generate_credits' ); ?> |
|---|
| 124 | </div> |
|---|
| 125 | </footer><!-- .site-info --> |
|---|
| 126 | <?php do_action( 'generate_after_footer_content' ); ?> |
|---|
| 127 | </div><!-- .site-footer --> |
|---|
| 128 | |
|---|
| 129 | <?php wp_footer(); ?> |
|---|
| 130 | |
|---|
| 131 | </body> |
|---|
| 132 | </html> |
|---|