WP Manifestindependent plugin directory
manifest / forms / rs-gravity-forms-ip-block

RS Gravity Forms IP Block

[WordPress Plugin] Provides an IP address filter with the option to automatically delete (or mark as spam) entries that match the block list.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/radgh/rs-gravity-forms-ip-block/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

RS Gravity Forms IP Block (WordPress Plugin)

Block IP addresses from submitting Gravity Forms.

To use this plugin, add this code to functions.php and replace the IP list with your own:

// Specify custom block list
function theme_get_gf_ip_block_list( $ip_list ) {
    return array(
        'xxx.xxx.xxx.xxx',
    );
}
add_filter( 'rsgf/get_ip_block_list', 'theme_get_gf_ip_block_list' );

To instantly delete blocked entries add:

add_filter( 'rsgf/delete_blocked_entries', '__return_true' );

The IP address is based on these server variables:

  • PHP (Default): $_SERVER['REMOTE_ADDR']
  • Cloudflare: $_SERVER['HTTP_CF_CONNECTING_IP']

Changelog

1.0.1

  • Specified ip "block" list in filters and function names
  • Renamed function in readme example

1.0.0

  • Initial release