Changeset 2501230
- Timestamp:
- 03/22/2021 05:49:16 PM (5 years ago)
- Location:
- mailcheck-co
- Files:
-
- 8 edited
- 1 copied
-
tags/0.4 (copied) (copied from mailcheck-co/trunk)
-
tags/0.4/README.txt (modified) (3 diffs)
-
tags/0.4/mailcheck-co.php (modified) (2 diffs)
-
tags/0.4/mailcheck.class.php (modified) (2 diffs)
-
tags/0.4/options_page.php (modified) (1 diff)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/mailcheck-co.php (modified) (2 diffs)
-
trunk/mailcheck.class.php (modified) (2 diffs)
-
trunk/options_page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mailcheck-co/tags/0.4/README.txt
r2432898 r2501230 6 6 Contributors: nosovk, mailcheckco, 0jekson0 7 7 Requires at least: 4.7.0 8 Tested up to: 5. 5.39 Stable tag: 0. 38 Tested up to: 5.6.2 9 Stable tag: 0.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 * Contact Form 7 28 28 * WooCommerce 29 * Elementor 29 30 30 31 You can install and use the plugin by adding an API key, generated from the account [free account](https://www.mailcheck.co). … … 72 73 == Changelog == 73 74 75 = 0.4 = 76 Added Elementor integration 77 74 78 = 0.3 = 75 79 Updated compatibility and assets -
mailcheck-co/tags/0.4/mailcheck-co.php
r2414080 r2501230 16 16 add_option('mailcheckco_enable_cf7', 1 ); 17 17 add_option('mailcheckco_enable_woo', 0 ); 18 add_option('mailcheckco_enable_elementor', 0 ); 18 19 } 19 20 register_activation_hook( __FILE__, 'mailcheckco_plugin_activate' ); … … 47 48 register_setting('mailcheckco-option-group', 'mailcheckco_enable_cf7'); 48 49 register_setting('mailcheckco-option-group', 'mailcheckco_enable_woo'); 50 register_setting('mailcheckco-option-group', 'mailcheckco_enable_elementor'); 49 51 } 50 52 -
mailcheck-co/tags/0.4/mailcheck.class.php
r2414080 r2501230 45 45 if (get_option('mailcheckco_enable_woo') == 1) { 46 46 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); 47 50 } 48 51 } … … 107 110 } 108 111 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 109 124 function check($email) 110 125 { -
mailcheck-co/tags/0.4/options_page.php
r2414080 r2501230 82 82 </td> 83 83 </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> 84 90 </table> 85 91 <?php submit_button(); ?> -
mailcheck-co/trunk/README.txt
r2432898 r2501230 6 6 Contributors: nosovk, mailcheckco, 0jekson0 7 7 Requires at least: 4.7.0 8 Tested up to: 5. 5.39 Stable tag: 0. 38 Tested up to: 5.6.2 9 Stable tag: 0.4 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 27 27 * Contact Form 7 28 28 * WooCommerce 29 * Elementor 29 30 30 31 You can install and use the plugin by adding an API key, generated from the account [free account](https://www.mailcheck.co). … … 72 73 == Changelog == 73 74 75 = 0.4 = 76 Added Elementor integration 77 74 78 = 0.3 = 75 79 Updated compatibility and assets -
mailcheck-co/trunk/mailcheck-co.php
r2414080 r2501230 16 16 add_option('mailcheckco_enable_cf7', 1 ); 17 17 add_option('mailcheckco_enable_woo', 0 ); 18 add_option('mailcheckco_enable_elementor', 0 ); 18 19 } 19 20 register_activation_hook( __FILE__, 'mailcheckco_plugin_activate' ); … … 47 48 register_setting('mailcheckco-option-group', 'mailcheckco_enable_cf7'); 48 49 register_setting('mailcheckco-option-group', 'mailcheckco_enable_woo'); 50 register_setting('mailcheckco-option-group', 'mailcheckco_enable_elementor'); 49 51 } 50 52 -
mailcheck-co/trunk/mailcheck.class.php
r2414080 r2501230 45 45 if (get_option('mailcheckco_enable_woo') == 1) { 46 46 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); 47 50 } 48 51 } … … 107 110 } 108 111 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 109 124 function check($email) 110 125 { -
mailcheck-co/trunk/options_page.php
r2414080 r2501230 82 82 </td> 83 83 </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> 84 90 </table> 85 91 <?php submit_button(); ?>
Note: See TracChangeset
for help on using the changeset viewer.