| Server IP : 194.30.32.123 / Your IP : 216.73.216.89 Web Server : Apache System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64 User : ftpbegirale ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /expert/htwebs/www.begirale.com/public/wp-content/themes/genesis/lib/structure/ |
Upload File : |
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Genesis\Footer
* @author StudioPress
* @license GPL-2.0+
* @link http://my.studiopress.com/themes/genesis/
*/
add_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
/**
* Echo the markup necessary to facilitate the footer widget areas.
*
* Check for a numerical parameter given when adding theme support - if none is found, then the function returns early.
*
* The child theme must style the widget areas.
*
* Applies the `genesis_footer_widget_areas` filter.
*
* @since 1.6.0
*
* @return null Return early if number of widget areas could not be determined,
* or nothing is added to the first widget area.
*/
function genesis_footer_widget_areas() {
$footer_widgets = get_theme_support( 'genesis-footer-widgets' );
if ( ! $footer_widgets || ! isset( $footer_widgets[0] ) || ! is_numeric( $footer_widgets[0] ) )
return;
$footer_widgets = (int) $footer_widgets[0];
// Check to see if first widget area has widgets. If not, do nothing. No need to check all footer widget areas.
if ( ! is_active_sidebar( 'footer-1' ) )
return;
$inside = '';
$output = '';
$counter = 1;
while ( $counter <= $footer_widgets ) {
// Darn you, WordPress! Gotta output buffer.
ob_start();
dynamic_sidebar( 'footer-' . $counter );
$widgets = ob_get_clean();
if ( $widgets ) {
$inside .= sprintf( '<div class="footer-widgets-%d widget-area">%s</div>', $counter, $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' => '<div %s>' . genesis_sidebar_title( 'Footer' ),
'close' => '</div>',
'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' => '<footer %s>',
'context' => 'site-footer',
) );
genesis_structural_wrap( 'footer', 'open' );
}
add_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
/**
* Echo the closing div tag for the footer.
*
* Also optionally adds wrapping div closing tag.
*
* @since 1.2.0
*/
function genesis_footer_markup_close() {
genesis_structural_wrap( 'footer', 'close' );
genesis_markup( array(
'close' => '</footer>',
'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="http://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( '<div class="gototop"><p>%s</p></div>', $backtotop_text ) : '';
$creds = $creds_text ? sprintf( '<div class="creds"><p>%s</p></div>', $creds_text ) : '';
$output = $backtotop . $creds;
// Only use credits if HTML5.
if ( genesis_html5() )
$output = '<p>' . $creds_text . '</p>';
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.
*
* @since 1.1.0
*/
function genesis_footer_scripts() {
echo apply_filters( 'genesis_footer_scripts', genesis_option( 'footer_scripts' ) );
}