Storefront é o tema padrão do plugin para WordPress, WooCommerce. É perfeito para gerenciar eCommerce porém tem um incoveniente. A versão gratuita não permite alterar o crédito no rodapé do site, que sempre remete ao fabricante. Neste tutorial vou explicar como alterar o texto nos créditos.
Localize o arquivo “storefront-template-functions.php” que fica no diretório “/wp-content/themes/storefrom/inc”.


Localize a função “storefront_credit” e altere a variável “$links_output” que aparece na linha 142 e 144 e altere os parâmetros que se referem ao endereço do site do WooCommerce e as suas propagandas:
- https://woocommerce.com
- WooCommerce – The Best eCommerce Platform for WordPress
- Built wiht Storefront & WooCommerce
- https://woocommerce.com/storefront
- Storefront – The perfect platform for your next WooCommerce project.
- Built with Storefront
if ( ! function_exists( 'storefront_credit' ) ) {
/**
* Display the theme credit
*
* @since 1.0.0
* @return void
*/
function storefront_credit() {
$links_output = '';
if ( apply_filters( 'storefront_credit_link', true ) ) {
if ( storefront_is_woocommerce_activated() ) {
$links_output .= '<a href="https://woocommerce.com" target="_blank" title="' . esc_attr__( 'WooCommerce - The Best eCommerce Platform for WordPress', 'storefront' ) . '" rel="noreferrer">' . esc_html__( 'Built with Storefront & WooCommerce', 'storefront' ) . '</a>.';
} else {
$links_output .= '<a href="https://woocommerce.com/storefront/" target="_blank" title="' . esc_attr__( 'Storefront - The perfect platform for your next WooCommerce project.', 'storefront' ) . '" rel="noreferrer">' . esc_html__( 'Built with Storefront', '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;
}
$links_output = apply_filters( 'storefront_credit_links_output', $links_output );
?>
<div class="site-info">
<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '© ' . get_bloginfo( 'name' ) . ' ' . gmdate( 'Y' ) ) ); ?>
<?php if ( ! empty( $links_output ) ) { ?>
<br />
<?php echo wp_kses_post( $links_output ); ?>
<?php } ?>
</div><!-- .site-info -->
<?php
}
}
No meu caso, o arquivo alterado ficou assim:
if ( ! function_exists( 'storefront_credit' ) ) {
/**
* Display the theme credit
*
* @since 1.0.0
* @return void
*/
function storefront_credit() {
$links_output = '';
if ( apply_filters( 'storefront_credit_link', true ) ) {
if ( storefront_is_woocommerce_activated() ) {
$links_output .= '<a href="https://larsoft.com.br" target="_blank" title="' . esc_attr__( 'Larsoft Informágica', 'storefront' ) . '" rel="noreferrer">' . esc_html__( 'Website desenvolvido por Larsoft Informágica', 'storefront' ) . '</a>.';
} else {
$links_output .= '<a href="https://www.larsoft.com.br/websites-e-sistemas-web/" target="_blank" title="' . esc_attr__( 'Larsoft Informágica - Faça seu website conosco.', 'storefront' ) . '" rel="noreferrer">' . esc_html__( 'Desenvolvido por Larsoft Informágica', '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;
}
$links_output = apply_filters( 'storefront_credit_links_output', $links_output );
?>
<div class="site-info">
<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '© ' . get_bloginfo( 'name' ) . ' ' . gmdate( 'Y' ) ) ); ?>
<?php if ( ! empty( $links_output ) ) { ?>
<br />
<?php echo wp_kses_post( $links_output ); ?>
<?php } ?>
</div><!-- .site-info -->
<?php
}
}
Se você achou esse conteúdo útil ou relevante considere assinar este blog e me seguir nas redes sociais.