2017 © Pedro Peláez
 

wordpress-plugin wps

WordPress plugin for whoops error handler.

image

rarst/wps

WordPress plugin for whoops error handler.

  • Monday, February 5, 2018
  • by Rarst
  • Repository
  • 6 Watchers
  • 53 Stars
  • 6,304 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 26 % Grown

The README.md

wps — WordPress plugin for whoops

Scrutinizer Code Quality Latest Stable Version Total Downloads PHP version Download wps, (*1)

wps adds whoops error handler to a WordPress installation., (*2)

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

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., (*4)

Silence errors

whoops can definitely get noisy with a lot of low–grade errors., (*5)

Silence errors for irrelevant locations to keep it practical and productive., (*6)

Silence for URL

Use ?wps_disable query argument in the URL to temporarily disable whoops., (*7)

Silence for path

Use regular expressions to match source file paths and error constants to configure what should be silenced., (*8)

This can be called multiple times and/or array of paths can be provided., (*9)

Note that the direction of slashes needs to match operating system or write your regexes to match either., (*10)

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, (*11)

The Versions

05/02 2018

dev-master

9999999-dev https://github.com/Rarst/wps

WordPress plugin for whoops error handler.

  Sources   Download

MIT

The Requires

 

wordpress error whoops

27/10 2017

1.1

1.1.0.0 https://github.com/Rarst/wps

WordPress plugin for whoops error handler.

  Sources   Download

MIT

The Requires

 

wordpress error whoops

08/05 2016

1.0

1.0.0.0 https://github.com/Rarst/wps

WordPress plugin for whoops error handler.

  Sources   Download

MIT

The Requires

 

wordpress error whoops