[wordpress插件] Disable WP_DEBUG禁用WP_DEBUG

wordpress 插件 文章 2020-04-18 18:31 776 0 全屏看文

AI助手支持GPT4.0

评分
20
描述

If you are a WordPress plugin or theme developer, you know you should be running with WP_DEBUG set to true

如果您是WordPress插件或主题开发人员,则知道应该在WP_DEBUG设置为true的情况下运行

in the wp-config.php file.

在wp-config.php文件中。

But apparently other developers don’t, and you end up with PHP error output

但是显然其他开发人员却没有,您最终会得到PHP错误输出

generated by these other plugins.

由其他插件生成。

This plugin will make your life a bit easier.

此插件将使您的生活更加轻松。

Leave WP_DEBUG set to true like you should.

像您应该将WP_DEBUG设置为true一样。

Then if you need to do

那如果你需要做

some testing with a different theme or plugin that is generateing PHP errors, you can disable that output

使用产生PHP错误的其他主题或插件进行的一些测试,您可以禁用该输出

with a simple click in this plugin instead of having to edit your wp-config.php file.

只需单击此插件即可,而无需编辑wp-config.php文件。

安装步骤

It is easiest to use the Plugin Add Plugin page, but you can do it manually, too:

使用“插件添加插件”页面最简单,但是您也可以手动进行操作:

    1. Download the plugin archive and expand it
    2. 下载插件档案并展开

    3. Upload the weaver-ii-theme-switcher.php file to your wp-content/plugins/weaver-ii-theme-switcher directory
    4. 将weaver-ii-theme-switcher.php文件上传到您的wp-content / plugins / weaver-ii-theme-switcher目录

    5. Go to the Plugins page in your WordPress Administration area and click ‘Activate’ for Weaver II Theme Switcher.
    6. 转到WordPress管理区域中的“插件”页面,然后为Weaver II主题切换器单击“激活”。

下载地址
https://downloads.wordpress.org/plugin/disable-wp-debug.zip
-EOF-

AI助手支持GPT4.0