Plugin Directory

Changeset 3376671


Ignore:
Timestamp:
10/11/2025 12:19:01 PM (6 months ago)
Author:
pluginscafe
Message:

add dashboard

Location:
restrict-dates-add-on-for-gravity-forms
Files:
538 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • restrict-dates-add-on-for-gravity-forms/trunk/class-gfrestrictdates.php

    r3176277 r3376671  
    9595                    <input type="checkbox" id="gfrda_enable_restrict_value" onclick="SetFieldProperty('restrictDateGField', this.checked);" />
    9696                    <label for="gfrda_enable_restrict_value" class="inline">
    97                         <?php _e("Enable Restrict date options", "gravityforms"); ?>
     97                        <?php esc_html_e("Enable Restrict date options", "restrict-dates-add-on-for-gravity-forms"); ?>
    9898                        <?php gform_tooltip("enable_rd"); ?>
    9999                    </label>
     
    103103                <li class="rda_minimum_date field_setting">
    104104                    <label for="field_admin_label" class="section_label">
    105                         <?php _e("Minimum Date", "gravityforms"); ?>
     105                        <?php esc_html_e("Minimum Date", "restrict-dates-add-on-for-gravity-forms"); ?>
    106106                        <?php gform_tooltip("rda_min_date"); ?>
    107107                    </label>
     
    114114                <li class="rda_minimum_date_picker field_setting">
    115115                    <label for="field_minimum_date_picker" class="section_label">
    116                         <?php _e("Choose Date", "gravityforms"); ?>
     116                        <?php esc_html_e("Choose Date", "restrict-dates-add-on-for-gravity-forms"); ?>
    117117                        <?php gform_tooltip("rda_min_date"); ?>
    118118                    </label>
     
    121121                <li class="rda_maximum_date field_setting">
    122122                    <label for="field_admin_label" class="section_label">
    123                         <?php _e("Maximum Date", "gravityforms"); ?>
     123                        <?php esc_html_e("Maximum Date", "restrict-dates-add-on-for-gravity-forms"); ?>
    124124                        <?php gform_tooltip("rda_min_date"); ?>
    125125                    </label>
     
    132132                <li class="rda_maximum_date_picker field_setting">
    133133                    <label for="field_maximum_date_picker" class="section_label">
    134                         <?php _e("Choose Date", "gravityforms"); ?>
     134                        <?php esc_html_e("Choose Date", "restrict-dates-add-on-for-gravity-forms"); ?>
    135135                        <?php gform_tooltip("rda_max_date"); ?>
    136136                    </label>
     
    139139                <li class="rda_weekly_off field_setting">
    140140                    <label for="field_admin_label" class="section_label">
    141                         <?php _e("Disable Week/Off Day", "gravityforms"); ?>
     141                        <?php esc_html_e("Disable Week/Off Day", "restrict-dates-add-on-for-gravity-forms"); ?>
    142142                        <?php gform_tooltip("rda_weekly_date"); ?>
    143143                    </label>
     
    155155                <li class="rda_start_day field_setting">
    156156                    <label for="field_admin_label" class="section_label">
    157                         <?php _e("Week Start Day", "gravityforms"); ?>
     157                        <?php esc_html_e("Week Start Day", "restrict-dates-add-on-for-gravity-forms"); ?>
    158158                        <?php gform_tooltip("rda_week_start_day"); ?>
    159159                    </label>
     
    171171                <li class="rda_disable_specific_dates field_setting">
    172172                    <label for="rda_disable_specific_dates" class="section_label">
    173                         <?php _e("Type Specific Dates", "gravityforms"); ?>
     173                        <?php esc_html_e("Type Specific Dates", "restrict-dates-add-on-for-gravity-forms"); ?>
    174174                        <?php gform_tooltip("rda_dis_sp_dates"); ?>
    175175                    </label>
     
    179179                    <input type="checkbox" id="gfrda_enable_readonly" onclick="SetFieldProperty('readOnlyDateGField', this.checked);" />
    180180                    <label for="gfrda_enable_readonly" class="inline">
    181                         <?php _e("Enable readonly", "gravityforms"); ?>
     181                        <?php esc_html_e("Enable readonly", "restrict-dates-add-on-for-gravity-forms"); ?>
    182182                        <?php gform_tooltip("gfrda_readonly"); ?>
    183183                    </label>
     
    246246        }
    247247
    248         wp_enqueue_script('gf_rd', $this->get_base_url() . '/assets/js/gf_rd_data.js', array('jquery'), $this->_version);
     248        wp_enqueue_script('gfrd_data', $this->get_base_url() . '/assets/js/gf_rd_data.js', array('jquery'), $this->_version, true);
    249249        wp_localize_script(
    250             'gf_rd',
     250            'gfrd_data',
    251251            'gfrdMainJsVars_' . $form_id,
    252252            array(
     
    257257
    258258    function gfrda_add_tooltips() {
    259         $tooltips['enable_rd'] = "<h6>" . esc_html__("Enable restrict options", "gravityforms") . "</h6>" . esc_html__("Check this box to show date restrict options.", "gravityforms") . "";
    260         $tooltips['gfrda_readonly'] = "<h6>" . esc_html__("Enable Readonly", "gravityforms") . "</h6>" . esc_html__("Check this box to disable manual date input change.", "gravityforms") . "";
    261         $tooltips['rda_weekly_date'] = "<h6>" . esc_html__("Week/Off day", "gravityforms") . "</h6>" . esc_html__("Choose your day to disable in weekly.", "gravityforms") . "";
    262         $tooltips['rda_max_date'] = "<h6>" . esc_html__("Maximum Date", "gravityforms") . "</h6>" . esc_html__("Choose maximum date for restricting in date-picker", "gravityforms") . "";
    263         $tooltips['rda_min_date'] = "<h6>" . esc_html__("Minimum Date", "gravityforms") . "</h6>" . esc_html__("Choose minimum date for restricting in date-picker", "gravityforms") . "";
    264         $tooltips['rda_dis_sp_dates'] = "<h6>" . esc_html__("Disable Specific Dates", "gravityforms") . "</h6>" . esc_html__("Type your dates to disable with comma spearate. Ex: mm/dd/yyyy", "gravityforms") . "";
    265         $tooltips['rda_week_start_day'] = "<h6>" . esc_html__("Week Start Day", "gravityforms") . "</h6>" . esc_html__("Choose week start day for your calendar.", "gravityforms") . "";
     259        $tooltips['enable_rd'] = "<h6>" . esc_html__("Enable restrict options", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Check this box to show date restrict options.", "restrict-dates-add-on-for-gravity-forms") . "";
     260        $tooltips['gfrda_readonly'] = "<h6>" . esc_html__("Enable Readonly", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Check this box to disable manual date input change.", "restrict-dates-add-on-for-gravity-forms") . "";
     261        $tooltips['rda_weekly_date'] = "<h6>" . esc_html__("Week/Off day", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Choose your day to disable in weekly.", "restrict-dates-add-on-for-gravity-forms") . "";
     262        $tooltips['rda_max_date'] = "<h6>" . esc_html__("Maximum Date", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Choose maximum date for restricting in date-picker", "restrict-dates-add-on-for-gravity-forms") . "";
     263        $tooltips['rda_min_date'] = "<h6>" . esc_html__("Minimum Date", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Choose minimum date for restricting in date-picker", "restrict-dates-add-on-for-gravity-forms") . "";
     264        $tooltips['rda_dis_sp_dates'] = "<h6>" . esc_html__("Disable Specific Dates", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Type your dates to disable with comma spearate. Ex: mm/dd/yyyy", "restrict-dates-add-on-for-gravity-forms") . "";
     265        $tooltips['rda_week_start_day'] = "<h6>" . esc_html__("Week Start Day", "restrict-dates-add-on-for-gravity-forms") . "</h6>" . esc_html__("Choose week start day for your calendar.", "restrict-dates-add-on-for-gravity-forms") . "";
    266266        return $tooltips;
    267267    }
  • restrict-dates-add-on-for-gravity-forms/trunk/readme.txt

    r3234391 r3376671  
    66Requires at least: 5.0
    77Requires PHP: 5.6
    8 Tested up to: 6.7
    9 Stable tag: 1.2.2
     8Tested up to: 6.8
     9Stable tag: 1.2.3
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
     
    5252Installation is fairly straight forward. Install it from the WordPress plugin repository.
    5353 
     54== Frequently Asked Questions ==
     55
     56= Can I disable specific days of the week, like weekends? =
     57Yes. You can disable any weekday (for example, Saturday and Sunday) to prevent users from choosing those dates.
     58
     59= Can I set a minimum and maximum date range? =
     60Absolutely. You can define both a minimum and maximum selectable date. For example, allow only dates from “tomorrow” to “30 days from today.”
     61
     62= Does it support multiple date fields in the same form? =
     63Yes. Each date field can have its own restriction settings — all managed individually within the Gravity Forms editor.
     64
     65= Can I restrict dates globally for all forms? =
     66Currently, restrictions are applied per field of gravity forms.
     67
     68= Does it support inline date picker? =
     69Yes, Its supproted but only in the pro version.
     70
     71
    5472
    5573== Change log ==
     74= 1.2.3 =
     75* Update Freemius SDK
     76* Minor bug fix
     77
    5678= 1.2.2 =
    5779* Update Freemius SDK
  • restrict-dates-add-on-for-gravity-forms/trunk/restrict-dates.php

    r3234392 r3376671  
    33Plugin Name: Restrict Dates Add-On for Gravity Forms
    44Plugin Url: https://pluginscafe.com/plugin/restrict-dates-for-gravity-forms-pro/
    5 Version: 1.2.2
    6 Description: This plugin adds date restrict options on gravity forms datepicker field
     5Version: 1.2.3
     6Description: This plugin adds date restrict options on gravity forms datepicker field.
    77Author: PluginsCafe
    88Author URI: https://pluginscafe.com
    99License: GPLv2 or later
    10 Text Domain: gravityforms
     10Text Domain: restrict-dates-add-on-for-gravity-forms
    1111*/
    1212
     
    1515}
    1616
    17 
    18 define('GF_RESTRICT_DATES_ADDON_VERSION', '1.2.2');
     17define('GF_RESTRICT_DATES_ADDON_VERSION', '1.2.3');
    1918define('GF_RESTRICT_DATES_ADDON_URL', plugin_dir_url(__FILE__));
    2019
    21 if (!function_exists('rdfgf_fs')) {
    22     // Create a helper function for easy SDK access.
    23     function rdfgf_fs() {
    24         global $rdfgf_fs;
    25         if (!isset($rdfgf_fs)) {
    26             // Include Freemius SDK.
    27             require_once dirname(__FILE__) . '/freemius/start.php';
    28             $rdfgf_fs = fs_dynamic_init(array(
    29                 'id'             => '15094',
    30                 'slug'           => 'restrict-dates-for-gravity-forms-pro',
    31                 'premium_slug'   => 'restrict-dates-for-gravity-forms-pro',
    32                 'type'           => 'plugin',
    33                 'public_key'     => 'pk_febc62d94850f83a5b528b4a6db0b',
    34                 'is_premium'     => false,
    35                 'premium_suffix' => 'Pro',
    36                 'has_addons'     => false,
    37                 'has_paid_plans' => true,
    38                 'menu'           => array(
    39                     'first-path' => 'plugins.php',
    40                     'support'    => false,
    41                 ),
    42                 'is_live'        => true,
    43             ));
     20if (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;
    4456        }
    45         return $rdfgf_fs;
     57
     58        // Init Freemius.
     59        rdfgf_fs();
     60        // Signal that SDK was initiated.
     61        do_action('rdfgf_fs_loaded');
    4662    }
     63}
    4764
    48     // Init Freemius.
    49     rdfgf_fs();
    50     // Signal that SDK was initiated.
    51     do_action('rdfgf_fs_loaded');
     65if (is_admin()) {
     66    require_once 'admin/class-admin.php';
    5267}
    5368
    5469add_action('gform_loaded', array('GF_Restrict_Dates_AddOn_Bootstrap', 'load'), 5);
    55 
    5670class GF_Restrict_Dates_AddOn_Bootstrap {
    57 
    5871    public static function load() {
    59 
    6072        if (! method_exists('GFForms', 'include_addon_framework')) {
    6173            return;
     
    6476        define('GFIC_GF_MIN_2_5', version_compare(GFCommon::$version, '2.5-dev-1', '>='));
    6577
    66         require_once('includes/class-review.php');
    6778        require_once('class-gfrestrictdates.php');
    68 
    6979        GFAddOn::register('GFRestrictDatesAddOn');
    7080    }
     
    7484    return GFRestrictDatesAddOn::get_instance();
    7585}
    76 
    77 
    78 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'pcafe_rd_add_action_links', 10, 1);
    79 
    80 function pcafe_rd_add_action_links($links) {
    81     $links['support'] = '<a href="' . rdfgf_fs()->contact_url() . '"style="color:#0077FF;font-weight:700" target="_blank">' . __('Support', 'gravityforms') . '</a>';
    82 
    83     if (rdfgf_fs()->is_not_paying()) {
    84         $links['upgrade'] = '<a href="' . rdfgf_fs()->get_upgrade_url() . '"style="color:#7BBD02;font-weight:700" target="_blank">' . __('Upgrade Now', 'gravityforms') . '</a>';
    85     }
    86     return $links;
    87 }
Note: See TracChangeset for help on using the changeset viewer.