Hello everyone! 🙂
Thanks for your continued help and support! I now have this:
<?php
if ( function_exists('register_sidebar') )
register_sidebar();
//remove html tag when saving comments
function preprocess_comment_striptags($commentdata) {
$commentdata['comment_content'] = strip_tags($commentdata['comment_content']);
return $commentdata;
}
add_filter('preprocess_comment', 'preprocess_comment_striptags');
// remove html tag when showing comments
function comment_text_striptags($string) {
return strip_tags($string);
}
add_filter('comment_text', 'comment_text_striptags');
if(!function_exists('get_sidebars')) {
{
function get_sidebars();
}
?>
And the error message I get is this:
Parse error: syntax error, unexpected ';', expecting '{' in /home/XXXX/XXXX.com/wp-content/themes/XXXX/functions.php on line 21
Again - any help would be greatly appreciated as I'm sure I'm so close to cracking this!
Paul
To be honest, the whole file was hacked and looks like the mess it is below, and all I wanted to do was to get it back to it's original state:
<?php
eval(base64_decode('aWYgKCFlbXB......7IH0gfQ=='));
if ( function_exists('register_sidebar') )
register_sidebar();
eval(base64_decode('ZnVuY3Rpb24g......yKCk7'));
//remove html tag when saving comments
function preprocess_comment_striptags($commentdata) {
$commentdata['comment_content'] = strip_tags($commentdata['comment_content']);
return $commentdata;
}
eval(base64_decode('ZnVuY3Rpb24......gfSB9'));
add_filter('preprocess_comment', 'preprocess_comment_striptags');
eval(base64_decode('ZnVuY3Rpb2......SB9'));
// remove html tag when showing comments
function comment_text_striptags($string) {
return strip_tags($string);
}
eval(base64_decode('ZnVuY3Rpb24.......H0gfQ=='));
add_filter('comment_text', 'comment_text_striptags');
if(!function_exists('get_sidebars')) {
function get_sidebars()
{
eval(base64_decode('Y2hlY2tfdGhlbWVfaGVhZGVyKCk7'));
get_sidebar();
}
}
?>
All I've been trying to do is to strip out the malicious coding,(in red). If that helps to see what I've been trying to do - the I hope a knight, (or knightess? 🙂 ) in shining armour will swing by here and "put me right" on what the correct coding should be.
And a sincere thanks to all concerned here. I know it must be a pain for people like myself dropping in out of nowhere and shouting "HELP!" - but you are the experts here, and I appreciate the time and effort you make on the forum helping folks like me.