gravity-forms-zero-spam
Last commit date
dist
2 months ago
includes
2 weeks ago
languages
2 weeks ago
LICENSE
3 years ago
gravityforms-zero-spam.php
2 weeks ago
readme.txt
2 weeks ago
gravityforms-zero-spam.php
41 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Gravity Forms Zero Spam |
| 4 | * Plugin URI: https://www.gravitykit.com?utm_source=plugin&utm_campaign=zero-spam&utm_content=pluginuri |
| 5 | * Description: Enhance Gravity Forms to include effective anti-spam measures—without using a CAPTCHA. |
| 6 | * Version: 1.9.0 |
| 7 | * Author: GravityKit |
| 8 | * Author URI: https://www.gravitykit.com?utm_source=plugin&utm_campaign=zero-spam&utm_content=authoruri |
| 9 | * Requires PHP: 7.4 |
| 10 | * License: GPL-2.0+ |
| 11 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 12 | * Text Domain: gravity-forms-zero-spam |
| 13 | * Domain Path: /languages |
| 14 | */ |
| 15 | |
| 16 | // My mother always said to use things as they're intended or not at all. |
| 17 | if ( ! defined( 'WPINC' ) ) { |
| 18 | die; |
| 19 | } |
| 20 | |
| 21 | define( 'GF_ZERO_SPAM_BASENAME', plugin_basename( __FILE__ ) ); |
| 22 | define( 'GF_ZERO_SPAM_FILE', __FILE__ ); |
| 23 | define( 'GF_ZERO_SPAM_DIR', plugin_dir_path( __FILE__ ) ); |
| 24 | define( 'GF_ZERO_SPAM_TOKEN_TTL', WEEK_IN_SECONDS ); |
| 25 | |
| 26 | require_once GF_ZERO_SPAM_DIR . 'includes/class-gf-zero-spam.php'; |
| 27 | |
| 28 | // Clean up after ourselves. |
| 29 | register_deactivation_hook( __FILE__, [ 'GF_Zero_Spam', 'deactivate' ] ); |
| 30 | |
| 31 | // Load translations. |
| 32 | add_action( |
| 33 | 'init', |
| 34 | static function () { |
| 35 | load_plugin_textdomain( 'gravity-forms-zero-spam', false, dirname( GF_ZERO_SPAM_BASENAME ) . '/languages' ); |
| 36 | } |
| 37 | ); |
| 38 | |
| 39 | // Fire it up. |
| 40 | add_action( 'gform_loaded', [ 'GF_Zero_Spam', 'gform_loaded' ] ); |
| 41 |