Wordpress Tesseract主题页脚版权

时间:2017-10-15 22:03:31

标签: php wordpress copyright-display

我使用Wordpress Tesseract主题构建网站,我想更改版权。我使用查找和替换插件,但我想通过更改代码正确地做到这一点。 我搜索了它,我发现代码我必须在functions.php文件中更改。 但我不明白代码,我不确定我是否只是改变版权"如果它确实有效,那么我需要一些帮助。

function tesseract_footer_branding_output(){

//$str_foobclass = str_rot13(implode('',array('q','r','f','v','t','a','r','e')));
$str_foobclass = 'designer';

//$str_foobid = str_rot13(implode('',array('s','b','b','g','r','e','-','o','n','a','a','r','e','-','e','v','t','u','g')));
$str_foobid = 'footer-banner-right';

//$str_foobtby = str_rot13(implode('',array('G','u','r','z','r',' ','o','l',' ','%','f')));
$str_foobtby = 'Theme by %s';

//$str_foobturl = str_rot13(implode('',array('g','r','f','f','r','e','n','p','g','g','u','r','z','r','.','p','b','z')));
$str_foobturl = 'tesseracttheme.com';

//$str_foobtdis = str_rot13(implode('',array('G','r','f','f','r','e','n','p','g')));
$str_foobtdis = 'Tesseract';

echo '<div id="'.$str_foobid.'" class="'.$str_foobclass.'"><div class="table"><div class="table'.'-cell"><strong>';


/*if(stristr(__( $str_foobtby, 'tesseract' ),'%s') === false){

    echo '<a href="http://'.$str_foobturl.'">'.sprintf( __( $str_foobtby, 'tesseract' ),$str_foobtdis).'</a>';

}else{

    // if changes in language file
    echo '<a href="http://'.$str_foobturl.'">'.sprintf( $str_foobtby,$str_foobtdis).'</a>';

}*/

if(stristr(__( 'Theme by %s', 'tesseract' ),'%s') === false){

    echo '<a href="https://'.$str_foobturl.'">'.sprintf( __( 'Theme by %s', 'tesseract' ),$str_foobtdis).'</a>';

}else{

    // if changes in language file
    echo '<a href="https://'.$str_foobturl.'">'.sprintf( 'Theme by %s',$str_foobtdis).'</a>';

}

functions.php code

如您所见,在屏幕截图中,如果我更改&#34;主题由%s&#34;,&#39; tesseracttheme.com&#39;,&#39; Tesseract&,在第796行,第799行和第802行#39;,类似于&#34; Copyright 2017 myname&#34;会没事吗?

我不理解数组的含义以及这些行的确切情况。

1 个答案:

答案 0 :(得分:0)

您应该只需更改脚本顶部设置的变量值以满足您的需求,因为这些变量在代码中较低。然而...

  1. 检查以确保这符合您对此主题的许可。
  2. 如果您要更改主题的functions.php文件,请从中创建一个child theme,如果您升级该主题,则可以改变该问题或者您将遇到问题。
相关问题