Wordpress网站红色Bug显示在顶部,我有一条错误消息:
NOTICE: wp-includes/functions.php:5313 - WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/twentyseventeen/index.php'), get_header, locate_template, load_template, require_once('/themes/twentyseventeen/header.php'), wp_head, do_action('wp_head'), WP_Hook->do_action, WP_Hook->apply_filters, wp_enqueue_scripts, do_action('wp_enqueue_scripts'), WP_Hook->do_action, WP_Hook->apply_filters, ClefUserSettings->register_assets, wp_localize_script, WP_Scripts->localize, _doing_it_wrong, trigger_error.我试图停用插件的麻烦解决模式时,有网站网页问题,不显示或联系形式不工作。我认为这是当时出现的调试消息,我也取消了我的SSL我的错误,虽然TSOhost说在他们的结尾有问题。我是网站创建的新手。WPress主题theme 17的很多问题。我能做点什么吗?
发布于 2021-03-12 12:37:06
WordPress函数wp_localize_script()用于将翻译后的字符串提供给Javascript端。
您所看到的通知是由于您使用wp_localize_script()的插件之一,并作为第三个参数传入一个非数组。
你用的是“单一标志”插件吗?如果是这样的话,看看是否暂时禁用这会使通知消失。如果是的话,这就是问题的根源。
https://wordpress.stackexchange.com/questions/384966
复制相似问题