• Stars
    star
    125
  • Rank 286,335 (Top 6 %)
  • Language
    PHP
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress plugin for whoops error handler.

wps โ€” WordPress plugin for whoops

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

More Repositories

1

laps

Light WordPress profiler.
PHP
544
star
2

release-belt

Composer repository implementation for ZIPs.
PHP
162
star
3

fragment-cache

WordPress plugin for partial and async caching.
PHP
140
star
4

wporg-client

Standalone HTTP client for public WordPress.org API.
PHP
73
star
5

meadow

WordPress templating DSL based on Twig.
PHP
72
star
6

wpdatetime

Extension of PHPโ€™s DateTime and DateTimeZone classes for WordPress context.
PHP
63
star
7

update-blocker

Lightweight generic blocker of updates from official WordPress repositories.
PHP
54
star
8

hybrid-wing

Toolkit theme for WordPress, based on Hybrid Core and Twitter Bootstrap.
PHP
30
star
9

error-log-dashboard-widget

Robust zero-configuration and low-memory WordPress plugin to keep an eye on error log.
PHP
30
star
10

advanced-hooks-api

Set of (experimental) wrappers that allow to hook more elaborate WordPress events without coding intermediary functions
PHP
28
star
11

phpcs-cognitive-complexity

Cognitive Complexity implementation for PHP_CodeSniffer
PHP
26
star
12

toolbar-theme-switcher

Adds WordPress toolbar menu that allows users to switch theme for themselves.
PHP
19
star
13

composer-in-wp

Composer in WordPress site source
Ruby
16
star
14

wprss2hugo

WordPress eXtended RSS to Hugo importer.
PHP
10
star
15

seam

Lightweight site renderer for Markdown content and Twig templates
PHP
5
star
16

ComposePOT

WordPress MakePOT reboot.
PHP
5
star
17

locate-vendor

Helper for vendor directory location in Composer.
PHP
5
star
18

dnd-lookup

A small search web app for D&D 5e SRD
Vue
4
star
19

holder-wp

Quick and flexible placeholders, created right in browser.
PHP
4
star
20

php-calendar

Calendar feeds for PHP versions releases and support.
HTML
3
star
21

chill-config

Experimental YAML config handler for WordPress
PHP
2
star
22

sg-cachepress

The SG CachePress is a plugin that allows you to use the SiteGround dynamic cache and Memcached to optimize the performance of your WordPress.
PHP
2
star
23

github-actions-for-ci

JavaScript
1
star