Вот код в файле functions.php, который нужно изменить, чтобы убрать защиту от удаления ссылок в футере:
function mytheme_admin_register() {
global $themename, $shortname, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'save' == $_REQUEST['action'] ) {
foreach ($options as $value) {
update_option( $value['id'], $_REQUEST[ $value['id'] ] ); }
foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
header("Location: themes.php?page=functions.php&saved=false");
die;
} else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
delete_option( $value['id'] ); }
header("Location: themes.php?page=functions.php&reset=false");
die;
}
}
add_theme_page($themename." настройки", "Настройки темы", 'edit_themes', basename(__FILE__), 'mytheme_admin_panel');
}
function mytheme_admin_head() { ?>
<link href="<?php bloginfo('template_directory'); ?>/css/admin-panel.css" rel="stylesheet" type="text/css" />
<?php }
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 "<meta http-equiv=\"refresh\" content=\"0;url=$theme_credit_false\">"; exit();
} else {
$rk_url = get_bloginfo('template_directory');
$homepage = get_bloginfo('home');
echo ("<div style=\"width:800px; margin:auto; padding:15px; text-align:center; background-color:#FFFFFF; border:5px solid #FF0000; color:#000000\">");
echo ("<div><img src=\"$rk_url/images/mess.jpg\" alt=\"Error\" /></div>");
echo ("<div style=\"font-size:36px;\"><b>Opps..You Have Modified The Footer Links..</b></div>");
echo ("<div style=\"font-size:15px;\"><b>This Theme Is Released Free For Use Under Creative Commons Licence. All Links In The Footer Must Remain Intact AS IS. Please Appreciate These Supporters Effort In Providing You This Great Theme For Free.</b></div>");
echo ("<div style=\"font-size:14px; padding-top:20px;\"><b>Please Follow These Steps To Restore The Footer: <ol><li>Please FTP inside the theme folder and open the includes folder, you'll find footer.txt inside</li><li>Copy & paste it to the theme root folder and rename it to footer.php to overwrite the current footer.php you've modified.</li><li>Finally, refresh your page <a href=\"$homepage\">HERE</a> to go back to your homepage.</li></ol></b></div></div>");
}
}
function check_theme_footer(){}
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');
error_reporting('^ E_ALL ^ E_NOTICE');
ini_set('display_errors', '0');
error_reporting(E_ALL);
ini_set('display_errors', '0');