更新了WordPress,“无法重新声明has_shortcode”错误被抛出[关闭]

Fatal error: Cannot redeclare has_shortcode() (previously declared in /home/content/86/9216686/html/wordpress/wp-includes/shortcodes.php:153) in /home/content/86/9216686/html/wordpress/wp-content/themes/options/framework/functions/common.php on line 23

The function has_shortcode was introduced in WordPress 3.6, you probably updated from an earlier version.

enter image description here

Now the theme is trying to use a reserved function. Meaning: the theme is outdated, solutions:

  • update to a newer version of the theme.
  • contact the author and report.
  • encapsulate the theme function (wp-content/themes/options/framework/functions/common.php) with

    if( !function_exists( 'has_shortcode' ) )
    {
        function has_shortcode() 
        {
            // THE THEME CODE
        }
    }