我通过插件All-in-One WP Migration将离线wordpress定制Web模板迁移到在线服务器。除自定义控制面板外,其他所有功能均正常。调试日志中有致命错误:
[09-Nov-2018 11:56:41 UTC] PHP Fatal error: Uncaught Error: Class 'WP_Customize_Code_Editor_Control' not found in /wp-includes/class-wp-customize-manager.php:5317
Stack trace:
#0 wp-includes/class-wp-hook.php(286): WP_Customize_Manager->register_controls(Object(WP_Customize_Manager))
#1 wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#2 wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#3 wp-includes/class-wp-customize-manager.php(926): do_action('customize_regis...', Object(WP_Customize_Manager))
#4 wp-includes/class-wp-hook.php(286): WP_Customize_Manager->wp_loaded('')
#5 wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#6 wp-includes/class-wp-customize-manager.php on line 5317
我尝试了一些.htaccess问题,增加上传内存,停用所有插件或使用原始wp安装文件覆盖class-wp-customize-manager.php。
什么都没有。
有什么主意吗?预先非常感谢。
答案 0 :(得分:0)
您必须在绑定到“ customize_register”操作的函数中定义自定义功能类,因为仅当使用主题定制程序时才加载WP_Customize_Control类。 示例代码:
add_action( 'customize_register', 'my_customize_register' );
function my_customize_register($wp_customize) {
//class definition must be within my_customie_register function
class your_customize_fuction extends WP_Customize_Control { ... }
}