Created
August 9, 2021 05:05
-
-
Save ivuorinen/da5ac21c84d3938706a39da6f0600c0c to your computer and use it in GitHub Desktop.
Skip WordPress E_NOTICE and E_USER_DEPRECATED errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Drop this to the theme functions.php | |
if ( defined( 'WP_ENV' ) && ! empty( WP_ENV ) && WP_ENV === 'development' ) { | |
error_reporting( E_ALL & ~E_NOTICE & ~E_USER_DEPRECATED ); // phpcs:ignore | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment