首页 文章

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

提问于
浏览
-2

致命错误:无法重新声明has_shortcode()(之前在/home/content/86/9216686/html/wordpress/wp-includes/shortcodes.php:153中声明)/ home / content / 86/9216686 / html / wordpress /第23行的wp-content / themes / options / framework / functions / common.php

1 回答

  • 1

    函数 has_shortcode 是在WordPress 3.6中引入的,您可能从早期版本更新 .

    enter image description here

    现在主题是尝试使用保留功能 . 含义:主题已过时,解决方案:

    • 更新为主题的较新版本 .

    • 联系作者并报告 .

    • 用主题函数封装主题函数(wp-content / themes / options / framework / functions / common.php)

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

相关问题