Skip to content

Commit

Permalink
Move privacy link outside credit link conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagonoronha committed Jul 4, 2019
1 parent 8d64bc0 commit ef5bb52
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions inc/storefront-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,23 @@ function storefront_footer_widgets() {
* @return void
*/
function storefront_credit() {
$links_output = '';

if ( apply_filters( 'storefront_credit_link', true ) ) {
$links_output .= '<a href="https://woocommerce.com" target="_blank" title="' . esc_attr__( 'WooCommerce - The Best eCommerce Platform for WordPress', 'storefront' ) . '" rel="author">' . esc_html__( 'Built with Storefront &amp; WooCommerce', 'storefront' ) . '</a>.';
}

if ( apply_filters( 'storefront_privacy_policy_link', true ) && function_exists( 'the_privacy_policy_link' ) ) {
$separator = '<span role="separator" aria-hidden="true"></span>';
$links_output = get_the_privacy_policy_link( '', ( ! empty( $links_output ) ? $separator : '' ) ) . $links_output;
}
?>
<div class="site-info">
<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '&copy; ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?>
<?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?>
<br />
<?php
if ( apply_filters( 'storefront_privacy_policy_link', true ) && function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<?php echo '<a href="https://woocommerce.com" target="_blank" title="' . esc_attr__( 'WooCommerce - The Best eCommerce Platform for WordPress', 'storefront' ) . '" rel="author">' . esc_html__( 'Built with Storefront &amp; WooCommerce', 'storefront' ) . '</a>.'; ?>

<?php if ( ! empty( $links_output ) ) { ?>
<br />
<?php echo wp_kses_post( $links_output ); ?>
<?php } ?>
</div><!-- .site-info -->
<?php
Expand Down

0 comments on commit ef5bb52

Please sign in to comment.