Plugin Directory

Changeset 2501230


Ignore:
Timestamp:
03/22/2021 05:49:16 PM (5 years ago)
Author:
mailcheckco
Message:

Update to version 0.4 from GitHub

Location:
mailcheck-co
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • mailcheck-co/tags/0.4/README.txt

    r2432898 r2501230  
    66Contributors: nosovk, mailcheckco, 0jekson0
    77Requires at least: 4.7.0
    8 Tested up to: 5.5.3
    9 Stable tag: 0.3
     8Tested up to: 5.6.2
     9Stable tag: 0.4
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727* Contact Form 7
    2828* WooCommerce
     29* Elementor
    2930
    3031You can install and use the plugin by adding an API key, generated from the account [free account](https://www.mailcheck.co).
     
    7273== Changelog ==
    7374
     75= 0.4 =
     76Added Elementor integration
     77
    7478= 0.3 =
    7579Updated compatibility and assets
  • mailcheck-co/tags/0.4/mailcheck-co.php

    r2414080 r2501230  
    1616    add_option('mailcheckco_enable_cf7', 1 );
    1717    add_option('mailcheckco_enable_woo', 0 );
     18    add_option('mailcheckco_enable_elementor', 0 );
    1819}
    1920register_activation_hook( __FILE__, 'mailcheckco_plugin_activate' );
     
    4748    register_setting('mailcheckco-option-group', 'mailcheckco_enable_cf7');
    4849    register_setting('mailcheckco-option-group', 'mailcheckco_enable_woo');
     50    register_setting('mailcheckco-option-group', 'mailcheckco_enable_elementor');
    4951}
    5052
  • mailcheck-co/tags/0.4/mailcheck.class.php

    r2414080 r2501230  
    4545        if (get_option('mailcheckco_enable_woo') == 1) {
    4646            add_filter('woocommerce_after_checkout_validation', array($this, 'validate_woo'), 10, 2);
     47        }
     48        if (get_option('mailcheckco_enable_elementor') == 1) {
     49            add_action('elementor_pro/forms/validation/email', array($this, 'validate_elementor'), 10, 3);
    4750        }
    4851    }
     
    107110    }
    108111
     112    function validate_elementor($field, $record, $ajax_handler){
     113        $email = $field['value'];
     114
     115        if (!empty($email)) {
     116            $result = $this->check($email);
     117            if (!$result['check']) {
     118                $ajax_handler->add_error( $field['id'], __($this->message) );
     119            }
     120        }
     121
     122    }
     123
    109124    function check($email)
    110125    {
  • mailcheck-co/tags/0.4/options_page.php

    r2414080 r2501230  
    8282                    </td>
    8383                </tr>
     84                <tr valign="top">
     85                    <th scope="row"><?php _e('Enable for Elementor'); ?></th>
     86                    <td><input type="checkbox" name="mailcheckco_enable_elementor"
     87                               value="1" <?php echo empty(get_option('mailcheckco_enable_elementor')) ? '' : 'checked="checked"'; ?> />
     88                    </td>
     89                </tr>
    8490            </table>
    8591            <?php submit_button(); ?>
  • mailcheck-co/trunk/README.txt

    r2432898 r2501230  
    66Contributors: nosovk, mailcheckco, 0jekson0
    77Requires at least: 4.7.0
    8 Tested up to: 5.5.3
    9 Stable tag: 0.3
     8Tested up to: 5.6.2
     9Stable tag: 0.4
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727* Contact Form 7
    2828* WooCommerce
     29* Elementor
    2930
    3031You can install and use the plugin by adding an API key, generated from the account [free account](https://www.mailcheck.co).
     
    7273== Changelog ==
    7374
     75= 0.4 =
     76Added Elementor integration
     77
    7478= 0.3 =
    7579Updated compatibility and assets
  • mailcheck-co/trunk/mailcheck-co.php

    r2414080 r2501230  
    1616    add_option('mailcheckco_enable_cf7', 1 );
    1717    add_option('mailcheckco_enable_woo', 0 );
     18    add_option('mailcheckco_enable_elementor', 0 );
    1819}
    1920register_activation_hook( __FILE__, 'mailcheckco_plugin_activate' );
     
    4748    register_setting('mailcheckco-option-group', 'mailcheckco_enable_cf7');
    4849    register_setting('mailcheckco-option-group', 'mailcheckco_enable_woo');
     50    register_setting('mailcheckco-option-group', 'mailcheckco_enable_elementor');
    4951}
    5052
  • mailcheck-co/trunk/mailcheck.class.php

    r2414080 r2501230  
    4545        if (get_option('mailcheckco_enable_woo') == 1) {
    4646            add_filter('woocommerce_after_checkout_validation', array($this, 'validate_woo'), 10, 2);
     47        }
     48        if (get_option('mailcheckco_enable_elementor') == 1) {
     49            add_action('elementor_pro/forms/validation/email', array($this, 'validate_elementor'), 10, 3);
    4750        }
    4851    }
     
    107110    }
    108111
     112    function validate_elementor($field, $record, $ajax_handler){
     113        $email = $field['value'];
     114
     115        if (!empty($email)) {
     116            $result = $this->check($email);
     117            if (!$result['check']) {
     118                $ajax_handler->add_error( $field['id'], __($this->message) );
     119            }
     120        }
     121
     122    }
     123
    109124    function check($email)
    110125    {
  • mailcheck-co/trunk/options_page.php

    r2414080 r2501230  
    8282                    </td>
    8383                </tr>
     84                <tr valign="top">
     85                    <th scope="row"><?php _e('Enable for Elementor'); ?></th>
     86                    <td><input type="checkbox" name="mailcheckco_enable_elementor"
     87                               value="1" <?php echo empty(get_option('mailcheckco_enable_elementor')) ? '' : 'checked="checked"'; ?> />
     88                    </td>
     89                </tr>
    8490            </table>
    8591            <?php submit_button(); ?>
Note: See TracChangeset for help on using the changeset viewer.