gpcb_validate_user_agent

  1. Description
  2. Usage
  3. Examples
    1. Enable User-Agent Checking
  4. Since

Description

Check the visitor’s user-agent against blacklisted keywords.

Usage

Enable user-agent processing site-wide.

add_filter( 'gpcb_validate_user_agent', '__return_true' );

Enable user-agent processing in a given form.

add_filter( 'gpcb_validate_user_agent_FORMID', '__return_true' );

Examples

Enable User-Agent Checking

<?php
/**
 * Gravity Perks // Blocklist // Enable User-Agent Checking
 * https://gravitywiz.com/documentation/gravity-forms-blocklist/
 */
// Update "123" to the form ID.
add_filter( 'gpcb_validate_user_agent_123', '__return_true' );

Since

This filter is available since Gravity Perks Blacklist 1.2.8.