• 1.
    # Configuration
  • 2.
     
  • 3.
    $safe_ips = array( '**.***.***.***', '**.***.***.***' );
  • 4.
    if( is_callable( array( 'GFFormsModel', 'get_ip' ) ) && ! in_array( GFFormsModel::get_ip(), $safe_ips ) ) {
  • 5.
     
  • 6.
    	# Limit Applied to Specific Form
  • 7.
    	new GW_Submission_Limit( array(
  • 8.
    		'form_id' => 3,
  • 9.
    		'limit' => 1,
  • 10.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 11.
    		'time_period' => 60 * 60 * 24 * 26,
  • 12.
    		'enable_notifications' => true
  • 13.
    	) );
  • 14.
    	
  • 15.
    	# Limit Applied to Specific Form
  • 16.
    	new GW_Submission_Limit( array(
  • 17.
    		'form_id' => 4,
  • 18.
    		'limit' => 1,
  • 19.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 20.
    		'time_period' => 60 * 60 * 24 * 54,
  • 21.
    		'enable_notifications' => true
  • 22.
    	) );
  • 23.
    	
  • 24.
    		# Limit Applied to Specific Form
  • 25.
    	new GW_Submission_Limit( array(
  • 26.
    		'form_id' => 5,
  • 27.
    		'limit' => 1,
  • 28.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 29.
    		'time_period' => 60 * 60 * 24 * 54,
  • 30.
    		'enable_notifications' => true
  • 31.
    	) );
  • 32.
    	
  • 33.
    	# Limit Applied to Specific Form
  • 34.
    	new GW_Submission_Limit( array(
  • 35.
    		'form_id' => 6,7,8,9,10,11,
  • 36.
    		'limit' => 1,
  • 37.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 38.
    		'time_period' => 60 * 60 * 24 * 240,
  • 39.
    		'enable_notifications' => true
  • 40.
    	) );
  • 41.
    	
  • 42.
    	# Limit Applied to Specific Form
  • 43.
    	new GW_Submission_Limit( array(
  • 44.
    		'form_id' => 12,
  • 45.
    		'limit' => 1,
  • 46.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 47.
    		'time_period' => 60 * 60 * 24 * 85,
  • 48.
    		'enable_notifications' => true
  • 49.
    	) );
  • 50.
    	
  • 51.
    	# Limit Applied to Specific Form
  • 52.
    	new GW_Submission_Limit( array(
  • 53.
    		'form_id' => 13,
  • 54.
    		'limit' => 1,
  • 55.
    		'limit_message' => 'You have reached the coupon download limit.',
  • 56.
    		'time_period' => 60 * 60 * 24 * 85,
  • 57.
    		'enable_notifications' => true
  • 58.
    	) );
  • 59.
    }
# Configuration $safe_ips = array( '**.***.***.***', '**.***.***.***' ); if( is_callable( array( 'GFFormsModel', 'get_ip' ) ) && ! in_array( GFFormsModel::get_ip(), $safe_ips ) ) { # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 3, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 26, 'enable_notifications' => true ) ); # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 4, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 54, 'enable_notifications' => true ) ); # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 5, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 54, 'enable_notifications' => true ) ); # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 6,7,8,9,10,11, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 240, 'enable_notifications' => true ) ); # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 12, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 85, 'enable_notifications' => true ) ); # Limit Applied to Specific Form new GW_Submission_Limit( array( 'form_id' => 13, 'limit' => 1, 'limit_message' => 'You have reached the coupon download limit.', 'time_period' => 60 * 60 * 24 * 85, 'enable_notifications' => true ) ); }

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter