Created
November 28, 2019 02:16
-
-
Save braddalton/9e3be03fdaa9855aeb425870b6309be0 to your computer and use it in GitHub Desktop.
genesis_footer_output filter https://wp.me/p1lTu0-iLf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_footer_output', 'filter_genesis_footer_output' ); | |
function filter_genesis_footer_output() { | |
// 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( '<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; | |
if ( genesis_html5() ) { | |
$output = '<p>' . genesis_strip_p_tags( $creds_text ) . '</p>'; | |
} | |
return $output; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment