Plugin Directory

Changeset 3410513


Ignore:
Timestamp:
12/04/2025 07:22:51 AM (4 months ago)
Author:
galaxyweblinks
Message:

new version release

Location:
form-refresher-for-gravity-forms
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • form-refresher-for-gravity-forms/tags/1.4.3/form-refresher-for-gravity-forms.php

    r3410473 r3410513  
    44 * Plugin URI: https://wordpress.org/plugins/form-refresher-for-gravity-forms
    55 * Description: Reload the Gravity form on the AJAX submission. Useful in situations where you would like to allow multiple form submissions by refreshing the page.
    6  * Version:1.4.2
     6 * Version:1.4.3
    77 * Author: Galaxy Weblinks
    88 * Author URI: http://galaxyweblinks.com/
    99 * Text Domain: form-refresher-for-gravity-forms
    10  * Requires Plugins: gravityforms
    1110 * License: GPLv2 or later
    1211 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1312 */
    1413
    15 if ( ! defined( 'ABSPATH' ) ) {
    16     die();
     14if ( ! defined( 'ABSPATH' ) ) { die(); }
     15
     16// Absolute path to the WordPress directory.
     17define( 'FRFGF_URL', plugin_dir_url(__FILE__));
     18define( 'FRFGF_PATH', plugin_dir_path(__FILE__));
     19
     20function gwrf_has_parent_plugin(){
     21
     22    if (is_admin() && current_user_can('activate_plugins') && !is_plugin_active('gravityforms/gravityforms.php')) {
     23        deactivate_plugins(plugin_basename(__FILE__));
     24   
     25
     26        /* If we try to activate this plugin while the parent plugin isn't active. */
     27        if (isset($_GET['activate']) && !wp_verify_nonce($_GET['activate'])) {
     28
     29            add_action('admin_notices', 'gwrf_admin_error_notice');
     30            unset($_GET['activate']);
     31            /* If we deactivate the parent plugin while this plugin is still active. */
     32        } elseif (!isset($_GET['activate'])) {
     33       
     34            add_action('admin_notices', 'gwrf_parent_plugin_notice');
     35            unset($_GET['activate']);
     36       
     37        }
     38    }
    1739}
     40add_action('admin_init', 'gwrf_has_parent_plugin');
     41// Gravity Forms is not active, deactivate this plugin and show error
    1842
    19 // Absolute path to the WordPress directory.
     43function gwrf_admin_error_notice(){
     44    ?>
     45    <div class="error">
     46        <p>The <strong>Form Refresher for Gravity Forms</strong> plugin requires the <strong>Gravity Forms</strong> plugin to be active to run correctly. Please Activate it now or <a href="https://www.gravityforms.com/" target="_blank">purchase it today!</a></p>
     47    </div>
     48    <?php
     49 }
    2050
    21 define( 'FRFGF_URL', plugin_dir_url( __FILE__ ) );
    22 define( 'FRFGF_PATH', plugin_dir_path( __FILE__ ) );
     51function gwrf_parent_plugin_notice(){
     52    ?>
     53    <div class="error">
     54        <p>Form Refresher for Gravity Forms has been deactivated because Gravity Forms has been deactivated. Gravity Forms must be active in order for you to use Form Refresher for Gravity Forms.</p>
     55    </div>
     56    <?php
     57}
    2358
    2459/**
    2560 * You can use these filters to add custom links to your plugin row in the plugin list.
    26  *
    2761 * @param $links, $file
    2862 * @return $links [array]
     
    4276 * The FormRefresherGravityForm class.
    4377 */
    44 require_once FRFGF_PATH . 'includes/form-refresher-gforms.php';
     78require_once( FRFGF_PATH . 'includes/form-refresher-gforms.php' );
    4579
    4680if ( class_exists( 'FormRefresherGravityForm' ) ) {
    47     $gf_reload_form = new FormRefresherGravityForm();
     81    $gf_reload_form = new FormRefresherGravityForm();
    4882}
    4983
  • form-refresher-for-gravity-forms/tags/1.4.3/includes/form-refresher-gforms.php

    r3407868 r3410513  
    1414class FormRefresherGravityForm {
    1515
    16     /**
     16    /**
    1717     * Initialize the class sets its properties.
    1818     *
     
    2020     * @param string $root_file
    2121     */
    22     public function __construct() {
    23         if ( class_exists( 'GFForms' ) ) {
    24             $this->init();
    25         }
    26     }
    27 
    28     /**
     22    public function __construct() {
     23        if (class_exists('GFForms')) {
     24            $this->init();
     25        }
     26    }
     27
     28    /**
    2929     * Initialize the all filter/action.
    3030     *
     
    3232     * @return null
    3333     */
    34     public function init() {
    35         add_filter( 'gform_enqueue_scripts', array( $this, 'gwrf_enqueue_form_scripts' ), 10, 2 );
    36         add_filter( 'gform_pre_render', array( $this, 'gwrf_register_init_scripts' ), 1, 2 );
    37         add_filter( 'gform_admin_pre_render', array( $this, 'gwrf_add_merge_tag_support' ) );
    38         add_filter( 'gform_replace_merge_tags', array( $this, 'gwrf_reload_form_replace_merge_tag' ), 10, 2 );
    39         add_filter( 'gform_form_settings', array( $this, 'gwrf_form_settings_ui' ), 10, 2 );
    40         add_filter( 'gform_pre_form_settings_save', array( $this, 'gwrf_save_form_settings' ) );
    41         add_action( 'admin_enqueue_scripts', array( $this, 'gwrf_admin_enqueue' ) );
    42         add_filter( 'gform_custom_merge_tags', array( $this,'gwrf_custom_merge_tags') );
    43     }
    44 
    45     public function gwrf_custom_merge_tags( $custom_merge_tags ) {
    46         $custom_merge_tags[] = array(
    47             'label' => 'Reset Form',
    48             'tag'   => '{reset_form}'
    49         );
    50  
    51         return $custom_merge_tags;
    52      }
     34    public function init(){
     35        add_filter( 'gform_enqueue_scripts', array( $this, 'gwrf_enqueue_form_scripts' ), 10, 2 );
     36        add_filter( 'gform_pre_render', array( $this, 'gwrf_register_init_scripts' ), 1, 2 );
     37        add_filter( 'gform_admin_pre_render', array( $this, 'gwrf_add_merge_tag_support' ) );
     38        add_filter( 'gform_replace_merge_tags', array( $this, 'gwrf_reload_form_replace_merge_tag' ), 10, 2 );
     39        add_filter( 'gform_form_settings', array( $this, 'gwrf_form_settings_ui' ), 10, 2 );
     40        add_filter( 'gform_pre_form_settings_save', array( $this, 'gwrf_save_form_settings' ) );
     41        add_action( 'admin_enqueue_scripts', array( $this, 'gwrf_admin_enqueue' ) );
     42        add_filter( 'gform_custom_merge_tags', array( $this,'gwrf_custom_merge_tags') );     
     43    }
     44
    5345    /**
    5446     * enqueue_form_scripts function
     
    264256        return !empty($matches);
    265257    }
     258    public function gwrf_custom_merge_tags( $custom_merge_tags ) {
     259        $custom_merge_tags[] = array(
     260            'label' => 'Reset Form',
     261            'tag'   => '{reset_form}'
     262        );
     263 
     264        return $custom_merge_tags;
     265     }
    266266}
  • form-refresher-for-gravity-forms/tags/1.4.3/readme.txt

    r3409672 r3410513  
    1 === Form Refresher for Gravity Forms ===
     1=== Form Refresher for Gravity Forms ===
     2
    23Contributors: galaxyweblinks
    34Tags: gravity-form, reload-form-after-submission, automatic-reload, gravity-form-reload-link, gravity-form-reload
     
    56Requires at least: WordPress 4.9 or higher
    67Tested up to: 6.8
    7 Requires PHP: 7.6
    8 Stable Tag: 1.4.2
     8Requires PHP: 7.4
     9Stable tag: 1.4.3
    910License: GPLv2 or later
    1011License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5253
    5354== Changelog ==
     55= 1.4.3 =
     56Introducing a new Pro Add-on is now available with extended features to enhance your plugin’s functionality. https://wp-plugins.galaxyweblinks.com/product/form-refresher-for-gravity-forms-pro/.
    5457
    5558= 1.4.2 =
  • form-refresher-for-gravity-forms/trunk/form-refresher-for-gravity-forms.php

    r3410473 r3410513  
    44 * Plugin URI: https://wordpress.org/plugins/form-refresher-for-gravity-forms
    55 * Description: Reload the Gravity form on the AJAX submission. Useful in situations where you would like to allow multiple form submissions by refreshing the page.
    6  * Version:1.4.2
     6 * Version:1.4.3
    77 * Author: Galaxy Weblinks
    88 * Author URI: http://galaxyweblinks.com/
    99 * Text Domain: form-refresher-for-gravity-forms
    10  * Requires Plugins: gravityforms
    1110 * License: GPLv2 or later
    1211 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1312 */
    1413
    15 if ( ! defined( 'ABSPATH' ) ) {
    16     die();
     14if ( ! defined( 'ABSPATH' ) ) { die(); }
     15
     16// Absolute path to the WordPress directory.
     17define( 'FRFGF_URL', plugin_dir_url(__FILE__));
     18define( 'FRFGF_PATH', plugin_dir_path(__FILE__));
     19
     20function gwrf_has_parent_plugin(){
     21
     22    if (is_admin() && current_user_can('activate_plugins') && !is_plugin_active('gravityforms/gravityforms.php')) {
     23        deactivate_plugins(plugin_basename(__FILE__));
     24   
     25
     26        /* If we try to activate this plugin while the parent plugin isn't active. */
     27        if (isset($_GET['activate']) && !wp_verify_nonce($_GET['activate'])) {
     28
     29            add_action('admin_notices', 'gwrf_admin_error_notice');
     30            unset($_GET['activate']);
     31            /* If we deactivate the parent plugin while this plugin is still active. */
     32        } elseif (!isset($_GET['activate'])) {
     33       
     34            add_action('admin_notices', 'gwrf_parent_plugin_notice');
     35            unset($_GET['activate']);
     36       
     37        }
     38    }
    1739}
     40add_action('admin_init', 'gwrf_has_parent_plugin');
     41// Gravity Forms is not active, deactivate this plugin and show error
    1842
    19 // Absolute path to the WordPress directory.
     43function gwrf_admin_error_notice(){
     44    ?>
     45    <div class="error">
     46        <p>The <strong>Form Refresher for Gravity Forms</strong> plugin requires the <strong>Gravity Forms</strong> plugin to be active to run correctly. Please Activate it now or <a href="https://www.gravityforms.com/" target="_blank">purchase it today!</a></p>
     47    </div>
     48    <?php
     49 }
    2050
    21 define( 'FRFGF_URL', plugin_dir_url( __FILE__ ) );
    22 define( 'FRFGF_PATH', plugin_dir_path( __FILE__ ) );
     51function gwrf_parent_plugin_notice(){
     52    ?>
     53    <div class="error">
     54        <p>Form Refresher for Gravity Forms has been deactivated because Gravity Forms has been deactivated. Gravity Forms must be active in order for you to use Form Refresher for Gravity Forms.</p>
     55    </div>
     56    <?php
     57}
    2358
    2459/**
    2560 * You can use these filters to add custom links to your plugin row in the plugin list.
    26  *
    2761 * @param $links, $file
    2862 * @return $links [array]
     
    4276 * The FormRefresherGravityForm class.
    4377 */
    44 require_once FRFGF_PATH . 'includes/form-refresher-gforms.php';
     78require_once( FRFGF_PATH . 'includes/form-refresher-gforms.php' );
    4579
    4680if ( class_exists( 'FormRefresherGravityForm' ) ) {
    47     $gf_reload_form = new FormRefresherGravityForm();
     81    $gf_reload_form = new FormRefresherGravityForm();
    4882}
    4983
  • form-refresher-for-gravity-forms/trunk/includes/form-refresher-gforms.php

    r3407868 r3410513  
    1414class FormRefresherGravityForm {
    1515
    16     /**
     16    /**
    1717     * Initialize the class sets its properties.
    1818     *
     
    2020     * @param string $root_file
    2121     */
    22     public function __construct() {
    23         if ( class_exists( 'GFForms' ) ) {
    24             $this->init();
    25         }
    26     }
    27 
    28     /**
     22    public function __construct() {
     23        if (class_exists('GFForms')) {
     24            $this->init();
     25        }
     26    }
     27
     28    /**
    2929     * Initialize the all filter/action.
    3030     *
     
    3232     * @return null
    3333     */
    34     public function init() {
    35         add_filter( 'gform_enqueue_scripts', array( $this, 'gwrf_enqueue_form_scripts' ), 10, 2 );
    36         add_filter( 'gform_pre_render', array( $this, 'gwrf_register_init_scripts' ), 1, 2 );
    37         add_filter( 'gform_admin_pre_render', array( $this, 'gwrf_add_merge_tag_support' ) );
    38         add_filter( 'gform_replace_merge_tags', array( $this, 'gwrf_reload_form_replace_merge_tag' ), 10, 2 );
    39         add_filter( 'gform_form_settings', array( $this, 'gwrf_form_settings_ui' ), 10, 2 );
    40         add_filter( 'gform_pre_form_settings_save', array( $this, 'gwrf_save_form_settings' ) );
    41         add_action( 'admin_enqueue_scripts', array( $this, 'gwrf_admin_enqueue' ) );
    42         add_filter( 'gform_custom_merge_tags', array( $this,'gwrf_custom_merge_tags') );
    43     }
    44 
    45     public function gwrf_custom_merge_tags( $custom_merge_tags ) {
    46         $custom_merge_tags[] = array(
    47             'label' => 'Reset Form',
    48             'tag'   => '{reset_form}'
    49         );
    50  
    51         return $custom_merge_tags;
    52      }
     34    public function init(){
     35        add_filter( 'gform_enqueue_scripts', array( $this, 'gwrf_enqueue_form_scripts' ), 10, 2 );
     36        add_filter( 'gform_pre_render', array( $this, 'gwrf_register_init_scripts' ), 1, 2 );
     37        add_filter( 'gform_admin_pre_render', array( $this, 'gwrf_add_merge_tag_support' ) );
     38        add_filter( 'gform_replace_merge_tags', array( $this, 'gwrf_reload_form_replace_merge_tag' ), 10, 2 );
     39        add_filter( 'gform_form_settings', array( $this, 'gwrf_form_settings_ui' ), 10, 2 );
     40        add_filter( 'gform_pre_form_settings_save', array( $this, 'gwrf_save_form_settings' ) );
     41        add_action( 'admin_enqueue_scripts', array( $this, 'gwrf_admin_enqueue' ) );
     42        add_filter( 'gform_custom_merge_tags', array( $this,'gwrf_custom_merge_tags') );     
     43    }
     44
    5345    /**
    5446     * enqueue_form_scripts function
     
    264256        return !empty($matches);
    265257    }
     258    public function gwrf_custom_merge_tags( $custom_merge_tags ) {
     259        $custom_merge_tags[] = array(
     260            'label' => 'Reset Form',
     261            'tag'   => '{reset_form}'
     262        );
     263 
     264        return $custom_merge_tags;
     265     }
    266266}
  • form-refresher-for-gravity-forms/trunk/readme.txt

    r3409672 r3410513  
    1 === Form Refresher for Gravity Forms ===
     1=== Form Refresher for Gravity Forms ===
     2
    23Contributors: galaxyweblinks
    34Tags: gravity-form, reload-form-after-submission, automatic-reload, gravity-form-reload-link, gravity-form-reload
     
    56Requires at least: WordPress 4.9 or higher
    67Tested up to: 6.8
    7 Requires PHP: 7.6
    8 Stable Tag: 1.4.2
     8Requires PHP: 7.4
     9Stable tag: 1.4.3
    910License: GPLv2 or later
    1011License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5253
    5354== Changelog ==
     55= 1.4.3 =
     56Introducing a new Pro Add-on is now available with extended features to enhance your plugin’s functionality. https://wp-plugins.galaxyweblinks.com/product/form-refresher-for-gravity-forms-pro/.
    5457
    5558= 1.4.2 =
Note: See TracChangeset for help on using the changeset viewer.