Changeset 3057882
- Timestamp:
- 03/24/2024 09:45:06 PM (2 years ago)
- Location:
- captchafox-for-forms
- Files:
-
- 8 added
- 20 edited
- 1 copied
-
tags/1.5.0 (copied) (copied from captchafox-for-forms/trunk)
-
tags/1.5.0/assets/img/fluent-forms-logo.png (added)
-
tags/1.5.0/captchafox.php (modified) (2 diffs)
-
tags/1.5.0/readme.txt (modified) (3 diffs)
-
tags/1.5.0/src/php/Helper/CaptchaFox.php (modified) (2 diffs)
-
tags/1.5.0/src/php/Helper/Request.php (modified) (4 diffs)
-
tags/1.5.0/src/php/Initializer.php (modified) (1 diff)
-
tags/1.5.0/src/php/Plugins/FluentForms (added)
-
tags/1.5.0/src/php/Plugins/FluentForms/CaptchaFoxElement.php (added)
-
tags/1.5.0/src/php/Plugins/FluentForms/Forms.php (added)
-
tags/1.5.0/src/php/Plugins/NinjaForms/CaptchaFoxField.php (modified) (1 diff)
-
tags/1.5.0/src/php/Settings/Plugins.php (modified) (1 diff)
-
tags/1.5.0/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/1.5.0/vendor/composer/autoload_static.php (modified) (1 diff)
-
tags/1.5.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/assets/img/fluent-forms-logo.png (added)
-
trunk/captchafox.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/php/Helper/CaptchaFox.php (modified) (2 diffs)
-
trunk/src/php/Helper/Request.php (modified) (4 diffs)
-
trunk/src/php/Initializer.php (modified) (1 diff)
-
trunk/src/php/Plugins/FluentForms (added)
-
trunk/src/php/Plugins/FluentForms/CaptchaFoxElement.php (added)
-
trunk/src/php/Plugins/FluentForms/Forms.php (added)
-
trunk/src/php/Plugins/NinjaForms/CaptchaFoxField.php (modified) (1 diff)
-
trunk/src/php/Settings/Plugins.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
captchafox-for-forms/tags/1.5.0/captchafox.php
r3052710 r3057882 7 7 * Plugin Name: CaptchaFox for WordPress 8 8 * Description: GDPR compliant bot and spam protection with CaptchaFox. 9 * Version: 1. 4.09 * Version: 1.5.0 10 10 * Requires at least: 5.0 11 11 * Requires PHP: 7.0 … … 28 28 29 29 const CAPTCHAFOX_BASE_FILE = __FILE__; 30 const PLUGIN_VERSION = '1. 4.0';30 const PLUGIN_VERSION = '1.5.0'; 31 31 32 32 require 'vendor/autoload.php'; -
captchafox-for-forms/tags/1.5.0/readme.txt
r3052710 r3057882 1 1 === CaptchaFox for WordPress === 2 2 Contributors: scorialabs 3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots 3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots, form 4 4 Requires at least: 5.0 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1. 4.07 Stable tag: 1.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 * BBPress Reply 50 50 * Otter Blocks 51 * Fluent Forms 51 52 52 53 == Frequently Asked Questions == … … 77 78 == Changelog == 78 79 80 = 1.5.0 = 81 * Support Fluent Forms 82 79 83 = 1.4.0 = 80 84 * Tested on WooCommerce 8.6 -
captchafox-for-forms/tags/1.5.0/src/php/Helper/CaptchaFox.php
r3025079 r3057882 57 57 58 58 /** 59 * Print HTML for widget 60 * 61 * @return mixed 62 */ 63 public static function get_html() { 64 print( wp_kses_post( self::build_html() ) ); 65 } 66 67 /** 59 68 * Create HTML for widget 60 69 * 61 * @return void 70 * @param array $data Widget data. 71 * 72 * @return string 62 73 */ 63 public static function get_html() { 64 $data = self::get_widget_options(); 74 public static function build_html( $data = null ) { 75 if ( ! $data ) { 76 $data = self::get_widget_options(); 77 } 65 78 66 79 $attrs = ''; … … 73 86 $attrs = rtrim( $attrs ); 74 87 75 printf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [88 return sprintf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [ 76 89 'data', 77 90 ]) ); 91 78 92 } 79 93 -
captchafox-for-forms/tags/1.5.0/src/php/Helper/Request.php
r3007827 r3057882 10 10 */ 11 11 public static function validate_post() { 12 // phpcs:disable WordPress.Security.NonceVerification.Missing 12 13 if ( ! isset( $_POST['cf-captcha-response'] ) ) { 13 14 return false; … … 15 16 16 17 $response = filter_var( wp_unslash( $_POST['cf-captcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ); 18 // phpcs:enable WordPress.Security.NonceVerification.Missing 17 19 18 return self::validate( $response ) ;20 return self::validate( $response )->success; 19 21 } 20 22 … … 24 26 * @param string $response Response. 25 27 * 26 * @return bool28 * @return object 27 29 */ 28 30 public static function validate( string $response ) { … … 46 48 $captcha_success = json_decode( $body ); 47 49 if ( $captcha_success->success ) { 48 return true; 50 return (object) [ 51 'success' => true, 52 'errors' => [], 53 ]; 49 54 } 50 return false; 55 return (object) [ 56 'success' => false, 57 'errors' => $captcha_success->{'error-codes'}, 58 ]; 51 59 } 52 60 } -
captchafox-for-forms/tags/1.5.0/src/php/Initializer.php
r3007827 r3057882 131 131 'class' => Plugins\OtterBlocks\Forms::class, 132 132 ], 133 [ 134 'group' => 'fluent-forms', 135 'action' => 'form', 136 'plugins' => [ 'fluentform/fluentform.php' ], 137 'class' => Plugins\FluentForms\Forms::class, 138 ], 133 139 ]; 134 140 -
captchafox-for-forms/tags/1.5.0/src/php/Plugins/NinjaForms/CaptchaFoxField.php
r3007827 r3057882 61 61 } 62 62 63 $verified = Request::validate( $value ) ;63 $verified = Request::validate( $value )->success; 64 64 if ( ! $verified ) { 65 65 return __( 'Invalid Captcha', 'captchafox-for-forms' ); -
captchafox-for-forms/tags/1.5.0/src/php/Settings/Plugins.php
r3007827 r3057882 98 98 'group' => $setting_plugins, 99 99 'available' => is_plugin_active( 'otter-blocks/otter-blocks.php' ), 100 'options' => [ 101 'form' => __( 'Forms', 'captchafox-for-forms' ), 102 ], 103 ]); 104 add_settings_field('fluent-forms', $this->get_plugin_logo( 'fluent-forms' ), [ $this, 'render_plugin_field' ], $setting_plugins, $setting_plugins, [ 105 'label_for' => 'fluent-forms', 106 'class' => 'cf-plugin-item', 107 'group' => $setting_plugins, 108 'available' => is_plugin_active( 'fluentform/fluentform.php' ), 100 109 'options' => [ 101 110 'form' => __( 'Forms', 'captchafox-for-forms' ), -
captchafox-for-forms/tags/1.5.0/vendor/composer/autoload_classmap.php
r3007827 r3057882 13 13 'CaptchaFox\\Plugins\\BBPress\\Reply' => $baseDir . '/src/php/Plugins/BBPress/Reply.php', 14 14 'CaptchaFox\\Plugins\\ContactForm7\\Forms' => $baseDir . '/src/php/Plugins/ContactForm7/Forms.php', 15 'CaptchaFox\\Plugins\\FluentForms\\CaptchaFoxElement' => $baseDir . '/src/php/Plugins/FluentForms/CaptchaFoxElement.php', 16 'CaptchaFox\\Plugins\\FluentForms\\Forms' => $baseDir . '/src/php/Plugins/FluentForms/Forms.php', 15 17 'CaptchaFox\\Plugins\\Forminator\\Forms' => $baseDir . '/src/php/Plugins/Forminator/Forms.php', 16 18 'CaptchaFox\\Plugins\\Mailchimp\\Forms' => $baseDir . '/src/php/Plugins/Mailchimp/Forms.php', -
captchafox-for-forms/tags/1.5.0/vendor/composer/autoload_static.php
r3007827 r3057882 28 28 'CaptchaFox\\Plugins\\BBPress\\Reply' => __DIR__ . '/../..' . '/src/php/Plugins/BBPress/Reply.php', 29 29 'CaptchaFox\\Plugins\\ContactForm7\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/ContactForm7/Forms.php', 30 'CaptchaFox\\Plugins\\FluentForms\\CaptchaFoxElement' => __DIR__ . '/../..' . '/src/php/Plugins/FluentForms/CaptchaFoxElement.php', 31 'CaptchaFox\\Plugins\\FluentForms\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/FluentForms/Forms.php', 30 32 'CaptchaFox\\Plugins\\Forminator\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Forminator/Forms.php', 31 33 'CaptchaFox\\Plugins\\Mailchimp\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Mailchimp/Forms.php', -
captchafox-for-forms/tags/1.5.0/vendor/composer/installed.php
r3052710 r3057882 2 2 'root' => array( 3 3 'name' => 'captchafox/captchafox-wordpress', 4 'pretty_version' => '1. 4.0',5 'version' => '1. 4.0.0',6 'reference' => '5 e37087bd27eecd9d0f6273564d1cdffdd1ea864',4 'pretty_version' => '1.5.0', 5 'version' => '1.5.0.0', 6 'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'captchafox/captchafox-wordpress' => array( 14 'pretty_version' => '1. 4.0',15 'version' => '1. 4.0.0',16 'reference' => '5 e37087bd27eecd9d0f6273564d1cdffdd1ea864',14 'pretty_version' => '1.5.0', 15 'version' => '1.5.0.0', 16 'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
captchafox-for-forms/trunk/captchafox.php
r3052710 r3057882 7 7 * Plugin Name: CaptchaFox for WordPress 8 8 * Description: GDPR compliant bot and spam protection with CaptchaFox. 9 * Version: 1. 4.09 * Version: 1.5.0 10 10 * Requires at least: 5.0 11 11 * Requires PHP: 7.0 … … 28 28 29 29 const CAPTCHAFOX_BASE_FILE = __FILE__; 30 const PLUGIN_VERSION = '1. 4.0';30 const PLUGIN_VERSION = '1.5.0'; 31 31 32 32 require 'vendor/autoload.php'; -
captchafox-for-forms/trunk/readme.txt
r3052710 r3057882 1 1 === CaptchaFox for WordPress === 2 2 Contributors: scorialabs 3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots 3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots, form 4 4 Requires at least: 5.0 5 5 Tested up to: 6.5 6 6 Requires PHP: 7.0 7 Stable tag: 1. 4.07 Stable tag: 1.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 49 49 * BBPress Reply 50 50 * Otter Blocks 51 * Fluent Forms 51 52 52 53 == Frequently Asked Questions == … … 77 78 == Changelog == 78 79 80 = 1.5.0 = 81 * Support Fluent Forms 82 79 83 = 1.4.0 = 80 84 * Tested on WooCommerce 8.6 -
captchafox-for-forms/trunk/src/php/Helper/CaptchaFox.php
r3025079 r3057882 57 57 58 58 /** 59 * Print HTML for widget 60 * 61 * @return mixed 62 */ 63 public static function get_html() { 64 print( wp_kses_post( self::build_html() ) ); 65 } 66 67 /** 59 68 * Create HTML for widget 60 69 * 61 * @return void 70 * @param array $data Widget data. 71 * 72 * @return string 62 73 */ 63 public static function get_html() { 64 $data = self::get_widget_options(); 74 public static function build_html( $data = null ) { 75 if ( ! $data ) { 76 $data = self::get_widget_options(); 77 } 65 78 66 79 $attrs = ''; … … 73 86 $attrs = rtrim( $attrs ); 74 87 75 printf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [88 return sprintf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [ 76 89 'data', 77 90 ]) ); 91 78 92 } 79 93 -
captchafox-for-forms/trunk/src/php/Helper/Request.php
r3007827 r3057882 10 10 */ 11 11 public static function validate_post() { 12 // phpcs:disable WordPress.Security.NonceVerification.Missing 12 13 if ( ! isset( $_POST['cf-captcha-response'] ) ) { 13 14 return false; … … 15 16 16 17 $response = filter_var( wp_unslash( $_POST['cf-captcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS ); 18 // phpcs:enable WordPress.Security.NonceVerification.Missing 17 19 18 return self::validate( $response ) ;20 return self::validate( $response )->success; 19 21 } 20 22 … … 24 26 * @param string $response Response. 25 27 * 26 * @return bool28 * @return object 27 29 */ 28 30 public static function validate( string $response ) { … … 46 48 $captcha_success = json_decode( $body ); 47 49 if ( $captcha_success->success ) { 48 return true; 50 return (object) [ 51 'success' => true, 52 'errors' => [], 53 ]; 49 54 } 50 return false; 55 return (object) [ 56 'success' => false, 57 'errors' => $captcha_success->{'error-codes'}, 58 ]; 51 59 } 52 60 } -
captchafox-for-forms/trunk/src/php/Initializer.php
r3007827 r3057882 131 131 'class' => Plugins\OtterBlocks\Forms::class, 132 132 ], 133 [ 134 'group' => 'fluent-forms', 135 'action' => 'form', 136 'plugins' => [ 'fluentform/fluentform.php' ], 137 'class' => Plugins\FluentForms\Forms::class, 138 ], 133 139 ]; 134 140 -
captchafox-for-forms/trunk/src/php/Plugins/NinjaForms/CaptchaFoxField.php
r3007827 r3057882 61 61 } 62 62 63 $verified = Request::validate( $value ) ;63 $verified = Request::validate( $value )->success; 64 64 if ( ! $verified ) { 65 65 return __( 'Invalid Captcha', 'captchafox-for-forms' ); -
captchafox-for-forms/trunk/src/php/Settings/Plugins.php
r3007827 r3057882 98 98 'group' => $setting_plugins, 99 99 'available' => is_plugin_active( 'otter-blocks/otter-blocks.php' ), 100 'options' => [ 101 'form' => __( 'Forms', 'captchafox-for-forms' ), 102 ], 103 ]); 104 add_settings_field('fluent-forms', $this->get_plugin_logo( 'fluent-forms' ), [ $this, 'render_plugin_field' ], $setting_plugins, $setting_plugins, [ 105 'label_for' => 'fluent-forms', 106 'class' => 'cf-plugin-item', 107 'group' => $setting_plugins, 108 'available' => is_plugin_active( 'fluentform/fluentform.php' ), 100 109 'options' => [ 101 110 'form' => __( 'Forms', 'captchafox-for-forms' ), -
captchafox-for-forms/trunk/vendor/composer/autoload_classmap.php
r3007827 r3057882 13 13 'CaptchaFox\\Plugins\\BBPress\\Reply' => $baseDir . '/src/php/Plugins/BBPress/Reply.php', 14 14 'CaptchaFox\\Plugins\\ContactForm7\\Forms' => $baseDir . '/src/php/Plugins/ContactForm7/Forms.php', 15 'CaptchaFox\\Plugins\\FluentForms\\CaptchaFoxElement' => $baseDir . '/src/php/Plugins/FluentForms/CaptchaFoxElement.php', 16 'CaptchaFox\\Plugins\\FluentForms\\Forms' => $baseDir . '/src/php/Plugins/FluentForms/Forms.php', 15 17 'CaptchaFox\\Plugins\\Forminator\\Forms' => $baseDir . '/src/php/Plugins/Forminator/Forms.php', 16 18 'CaptchaFox\\Plugins\\Mailchimp\\Forms' => $baseDir . '/src/php/Plugins/Mailchimp/Forms.php', -
captchafox-for-forms/trunk/vendor/composer/autoload_static.php
r3007827 r3057882 28 28 'CaptchaFox\\Plugins\\BBPress\\Reply' => __DIR__ . '/../..' . '/src/php/Plugins/BBPress/Reply.php', 29 29 'CaptchaFox\\Plugins\\ContactForm7\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/ContactForm7/Forms.php', 30 'CaptchaFox\\Plugins\\FluentForms\\CaptchaFoxElement' => __DIR__ . '/../..' . '/src/php/Plugins/FluentForms/CaptchaFoxElement.php', 31 'CaptchaFox\\Plugins\\FluentForms\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/FluentForms/Forms.php', 30 32 'CaptchaFox\\Plugins\\Forminator\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Forminator/Forms.php', 31 33 'CaptchaFox\\Plugins\\Mailchimp\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Mailchimp/Forms.php', -
captchafox-for-forms/trunk/vendor/composer/installed.php
r3052710 r3057882 2 2 'root' => array( 3 3 'name' => 'captchafox/captchafox-wordpress', 4 'pretty_version' => '1. 4.0',5 'version' => '1. 4.0.0',6 'reference' => '5 e37087bd27eecd9d0f6273564d1cdffdd1ea864',4 'pretty_version' => '1.5.0', 5 'version' => '1.5.0.0', 6 'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'captchafox/captchafox-wordpress' => array( 14 'pretty_version' => '1. 4.0',15 'version' => '1. 4.0.0',16 'reference' => '5 e37087bd27eecd9d0f6273564d1cdffdd1ea864',14 'pretty_version' => '1.5.0', 15 'version' => '1.5.0.0', 16 'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.