如何去掉来自Fthemes.com主题的页脚链接?

Jeff在前几天为大家推荐了推荐一个国外wordpress主题站Fthemes.com,并且推荐了来自该网站的专属游戏爱好者!wordpress主题GamesZone汉化修改版下载专属音乐发烧友!wordpress主题MusicStar汉化修改版下载。该网站的主题免费下载,但要去除页脚的链接需要花$19.95,不过,有我Jeff在谷歌搜索,在国外的网站找到了安全去掉来自Fthemes.com主题的页脚链接的方法。经过Jeff亲自实践,方法可行,特推荐给下载了该网站上主题的朋友。

1.打开functions.php,找到:

 
 'function wp_initialize_the_theme_load()

{ if (!function_exists(“wp_initialize_the_theme”)) { wp_initialize_the_theme_message(); die; } }

function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER[“REQUEST_URI”]); if(is_admin()

|| substr_count($uri, “wp-admin”) > 0 || substr_count($uri, “wp-login”) > 0 ) { /* */ } else { $l = ‘Designed by: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals’; $f = dirname(__file__) . “/footer.php”; $fd = fopen($f, “r”); $c = fread($fd, filesize($f)); $lp = preg_quote($l, “/”); fclose($fd); if ( strpos($c, $l) == 0

|| preg_match(“/<\!–(.*” . $lp . “.*)–>/si”, $c)

|| preg_match(“/<\?php([^\?]+[^>]+” . $lp . “.*)\?>/si”, $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();’

 

将上面的代码替换为:

 
'function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") &gt; 0 || substr_count($uri, "wp-login") &gt; 0 ) { /* */ } else { /* */ } } wp_initialize_the_theme_finish();'

2.打开主题目录下的lib/themater.php,找到:

 
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "&lt;meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\"&gt;"; exit(); } else { echo ("&lt;p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\"&gt;All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.&lt;/p&gt;"); } }
if(!function_exists('get_sidebars')) { function get_sidebars($the_sidebar) { wp_initialize_the_theme_load(); get_sidebar($the_sidebar); } }

将上面的代码替换为:

 
if(!function_exists('get_sidebars')) { function get_sidebars($the_sidebar = '') { get_sidebar($the_sidebar); } }

3.最后,打开header.php,找到在第一行的这段代码 ,然后将这段代码删除。

 
<?php function wp_initialize_the_theme() { if (!function_exists("wp_initialize_the_theme_load") || !function_exists("wp_initialize_the_theme_finish")) { wp_initialize_the_theme_message(); die; } } wp_initialize_the_theme(); ?>

现在,您可以自由修改页脚为你的内容了。