'
', 'close' => '
', 'context' => 'footer-widget-area', 'content' => $widgets, 'echo' => false, 'params' => array( 'column' => $counter, 'count' => $footer_widgets, ), ) ); } $counter++; } if ( $inside ) { $_inside = genesis_structural_wrap( 'footer-widgets', 'open', 0 ); $_inside .= $inside; $_inside .= genesis_structural_wrap( 'footer-widgets', 'close', 0 ); $output .= genesis_markup( array( 'open' => '
' . genesis_sidebar_title( 'Footer' ), 'close' => '
', 'content' => $_inside, 'context' => 'footer-widgets', 'echo' => false, ) ); } echo apply_filters( 'genesis_footer_widget_areas', $output, $footer_widgets ); } add_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); /** * Echo the opening div tag for the footer. * * Also optionally adds wrapping div opening tag. * * @since 1.2.0 */ function genesis_footer_markup_open() { genesis_markup( array( 'open' => '', 'context' => 'site-footer', ) ); } add_filter( 'genesis_footer_output', 'do_shortcode', 20 ); add_action( 'genesis_footer', 'genesis_do_footer' ); /** * Echo the contents of the footer. * * Execute any shortcodes that might be present. * * Applies `genesis_footer_backtotop_text`, `genesis_footer_creds_text` and `genesis_footer_output` filters. * * For HTML5 themes, only the credits text is used (back-to-top link is dropped). * * @since 1.0.1 */ function genesis_do_footer() { // Build the text strings. Includes shortcodes. $backtotop_text = '[footer_backtotop]'; $creds_text = sprintf( '[footer_copyright before="%s "] · [footer_childtheme_link before="" after=" %s"] [footer_genesis_link url="https://www.studiopress.com/" before=""] · [footer_wordpress_link] · [footer_loginout]', __( 'Copyright', 'genesis' ), __( 'on', 'genesis' ) ); // Filter the text strings. $backtotop_text = apply_filters( 'genesis_footer_backtotop_text', $backtotop_text ); $creds_text = apply_filters( 'genesis_footer_creds_text', $creds_text ); $backtotop = $backtotop_text ? sprintf( '

%s

', $backtotop_text ) : ''; $creds = $creds_text ? sprintf( '

%s

', $creds_text ) : ''; $output = $backtotop . $creds; // Only use credits if HTML5. if ( genesis_html5() ) { $output = '

' . genesis_strip_p_tags( $creds_text ) . '

'; } echo apply_filters( 'genesis_footer_output', $output, $backtotop_text, $creds_text ); } add_filter( 'genesis_footer_scripts', 'do_shortcode' ); add_action( 'wp_footer', 'genesis_footer_scripts' ); /** * Echo the footer scripts, defined in Theme Settings. * * Applies the `genesis_footer_scripts` filter to the value returns from the footer_scripts option. * * Also outputs page-specific body scripts if their position is set to 'bottom'. * * @since 1.1.0 */ function genesis_footer_scripts() { echo apply_filters( 'genesis_footer_scripts', genesis_get_option( 'footer_scripts' ) ); if ( ! is_singular() ) { return; } if ( 'top' != genesis_get_custom_field( '_genesis_scripts_body_position' ) ) { genesis_custom_field( '_genesis_scripts_body' ); } }