質問

I would like to protect my footer copyrights in my templates, because some people has removed it. I saw in some templates some encrypted code with copyrights, and when I delete it - template doesn't work. How I can do that in my templates?

役に立ちましたか?

解決

You really can't prevent them from being deleted. What you could do is encode your functions.php file (given that you have some functions in there that you know the user will want to preserve, and then add a function like this:

   add_action('wp_footer', 'copyright');
   function copyright{

   $copyright_notice = "YOUR COPYRIGHT CODE";

   echo $copyright_notice;

   }

Then you can encode the functions.php file using an online tool like this, and the user, unless he is good at reverse engineering, will not be able to remove the copyright notice.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top