PluginProbe ʕ •ᴥ•ʔ
Restrict Dates Add-On for Gravity Forms / 1.2.4
Restrict Dates Add-On for Gravity Forms v1.2.4
trunk 1.0.0 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4
restrict-dates-add-on-for-gravity-forms / restrict-dates.php
restrict-dates-add-on-for-gravity-forms Last commit date
admin 1 month ago assets 1 month ago vendor 1 month ago class-gfrestrictdates.php 1 month ago readme.txt 1 month ago restrict-dates.php 1 month ago
restrict-dates.php
86 lines
1 <?php
2 /*
3 Plugin Name: Restrict Dates Add-On for Gravity Forms
4 Plugin Url: https://pluginscafe.com/plugin/restrict-dates-for-gravity-forms-pro/
5 Version: 1.2.4
6 Description: This plugin adds date restrict options on gravity forms datepicker field.
7 Author: PluginsCafe
8 Author URI: https://pluginscafe.com
9 License: GPLv2 or later
10 Text Domain: restrict-dates-add-on-for-gravity-forms
11 */
12
13 if (!defined('ABSPATH')) {
14 exit;
15 }
16
17 define('GF_RESTRICT_DATES_ADDON_VERSION', '1.2.4');
18 define('GF_RESTRICT_DATES_ADDON_URL', plugin_dir_url(__FILE__));
19
20 if (function_exists('rdfgf_fs')) {
21 rdfgf_fs()->set_basename(false, __FILE__);
22 } else {
23 if (! function_exists('rdfgf_fs')) {
24 // Create a helper function for easy SDK access.
25 function rdfgf_fs() {
26 global $rdfgf_fs;
27
28 if (! isset($rdfgf_fs)) {
29 // Include Freemius SDK.
30 require_once dirname(__FILE__) . '/vendor/freemius/start.php';
31 $rdfgf_fs = fs_dynamic_init(array(
32 'id' => '15094',
33 'slug' => 'restrict-dates-for-gravity-forms',
34 'premium_slug' => 'restrict-dates-for-gravity-forms-pro',
35 'type' => 'plugin',
36 'public_key' => 'pk_febc62d94850f83a5b528b4a6db0b',
37 'is_premium' => false,
38 'premium_suffix' => 'Pro',
39 // If your plugin is a serviceware, set this option to false.
40 'has_addons' => false,
41 'has_paid_plans' => true,
42 // Automatically removed in the free version. If you're not using the
43 'menu' => array(
44 'slug' => 'restrict-dates-for-gravity-forms-pro',
45 'support' => false,
46 'contact' => false,
47 'parent' => array(
48 'slug' => 'options-general.php',
49 ),
50 ),
51 'is_live' => true,
52 ));
53 }
54
55 return $rdfgf_fs;
56 }
57
58 // Init Freemius.
59 rdfgf_fs();
60 // Signal that SDK was initiated.
61 do_action('rdfgf_fs_loaded');
62 }
63 }
64
65 if (is_admin()) {
66 require_once 'admin/class-admin.php';
67 }
68
69 add_action('gform_loaded', array('GF_Restrict_Dates_AddOn_Bootstrap', 'load'), 5);
70 class GF_Restrict_Dates_AddOn_Bootstrap {
71 public static function load() {
72 if (! method_exists('GFForms', 'include_addon_framework')) {
73 return;
74 }
75 // are we on GF 2.5+
76 define('GFIC_GF_MIN_2_5', version_compare(GFCommon::$version, '2.5-dev-1', '>='));
77
78 require_once('class-gfrestrictdates.php');
79 GFAddOn::register('GFRestrictDatesAddOn');
80 }
81 }
82
83 function gf_restrict_dates() {
84 return GFRestrictDatesAddOn::get_instance();
85 }
86