定制 rarst/wps 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rarst/wps

最新稳定版本:1.2

Composer 安装命令:

composer require rarst/wps

包简介

WordPress plugin for whoops error handler.

README 文档

README

Scrutinizer Code Quality Latest Stable Version Total Downloads PHP version Download wps

wps adds whoops error handler to a WordPress installation.

It makes error messages from PHP, admin-ajax.php, and WP REST API a great deal more clear and convenient to work with.

Installation

Composer (recommended) Release archive
composer require rarst/wps Download wps

Usage

The plugin is meant strictly for development and will only work with WP_DEBUG and WP_DEBUG_DISPLAY configuration constants enabled.

Silence errors

whoops can definitely get noisy with a lot of low–grade errors.

Silence errors for irrelevant locations to keep it practical and productive.

Silence for URL

Use ?wps_disable query argument in the URL to temporarily disable whoops.

Silence for path

Use regular expressions to match source file paths and error constants to configure what should be silenced.

This can be called multiple times and/or array of paths can be provided.

Note that the direction of slashes needs to match operating system or write your regexes to match either.

global $wps;

// Silence notices and warnings for any path. 
$wps['run']->silenceErrorsInPaths( '~.*~', E_NOTICE | E_WARNING );

// Silence for specific directory.
$wps['run']->silenceErrorsInPaths( '~/wp-admin/~', E_NOTICE | E_WARNING );

// Silence _except_ specific directory.
$wps['run']->silenceErrorsInPaths( '~^((?!/my-plugin/).)*$~', E_NOTICE | E_WARNING );

// Silence for plugins _except_ specific plugin.
$wps['run']->silenceErrorsInPaths( '~/wp-content/plugins/(?!my-plugin)~', E_NOTICE | E_WARNING );

License

MIT

统计信息

  • 总下载量: 130.5k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 129
  • 点击次数: 2
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 128
  • Watchers: 9
  • Forks: 16
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-07