PHP Fatal error: Uncaught Error: Call to undefined function wp_underscore_audio_template() in /wordpress/core/4.8/wp-includes/widgets/class-wp-widget-media-audio.php:201
Stack trace:
#0 /floorcaresupplies/wp-content/plugins/siteorigin-panels/inc/admin.php(785): WP_Widget_Media_Audio->render_control_template_scripts()
#1 /wordpress/core/4.8/wp-includes/class-wp-hook.php(298): SiteOrigin_Panels_Admin->js_widget_templates(\'\')
#2 /wordpress/core/4.8/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(\'\', Array)
#3 /wordpress/core/4.8/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /wordpress/core/4.8/wp-admin/admin-footer.php(99): do_action(\'admin_footer-po...\')
#5 /wordpress/core/4.8/wp-admin/post.php(292): include(\'/wordpress/core...\')
#6 {main}
thrown in /wordpress/core/4.8/wp-includes/widgets/class-wp-widget-media-audio.php on line 201
有人知道如何解决这个错误吗?我在激活网站源页面生成器插件时,以及在woocommerce中点击任何东西时,都会收到它
在以下代码行中,一旦注释掉错误,它就会正常工作
/**
* Need to render templates for new WP 4.8 widgets when not on the \'widgets\' screen or in the customizer.
*/
function js_widget_templates() {
$screen = get_current_screen();
if ( $screen->base != \'widgets\' ) {
global $wp_widget_factory;
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
if ( method_exists( $widget_obj, \'render_control_template_scripts\' ) ) {
$widget_obj->render_control_template_scripts();
}
}
}
}