Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thanks, Takayuki!
    We created a small plugin which checks the user agent and that works pretty well.

    <?php
    
    // define the callback function, the arguments are optional
    function dz1_skip_spam_ghost_check( $skip ) {	
    	$user_agent = $_SERVER['HTTP_USER_AGENT'];
    	if (preg_match( "/xyz/i", $user_agent )) {
    		return true;
    	}
    	return $skip;
    }
    
    // hook the callback function to the 'example_action'
    add_filter( 'wpcf7_skip_spam_check', 'dz1_skip_spam_ghost_check', 100, 1 );
    ?>
Viewing 1 replies (of 1 total)