Changeset 3080369
- Timestamp:
- 05/02/2024 12:08:03 PM (11 months ago)
- Location:
- friendly-captcha
- Files:
-
- 20 added
- 12 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
friendly-captcha/tags/1.13.0/friendly-captcha.php
r3045871 r3080369 4 4 * Plugin Name: Friendly Captcha for WordPress 5 5 * Description: Protect WordPress website forms from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution. 6 * Version: 1.1 2.36 * Version: 1.13.0 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.3 … … 20 20 } 21 21 22 define('FRIENDLY_CAPTCHA_VERSION', '1.1 2.3');22 define('FRIENDLY_CAPTCHA_VERSION', '1.13.0'); 23 23 define('FRIENDLY_CAPTCHA_FRIENDLY_CHALLENGE_VERSION', '0.9.12'); 24 24 define('FRIENDLY_CAPTCHA_SUPPORTED_LANGUAGES', [ -
friendly-captcha/tags/1.13.0/includes/core.php
r2988129 r3080369 1 1 <?php 2 2 3 /* Main entry point */ 3 /* Main entry point */ 4 4 5 5 // TODO: is this necessary? It breaks intellisense.. 6 // if ( !class_exists( 'FriendlyCaptcha_Plugin' ) ) { 6 // if ( !class_exists( 'FriendlyCaptcha_Plugin' ) ) { 7 7 class FriendlyCaptcha_Plugin { 8 8 … … 33 33 public static $option_html_forms_integration_active_name = "frcaptcha_html_forms_integration_active"; 34 34 public static $option_forminator_integration_active_name = "frcaptcha_forminator_integration_active"; 35 public static $option_formidable_integration_active_name = "frcaptcha_formidable_integration_active"; 35 36 public static $option_avada_forms_integration_active_name = "frcaptcha_avada_forms_integration_active"; 36 37 … … 45 46 public static $option_wc_lost_password_integration_active_name = "frcaptcha_wc_lost_password_integration_active"; 46 47 public static $option_wc_checkout_integration_active_name = "frcaptcha_wc_checkout_integration_active"; 47 48 48 49 public static $option_um_login_integration_active_name = "frcaptcha_um_login_integration_active"; 49 50 public static $option_um_register_integration_active_name = "frcaptcha_um_register_integration_active"; … … 53 54 public static $option_wpum_login_integration_active_name = "frcaptcha_wpum_login_integration_active"; 54 55 public static $option_wpum_password_recovery_integration_active_name = "frcaptcha_wpum_password_recovery_integration_active"; 55 56 56 57 public static $option_pb_login_integration_active_name = "frcaptcha_pb_login_integration_active"; 57 58 public static $option_pb_register_integration_active_name = "frcaptcha_pb_register_integration_active"; 58 59 public static $option_pb_reset_password_integration_active_name = "frcaptcha_pb_reset_password_integration_active"; 60 public static $option_divi_integration_active_name = "frcaptcha_divi_integration_active"; 59 61 60 62 public static $option_widget_language_name = "frcaptcha_widget_language"; … … 63 65 public static $option_global_puzzle_endpoint_active_name = "frcaptcha_global_endpoint_active"; 64 66 public static $option_eu_puzzle_endpoint_active_name = "frcaptcha_eu_endpoint_active"; 65 67 66 68 67 69 public function init() { … … 141 143 return get_option(FriendlyCaptcha_Plugin::$option_forminator_integration_active_name) == 1; 142 144 } 143 145 146 public function get_formidable_active() { 147 return get_option(FriendlyCaptcha_Plugin::$option_formidable_integration_active_name) == 1; 148 } 149 144 150 public function get_avada_forms_active() { 145 151 return get_option(FriendlyCaptcha_Plugin::$option_avada_forms_integration_active_name) == 1; … … 217 223 return get_option(FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name) == 1; 218 224 } 225 226 public function get_divi_active() { 227 return get_option(FriendlyCaptcha_Plugin::$option_divi_integration_active_name) == 1; 228 } 229 219 230 220 231 /* Widget options */ … … 259 270 require plugin_dir_path( __FILE__ ) . 'helpers.php'; 260 271 require plugin_dir_path( __FILE__ ) . 'verification.php'; 261 272 262 273 // Register widget routines 263 274 require plugin_dir_path( __FILE__ ) . '../public/widgets.php'; … … 299 310 } 300 311 312 if (FriendlyCaptcha_Plugin::$instance->get_formidable_active()) { 313 require plugin_dir_path( __FILE__ ) . '../modules/formidable/formidable.php'; 314 } 315 301 316 if (FriendlyCaptcha_Plugin::$instance->get_avada_forms_active()) { 302 317 require plugin_dir_path( __FILE__ ) . '../modules/avada-forms/avada-forms.php'; … … 371 386 372 387 if (FriendlyCaptcha_Plugin::$instance->get_pb_reset_password_active()) { 373 require plugin_dir_path( __FILE__ ) . '../modules/profile-builder/profile_builder_reset_password.php'; 388 require plugin_dir_path(__FILE__) . '../modules/profile-builder/profile_builder_reset_password.php'; 389 } 390 391 if (FriendlyCaptcha_Plugin::$instance->get_divi_active()) { 392 require plugin_dir_path( __FILE__ ) . '../modules/divi/divi.php'; 374 393 } 375 394 // } -
friendly-captcha/tags/1.13.0/includes/settings.php
r2986098 r3080369 62 62 register_setting( 63 63 FriendlyCaptcha_Plugin::$option_group, 64 FriendlyCaptcha_Plugin::$option_formidable_integration_active_name 65 ); 66 register_setting( 67 FriendlyCaptcha_Plugin::$option_group, 64 68 FriendlyCaptcha_Plugin::$option_avada_forms_integration_active_name 65 69 ); … … 135 139 FriendlyCaptcha_Plugin::$option_group, 136 140 FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name 141 ); 142 143 register_setting( 144 FriendlyCaptcha_Plugin::$option_group, 145 FriendlyCaptcha_Plugin::$option_divi_integration_active_name 137 146 ); 138 147 … … 310 319 311 320 add_settings_field( 321 'frcaptcha_settings_formidable_integration_field', 322 'Formidable', 'frcaptcha_settings_field_callback', 323 'friendly_captcha_admin', 324 'frcaptcha_integrations_settings_section', 325 array( 326 "option_name" => FriendlyCaptcha_Plugin::$option_formidable_integration_active_name, 327 "description" => "Enable Friendly Captcha for <a href=\"https://wordpress.org/plugins/formidable/\" target=\"_blank\">Formidable</a>.<br /><strong>Important:</strong> Make sure to add the new Friendly Captcha field to your forms.", 328 "type" => "checkbox" 329 ) 330 ); 331 332 add_settings_field( 312 333 'frcaptcha_settings_avada_forms_integration_field', 313 334 'Avada Form Builder', 'frcaptcha_settings_field_callback', … … 533 554 "option_name" => FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name, 534 555 "description" => "Enable Friendly Captcha for the <a href=\"https://de.wordpress.org/plugins/profile-builder/\" target=\"_blank\">Profile Builder</a> reset password form.", 556 "type" => "checkbox" 557 ) 558 ); 559 560 add_settings_field( 561 'frcaptcha_settings_divi_integration_field', 562 'Divi Theme Contact Form', 'frcaptcha_settings_field_callback', 563 'friendly_captcha_admin', 564 'frcaptcha_integrations_settings_section', 565 array( 566 "option_name" => FriendlyCaptcha_Plugin::$option_divi_integration_active_name, 567 "description" => "Enable Friendly Captcha and replace ReCaptcha in the <a href=\"https://www.elegantthemes.com/gallery/divi//\" target=\"_blank\">Divi Theme</a> contact form.<br /><strong>Important:</strong> Please choose 'FriendlyCaptcha verification' as spam protection in each individual Divi contact form.", 535 568 "type" => "checkbox" 536 569 ) -
friendly-captcha/tags/1.13.0/public/mutation-observer.js
r2986098 r3080369 1 1 (function () { 2 2 function findCaptchaElements(node) { 3 return node.querySelectorAll(".frc-captcha"); 3 if (node.querySelectorAll) { 4 return node.querySelectorAll(".frc-captcha"); 5 } else { 6 return []; 7 } 4 8 } 5 9 … … 29 33 const mutation = mutationList[m]; 30 34 31 if (mutation.type === "childList") { 32 // We only care about new nodes being added 33 const nodes = mutation.addedNodes; 35 const nodes = mutation.addedNodes; 34 36 35 for (let n = 0; n < nodes.length; n++) { 36 setupCaptchaElements(nodes[n]); 37 } 37 for (let n = 0; n < nodes.length; n++) { 38 setupCaptchaElements(nodes[n]); 38 39 } 39 40 } 40 41 }); 41 42 42 // Start observing the document body for changes 43 observer.observe(document.body, { 44 attributes: false, 45 childList: true, 46 subtree: false, 47 }); 43 function init() { 44 // Start observing the document body for changes 45 observer.observe(document.body, { 46 attributes: false, 47 childList: true, 48 subtree: true, 49 })}; 50 51 init(); 48 52 })(); -
friendly-captcha/tags/1.13.0/public/widgets.php
r2986098 r3080369 1 1 <?php 2 2 3 function frcaptcha_enqueue_widget_scripts( ) {3 function frcaptcha_enqueue_widget_scripts($forceMutationObserver = false) { 4 4 $plugin = FriendlyCaptcha_Plugin::$instance; 5 5 … … 26 26 ); 27 27 28 if ( $ plugin->get_enable_mutation_observer() ) {28 if ( $forceMutationObserver || $plugin->get_enable_mutation_observer() ) { 29 29 wp_enqueue_script( 'friendly-captcha-mutation-observer', 30 30 plugin_dir_url( __FILE__ ) . 'mutation-observer.js', … … 62 62 return str_replace( '<script', '<script async defer nomodule', $tag ); 63 63 } 64 64 if ( 'friendly-captcha-mutation-observer' == $handle) { 65 return str_replace( '<script', '<script async defer', $tag ); 66 } 67 65 68 return $tag; 66 69 } … … 77 80 $global = $plugin->get_global_puzzle_endpoint_active(); 78 81 $eu = $plugin->get_eu_puzzle_endpoint_active(); 79 82 80 83 if ($global && $eu) { 81 84 $extra_attributes = "data-puzzle-endpoint=\"https://eu-api.friendlycaptcha.eu/api/v1/puzzle,https://api.friendlycaptcha.com/api/v1/puzzle\""; -
friendly-captcha/tags/1.13.0/readme.txt
r3045871 r3080369 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.3 7 Stable tag: 1.1 2.37 Stable tag: 1.13.0 8 8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 72 72 * CoBlocks 73 73 * Contact Form 7 74 * Divi Contact Forms 74 75 * Elementor Pro Forms 75 76 * FluentForm … … 87 88 * Profile Builder Reset Password Form 88 89 * Forminator 90 * Formidable 89 91 * Avada Form Builder 90 92 … … 94 96 95 97 == Changelog == 98 99 = 1.13.0 = 100 101 * Add support for Formidable 102 * Add support for Divi Contact Forms 96 103 97 104 = 1.12.3 = -
friendly-captcha/trunk/friendly-captcha.php
r3045871 r3080369 4 4 * Plugin Name: Friendly Captcha for WordPress 5 5 * Description: Protect WordPress website forms from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution. 6 * Version: 1.1 2.36 * Version: 1.13.0 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.3 … … 20 20 } 21 21 22 define('FRIENDLY_CAPTCHA_VERSION', '1.1 2.3');22 define('FRIENDLY_CAPTCHA_VERSION', '1.13.0'); 23 23 define('FRIENDLY_CAPTCHA_FRIENDLY_CHALLENGE_VERSION', '0.9.12'); 24 24 define('FRIENDLY_CAPTCHA_SUPPORTED_LANGUAGES', [ -
friendly-captcha/trunk/includes/core.php
r2988129 r3080369 1 1 <?php 2 2 3 /* Main entry point */ 3 /* Main entry point */ 4 4 5 5 // TODO: is this necessary? It breaks intellisense.. 6 // if ( !class_exists( 'FriendlyCaptcha_Plugin' ) ) { 6 // if ( !class_exists( 'FriendlyCaptcha_Plugin' ) ) { 7 7 class FriendlyCaptcha_Plugin { 8 8 … … 33 33 public static $option_html_forms_integration_active_name = "frcaptcha_html_forms_integration_active"; 34 34 public static $option_forminator_integration_active_name = "frcaptcha_forminator_integration_active"; 35 public static $option_formidable_integration_active_name = "frcaptcha_formidable_integration_active"; 35 36 public static $option_avada_forms_integration_active_name = "frcaptcha_avada_forms_integration_active"; 36 37 … … 45 46 public static $option_wc_lost_password_integration_active_name = "frcaptcha_wc_lost_password_integration_active"; 46 47 public static $option_wc_checkout_integration_active_name = "frcaptcha_wc_checkout_integration_active"; 47 48 48 49 public static $option_um_login_integration_active_name = "frcaptcha_um_login_integration_active"; 49 50 public static $option_um_register_integration_active_name = "frcaptcha_um_register_integration_active"; … … 53 54 public static $option_wpum_login_integration_active_name = "frcaptcha_wpum_login_integration_active"; 54 55 public static $option_wpum_password_recovery_integration_active_name = "frcaptcha_wpum_password_recovery_integration_active"; 55 56 56 57 public static $option_pb_login_integration_active_name = "frcaptcha_pb_login_integration_active"; 57 58 public static $option_pb_register_integration_active_name = "frcaptcha_pb_register_integration_active"; 58 59 public static $option_pb_reset_password_integration_active_name = "frcaptcha_pb_reset_password_integration_active"; 60 public static $option_divi_integration_active_name = "frcaptcha_divi_integration_active"; 59 61 60 62 public static $option_widget_language_name = "frcaptcha_widget_language"; … … 63 65 public static $option_global_puzzle_endpoint_active_name = "frcaptcha_global_endpoint_active"; 64 66 public static $option_eu_puzzle_endpoint_active_name = "frcaptcha_eu_endpoint_active"; 65 67 66 68 67 69 public function init() { … … 141 143 return get_option(FriendlyCaptcha_Plugin::$option_forminator_integration_active_name) == 1; 142 144 } 143 145 146 public function get_formidable_active() { 147 return get_option(FriendlyCaptcha_Plugin::$option_formidable_integration_active_name) == 1; 148 } 149 144 150 public function get_avada_forms_active() { 145 151 return get_option(FriendlyCaptcha_Plugin::$option_avada_forms_integration_active_name) == 1; … … 217 223 return get_option(FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name) == 1; 218 224 } 225 226 public function get_divi_active() { 227 return get_option(FriendlyCaptcha_Plugin::$option_divi_integration_active_name) == 1; 228 } 229 219 230 220 231 /* Widget options */ … … 259 270 require plugin_dir_path( __FILE__ ) . 'helpers.php'; 260 271 require plugin_dir_path( __FILE__ ) . 'verification.php'; 261 272 262 273 // Register widget routines 263 274 require plugin_dir_path( __FILE__ ) . '../public/widgets.php'; … … 299 310 } 300 311 312 if (FriendlyCaptcha_Plugin::$instance->get_formidable_active()) { 313 require plugin_dir_path( __FILE__ ) . '../modules/formidable/formidable.php'; 314 } 315 301 316 if (FriendlyCaptcha_Plugin::$instance->get_avada_forms_active()) { 302 317 require plugin_dir_path( __FILE__ ) . '../modules/avada-forms/avada-forms.php'; … … 371 386 372 387 if (FriendlyCaptcha_Plugin::$instance->get_pb_reset_password_active()) { 373 require plugin_dir_path( __FILE__ ) . '../modules/profile-builder/profile_builder_reset_password.php'; 388 require plugin_dir_path(__FILE__) . '../modules/profile-builder/profile_builder_reset_password.php'; 389 } 390 391 if (FriendlyCaptcha_Plugin::$instance->get_divi_active()) { 392 require plugin_dir_path( __FILE__ ) . '../modules/divi/divi.php'; 374 393 } 375 394 // } -
friendly-captcha/trunk/includes/settings.php
r2986098 r3080369 62 62 register_setting( 63 63 FriendlyCaptcha_Plugin::$option_group, 64 FriendlyCaptcha_Plugin::$option_formidable_integration_active_name 65 ); 66 register_setting( 67 FriendlyCaptcha_Plugin::$option_group, 64 68 FriendlyCaptcha_Plugin::$option_avada_forms_integration_active_name 65 69 ); … … 135 139 FriendlyCaptcha_Plugin::$option_group, 136 140 FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name 141 ); 142 143 register_setting( 144 FriendlyCaptcha_Plugin::$option_group, 145 FriendlyCaptcha_Plugin::$option_divi_integration_active_name 137 146 ); 138 147 … … 310 319 311 320 add_settings_field( 321 'frcaptcha_settings_formidable_integration_field', 322 'Formidable', 'frcaptcha_settings_field_callback', 323 'friendly_captcha_admin', 324 'frcaptcha_integrations_settings_section', 325 array( 326 "option_name" => FriendlyCaptcha_Plugin::$option_formidable_integration_active_name, 327 "description" => "Enable Friendly Captcha for <a href=\"https://wordpress.org/plugins/formidable/\" target=\"_blank\">Formidable</a>.<br /><strong>Important:</strong> Make sure to add the new Friendly Captcha field to your forms.", 328 "type" => "checkbox" 329 ) 330 ); 331 332 add_settings_field( 312 333 'frcaptcha_settings_avada_forms_integration_field', 313 334 'Avada Form Builder', 'frcaptcha_settings_field_callback', … … 533 554 "option_name" => FriendlyCaptcha_Plugin::$option_pb_reset_password_integration_active_name, 534 555 "description" => "Enable Friendly Captcha for the <a href=\"https://de.wordpress.org/plugins/profile-builder/\" target=\"_blank\">Profile Builder</a> reset password form.", 556 "type" => "checkbox" 557 ) 558 ); 559 560 add_settings_field( 561 'frcaptcha_settings_divi_integration_field', 562 'Divi Theme Contact Form', 'frcaptcha_settings_field_callback', 563 'friendly_captcha_admin', 564 'frcaptcha_integrations_settings_section', 565 array( 566 "option_name" => FriendlyCaptcha_Plugin::$option_divi_integration_active_name, 567 "description" => "Enable Friendly Captcha and replace ReCaptcha in the <a href=\"https://www.elegantthemes.com/gallery/divi//\" target=\"_blank\">Divi Theme</a> contact form.<br /><strong>Important:</strong> Please choose 'FriendlyCaptcha verification' as spam protection in each individual Divi contact form.", 535 568 "type" => "checkbox" 536 569 ) -
friendly-captcha/trunk/public/mutation-observer.js
r2986098 r3080369 1 1 (function () { 2 2 function findCaptchaElements(node) { 3 return node.querySelectorAll(".frc-captcha"); 3 if (node.querySelectorAll) { 4 return node.querySelectorAll(".frc-captcha"); 5 } else { 6 return []; 7 } 4 8 } 5 9 … … 29 33 const mutation = mutationList[m]; 30 34 31 if (mutation.type === "childList") { 32 // We only care about new nodes being added 33 const nodes = mutation.addedNodes; 35 const nodes = mutation.addedNodes; 34 36 35 for (let n = 0; n < nodes.length; n++) { 36 setupCaptchaElements(nodes[n]); 37 } 37 for (let n = 0; n < nodes.length; n++) { 38 setupCaptchaElements(nodes[n]); 38 39 } 39 40 } 40 41 }); 41 42 42 // Start observing the document body for changes 43 observer.observe(document.body, { 44 attributes: false, 45 childList: true, 46 subtree: false, 47 }); 43 function init() { 44 // Start observing the document body for changes 45 observer.observe(document.body, { 46 attributes: false, 47 childList: true, 48 subtree: true, 49 })}; 50 51 init(); 48 52 })(); -
friendly-captcha/trunk/public/widgets.php
r2986098 r3080369 1 1 <?php 2 2 3 function frcaptcha_enqueue_widget_scripts( ) {3 function frcaptcha_enqueue_widget_scripts($forceMutationObserver = false) { 4 4 $plugin = FriendlyCaptcha_Plugin::$instance; 5 5 … … 26 26 ); 27 27 28 if ( $ plugin->get_enable_mutation_observer() ) {28 if ( $forceMutationObserver || $plugin->get_enable_mutation_observer() ) { 29 29 wp_enqueue_script( 'friendly-captcha-mutation-observer', 30 30 plugin_dir_url( __FILE__ ) . 'mutation-observer.js', … … 62 62 return str_replace( '<script', '<script async defer nomodule', $tag ); 63 63 } 64 64 if ( 'friendly-captcha-mutation-observer' == $handle) { 65 return str_replace( '<script', '<script async defer', $tag ); 66 } 67 65 68 return $tag; 66 69 } … … 77 80 $global = $plugin->get_global_puzzle_endpoint_active(); 78 81 $eu = $plugin->get_eu_puzzle_endpoint_active(); 79 82 80 83 if ($global && $eu) { 81 84 $extra_attributes = "data-puzzle-endpoint=\"https://eu-api.friendlycaptcha.eu/api/v1/puzzle,https://api.friendlycaptcha.com/api/v1/puzzle\""; -
friendly-captcha/trunk/readme.txt
r3045871 r3080369 5 5 Tested up to: 6.4 6 6 Requires PHP: 7.3 7 Stable tag: 1.1 2.37 Stable tag: 1.13.0 8 8 License: GPL v2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 72 72 * CoBlocks 73 73 * Contact Form 7 74 * Divi Contact Forms 74 75 * Elementor Pro Forms 75 76 * FluentForm … … 87 88 * Profile Builder Reset Password Form 88 89 * Forminator 90 * Formidable 89 91 * Avada Form Builder 90 92 … … 94 96 95 97 == Changelog == 98 99 = 1.13.0 = 100 101 * Add support for Formidable 102 * Add support for Divi Contact Forms 96 103 97 104 = 1.12.3 =
Note: See TracChangeset
for help on using the changeset viewer.