df58
Forum Replies Created
-
Thanks – I think you have found the issue!
Many years ago I would have installed WordPress (and associated themes) from my hosting company’s Software Library. I should think since then it will all have been over-written by official up-dates (certainly Classic 1.6 is reasonably recent).
My functions.php reads:
<?php /** * @package WordPress * @subpackage Classic_Theme */ add_theme_support( 'automatic-feed-links' ); /** Below: lines recommended by https://www.sitepoint.com/ways-to-keep-your-wordpress-site-secure/ */ /** 6. Hide the WordPress Version Number */ remove_action('wp_head', 'wp_generator'); /** 26. Remove Error Messages from Your Login Page */ add_filter('login_errors',create_function('$a', "return null;")); /** 28. Hide Author Usernames */ add_action('template_redirect', 'bwp_template_redirect'); function bwp_template_redirect() { if (is_author()) { wp_redirect( home_url() ); exit; } } /** Above: lines recommended by https://www.sitepoint.com/ways-to-keep-your-wordpress-site-secure/ */ if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<li id="%1$s" class="widget %2$s">', 'after_widget' => '</li>', 'before_title' => '', 'after_title' => '', )); ?>
Pretty obviously I have got an extra bit “added in” – checking the claimed source, it looks legit (even if unexplained). The source post-dates my original installation – so it won’t be my hosting company. I don’t recall editing it; my php knowledge is at least 20 years out-of-date and I don’t like the idea of maintaining “personal changes” through update processes – seen too many burn their fingers doing that – I would rather rely on staying “vanilla” with regular official updates.
So short term it looks as if I should restore functions.php to “vanilla as downloaded”. The question then is “do the ‘Sitepoint’ code changes look worth officially updating and maintaining?
I need to check whether any of the other ‘Sitepoint’ code changes are in my installation.
For future reference is the specific code issue in my OP due to php being due to becoming stricter about certain aspects of syntax?
thanks
David