Advertisement
verygoodplugins

Untitled

Jun 11th, 2020
941
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. function extend_timeout( $parsed_args, $url ) {
  2.  
  3.     if ( strpos( $url, 'ontraport' ) !== false ) {
  4.         $parsed_args['timeout'] = 30;
  5.     }
  6.  
  7.     return $parsed_args;
  8.  
  9. }
  10.  
  11. add_filter( 'http_request_args', 'extend_timeout', 100, 20 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement