'container_id' => null, 'menu_class' => 'menu-footer', 'menu_id' => null, 'echo' => true, 'fallback_cb' => null, 'before' => null, 'after' => null, 'link_before' => null, 'link_after' => null, 'items_wrap' => '<div class="%2$s"><ul>%3$s</ul></div>', 'depth' => 1, 'walker' => ( has_nav_menu( $menuLocationName ) ) ? ( new wm_widget_walker() ) : ( null ) ) ); $class = ( is_page_template( 'page-template/construction.php' ) ) ? ( 'text-center clearfix' ) : ( 'clearfix' ); wm_credits( $class ); ?> </div> </div></section> <!-- /bottom-wrap --> <!-- /footer --></footer> <?php do_action( 'wm_after_website' ); ?> <!-- wp_footer() --> <?php wp_footer(); //WordPress footer hook ?> </body> <?php if ( ! wm_option( 'general-website-author' ) ) echo '<!-- ' . wm_static_option( 'static-webdesigner' ) . ' -->'; ?> </html>
function wm_section_footer() { //Helper variables $output = array(); $post_id = null; //WooCommerce support if (class_exists('WooCommerce') && is_shop()) { $post_id = wc_get_page_id('shop'); } //Requirements check if (!function_exists('wma_meta_option') || 'none' === wma_meta_option('footer', $post_id)) { get_sidebar('footer'); return; } //Preparing output //Footer widgets if ('credits' !== wma_meta_option('footer', $post_id)) { $widget_area_atts = apply_filters('wmhook_wm_section_footer_widget_area_atts', array('class' => 'widget-area footer-widgets-container', 'sidebar' => 'footer-widgets')); $widget_area = ''; if (function_exists('wma_sidebar')) { $widget_area = wma_sidebar($widget_area_atts); } if ($widget_area) { $columns = absint(wm_option('skin-footer-widgets-layout')); //Count widgets for special class when no masonry applied $masonry_class = ' masonry-disabled'; $footer_widgets = wp_get_sidebars_widgets(); if (is_array($footer_widgets) && isset($footer_widgets['footer-widgets']) && count($footer_widgets['footer-widgets']) && count($footer_widgets['footer-widgets']) > absint(wm_option('skin-footer-widgets-layout'))) { $masonry_class = ' masonry-enabled'; } $output[10] = "\r\n\r\n" . '<div class="footer-widgets clearfix columns-' . $columns . $masonry_class . '" data-columns="' . $columns . '">'; $output[10] .= wm_option('skin-footer-shadow') ? '<img src="' . wm_get_stylesheet_directory_uri('assets/img/shadow-bottom.png') . '" alt="" class="footer-shadow" />' : ''; $output[10] .= apply_filters('wmhook_section_inner_wrappers', ''); $output[10] .= $widget_area; $output[10] .= apply_filters('wmhook_section_inner_wrappers_close', ''); $output[10] .= "\r\n" . '</div>' . "\r\n"; } } //Credits if ('widgets' !== wma_meta_option('footer', $post_id)) { $output[20] = wm_credits(); } //Top of page button $output[30] = '<a href="#top" class="top-of-page" title="' . __('Back to top of the page', 'mustang') . '"></a>'; //Output $output = apply_filters('wmhook_wm_section_footer_output', $output); echo implode('', $output); }