Skip to content

Instantly share code, notes, and snippets.

@ravinderk
Created February 15, 2022 14:32
Show Gist options
  • Save ravinderk/d31da00a9266cfbf32665c36997875d9 to your computer and use it in GitHub Desktop.
Save ravinderk/d31da00a9266cfbf32665c36997875d9 to your computer and use it in GitHub Desktop.
<?php
$GLOBALS['wp_filter'] = array(
'enable_wp_debug_mode_checks' => array(
10 => array(
array(
'accepted_args' => 0,
'function' => function () {
return false;
},
),
),
),
);
error_reporting(E_ALL & ~E_DEPRECATED );
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', __DIR__ . '/wp-content/debug.log');
@ravinderk
Copy link
Author

This code will disable notices like PHP Deprecated: ********.
Add this code before /* That's all, stop editing! Happy publishing. */ comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment