gpb_ip

  1. Description
  2. Usage
  3. Parameters
  4. Examples
    1. Disable checking the user’s IP against the blocklist
  5. Since

Description

Filter the IP address checked against the blocklist.

Usage

Filter the IP address checked against the blocklist.

add_filter( 'gpb_ip', 'my_custom_function' );

Filter the IP address checked against the blocklist when submitting a specific form.

add_filter( 'gpb_ip_FORMID', 'my_custom_function' );

Filter the IP address checked against the blocklist for a specific field.

add_filter( 'gpb_ip_FORMID_FIELDID', 'my_custom_function' );

Parameters

  • ip string

    The IP address to check against the blocklist.

  • form array

    The current form object.

  • field array

    The current field object if provided.

Examples

Disable checking the user’s IP against the blocklist

Replace FORMID accordingly or remove _FORMID entirely to disable checking IPs against the blocklist for all forms using GP Blocklist.

add_filter( 'gpb_ip_FORMID', '__return_empty_string' );

Since

This filter is available since Gravity Forms Blocklist 1.3.8.