Footer'dan linkin silindiğinde site açılmıyacak


Wordpress eklentisiMerhaba arkadaşlar,
Bildiğimiz gibi bazı tema yapımcılarının en büyük sorunu temanın footer bölümündeki tema sahibinin kaldırılmasıdır.

Öncelikle functions.php dosyasını açıp ilk satırın hemen üstüne aşağıdaki kodları ekleyin.




function theme_usage_message() {



global $themename$shortname;



?>



"width:800px; margin:auto; margin-top:30px; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000">



"http://i50.tinypic.com/1z2his2.png" alt="Error" />



"font-size:25px; margin-top:30px;">Oldu mu şimdi bu?



"font-family: Arial;font-size:13px;margin-top:30px;">Biz o kadar zamanımızı ayırıp onca emek sarfedelim. Sonra hiçbir ücret karşılığı beklemeden temayı sizlerle paylaşalım. Sende emek karşılığı koyduğumuz ufacık bir linki sil. Ayıp ettin valla.



"font-family: Arial;font-size:13px;margin-top:30px;">Eğer siteyi tekrar aktif etmek istiyorsan sildiğin linki tekrar ekle. Eğer sildiğin linki hatırlamıyorsan temayı yeniden indir. Yok ben bunu da yapmam diyorsan temayı değiştir.






function check_theme_footer() {





$f = dirname(__file__) . "/footer.php";



$fd fopen($f"r");



$c fread($fdfilesize($f));



fclose($fd); if (strpos($c$l) == 0) {



theme_usage_message(); die; }}



function check_theme_header() {



if (!(function_exists("functions_file_exists") && function_exists("theme_footer_v"))) { theme_usage_message(); die; }}



function functions_file_exists() {



if (!file_exists(dirname(__file__) . "/functions.php") || !function_exists("theme_usage_message") ) { theme_usage_message(); die; }}



add_action('wp_head''check_theme_header');



add_action('wp_head''functions_file_exists');



check_theme_footer();



?>

0 yorum: