Changeset 3193531
- Timestamp:
- 11/20/2024 10:55:32 PM (15 months ago)
- Location:
- email-blacklist-for-elementor-forms
- Files:
-
- 7 added
- 2 edited
-
tags/1.0.2 (added)
-
tags/1.0.2/email-blacklist-for-elementor-forms.php (added)
-
tags/1.0.2/languages (added)
-
tags/1.0.2/readme.txt (added)
-
tags/1.0.2/screenshot-1.png (added)
-
tags/1.0.2/screenshot-2.png (added)
-
tags/1.0.2/screenshot-3.png (added)
-
trunk/email-blacklist-for-elementor-forms.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
email-blacklist-for-elementor-forms/trunk/email-blacklist-for-elementor-forms.php
r3082898 r3193531 4 4 * Plugin URI: https://zeropointdevelopment.com 5 5 * Description: Adds a text area control called "Blacklist" to the Elementor Forms control. Blocks outgoing emails if they match with any on the blacklist. 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: Wil Brown 8 8 * Author URI: https://zeropointdevelopment.com/about … … 79 79 $settings = $record->get( 'form_settings' ); 80 80 $blacklist = sanitize_textarea_field( $settings['blacklist'] ); 81 if ( empty( $blacklist ) ) { 82 return; 83 } 81 84 $blacklist_values = explode( ',', $blacklist ); 82 85 83 86 $blocked_email_msg = "that email or domain"; 84 87 $has_blocked_email = false; 85 // Loop through the block list and match with outgoing email value 86 foreach( $blacklist_values as $blacklist_value ){ 87 if( ( strpos( $field['value'], trim( $blacklist_value) ) || ( $field['value'] === trim( $blacklist_value ) ) ) && !$has_blocked_email){ 88 $has_blocked_email = true; 89 $blocked_email_msg = '"'. trim( $blacklist_value ) . '"'; 90 } 91 } 88 // Loop through the block list and match with outgoing email value 89 foreach( $blacklist_values as $blacklist_value ) { 90 $blacklist_value = trim($blacklist_value); // Trim spaces 91 if ( empty($blacklist_value) ) { 92 continue; // Skip empty blacklist values 93 } 94 if ( strpos( $field['value'], $blacklist_value ) !== false || $field['value'] === $blacklist_value ) { 95 $has_blocked_email = true; 96 $blocked_email_msg = '"' . $blacklist_value . '"'; 97 break; // Stop further checking once a match is found 98 } 99 } 92 100 93 101 //If there's a match on the blacklist, show an error. -
email-blacklist-for-elementor-forms/trunk/readme.txt
r3112017 r3193531 4 4 Requires at least: 6.0 5 5 Requires PHP: 8.1 6 Tested up to: 6. 67 Stable tag: 1.0. 16 Tested up to: 6.7 7 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.