Skip to content

Instantly share code, notes, and snippets.

@martinsanne
Created September 1, 2016 12:16
Show Gist options
  • Save martinsanne/d8d271aea3aa3d233f86798a0fc384df to your computer and use it in GitHub Desktop.
Save martinsanne/d8d271aea3aa3d233f86798a0fc384df to your computer and use it in GitHub Desktop.
WordPress selective error reporting
<?php
/*
Name file anything you want and put in put in wp-content/mu-plugins/
Credits:
https://wycks.wordpress.com/2013/12/05/how-to-remove-error-notices-using-wordpresss-wp_debug/
*/
error_reporting(E_ALL & ~( E_NOTICE | E_USER_NOTICE | E_STRICT | E_DEPRECATED | E_USER_DEPRECATED | E_WARNING | E_CORE_WARNING | E_USER_WARNING | E_COMPILE_WARNING | E_PARSE ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment