Home › Forums › Back End › [Solved] Remove irrelevant links from footer.php › Re: [Solved] Remove irrelevant links from footer.php
March 14, 2011 at 12:11 pm
#55637
TT_Mark
Member
if (!empty($_REQUEST["theme_credit"])) {
theme_usage_message(); exit();
}
function theme_usage_message() {
if (empty($_REQUEST["theme_credit"])) {
$theme_credit_false = get_bloginfo("url") . "/index.php?theme_credit=false";
echo ""; exit();
} else {
$rk_url = get_bloginfo('template_directory');
$homepage = get_bloginfo('home');
echo ("");
echo ("");
echo ("Opps..You Have Modified The Footer Links..");
echo ("This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. These Links Are All Family Friendly And Will Not Hurt Your Site In Any Way. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.");
echo ("Please Follow These Steps To Restore The Footer: - Please open the default folder, you'll find footer.php inside
- Copy & paste it to overwrite the current footer.php you've modified.
- Finally, refresh your page HERE to go back to your homepage.
");
}
}
function check_theme_footer() {
$l = 'WordPress Theme By MagPress
Thanks To NHS Hospital Jobs | NHS Nurse Training | NHS Jobs London';
$f = dirname(__file__) . "/footer.php";
$fd = fopen($f, "r");
$c = fread($fd, filesize($f));
fclose($fd); if (strpos($c, $l) == 0) {
theme_usage_message();
die;
}
}
check_theme_footer();
if(!function_exists('get_sidebar')) {
function get_sidebar() {
check_theme_header();
get_sidebar();
}
}
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');