-
Notifications
You must be signed in to change notification settings - Fork 5
/
custom-entry-limit.php
executable file
·53 lines (39 loc) · 1.72 KB
/
custom-entry-limit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/*
Plugin Name: Gravity Forms Custom Entry Limit
Plugin URI: https://typewheel.xyz/project/custom-entry-limit
Description: Adds options for custom limiting of number of entries to a Gravity Form.
Version: 1.0.beta11
Author: Typewheel
Author URI: https://typewheel.xyz/
Typewheel Update ID: 2
------------------------------------------------------------------------
Copyright 2012-2016 Typewheel LLC
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
define( 'GF_CUSTOM_ENTRY_LIMIT_VERSION', '1.0.beta11' );
define( 'GF_CUSTOM_ENTRY_LIMIT_DIR_PATH', plugin_dir_path( __FILE__ ) );
define( 'GF_CUSTOM_ENTRY_LIMIT_DIR_URL', plugin_dir_url( __FILE__ ) );
add_action( 'gform_loaded', array( 'GF_Custom_Entry_Limit_Bootstrap', 'load' ), 5 );
class GF_Custom_Entry_Limit_Bootstrap {
public static function load() {
if ( ! method_exists( 'GFForms', 'include_addon_framework' ) ) {
return;
}
require_once( 'class-gfcustomentrylimit.php' );
GFAddOn::register( 'GFCustomEntryLimit' );
}
}
function gf_custom_entry_limit() {
return GFCustomEntryLimit::get_instance();
}