Advertisement
verygoodplugins

Untitled

Nov 28th, 2019
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. function my_error_handler( $ignore, $error ) {
  2.  
  3.     if ( $error['type'] == E_ERROR ) {
  4.  
  5.         $params = array(
  6.             'body' => json_encode( $error ),
  7.         );
  8.  
  9.         wp_remote_post( 'https://myhandlerrurl.com/', $params );
  10.  
  11.         $ignore = true;
  12.  
  13.     }
  14.  
  15.     return $ignore;
  16.  
  17. }
  18.  
  19. add_filter( 'fen_ignore_error', 'my_error_handler', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement