Plugin Directory

Changeset 3057882


Ignore:
Timestamp:
03/24/2024 09:45:06 PM (2 years ago)
Author:
scorialabs
Message:

Update to version 1.5.0 from GitHub

Location:
captchafox-for-forms
Files:
8 added
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • captchafox-for-forms/tags/1.5.0/captchafox.php

    r3052710 r3057882  
    77 * Plugin Name:           CaptchaFox for WordPress
    88 * Description:           GDPR compliant bot and spam protection with CaptchaFox.
    9  * Version:               1.4.0
     9 * Version:               1.5.0
    1010 * Requires at least:     5.0
    1111 * Requires PHP:          7.0
     
    2828
    2929const CAPTCHAFOX_BASE_FILE = __FILE__;
    30 const PLUGIN_VERSION = '1.4.0';
     30const PLUGIN_VERSION = '1.5.0';
    3131
    3232require 'vendor/autoload.php';
  • captchafox-for-forms/tags/1.5.0/readme.txt

    r3052710 r3057882  
    11=== CaptchaFox for WordPress ===
    22Contributors: scorialabs
    3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots
     3Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots, form
    44Requires at least: 5.0
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.4.0
     7Stable tag: 1.5.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949* BBPress Reply
    5050* Otter Blocks
     51* Fluent Forms
    5152
    5253== Frequently Asked Questions ==
     
    7778== Changelog ==
    7879
     80= 1.5.0 =
     81* Support Fluent Forms
     82
    7983= 1.4.0 =
    8084* Tested on WooCommerce 8.6
  • captchafox-for-forms/tags/1.5.0/src/php/Helper/CaptchaFox.php

    r3025079 r3057882  
    5757
    5858    /**
     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    /**
    5968     * Create HTML for widget
    6069     *
    61      * @return void
     70     * @param array $data Widget data.
     71     *
     72     * @return string
    6273     */
    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        }
    6578
    6679        $attrs = '';
     
    7386        $attrs = rtrim( $attrs );
    7487
    75         printf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [
     88        return sprintf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [
    7689            'data',
    7790        ]) );
     91
    7892    }
    7993
  • captchafox-for-forms/tags/1.5.0/src/php/Helper/Request.php

    r3007827 r3057882  
    1010     */
    1111    public static function validate_post() {
     12        // phpcs:disable WordPress.Security.NonceVerification.Missing
    1213        if ( ! isset( $_POST['cf-captcha-response'] ) ) {
    1314            return false;
     
    1516
    1617        $response = filter_var( wp_unslash( $_POST['cf-captcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS );
     18        // phpcs:enable WordPress.Security.NonceVerification.Missing
    1719
    18         return self::validate( $response );
     20        return self::validate( $response )->success;
    1921    }
    2022
     
    2426     * @param string $response Response.
    2527     *
    26      * @return bool
     28     * @return object
    2729     */
    2830    public static function validate( string $response ) {
     
    4648        $captcha_success = json_decode( $body );
    4749        if ( $captcha_success->success ) {
    48             return true;
     50            return (object) [
     51                'success' => true,
     52                'errors'  => [],
     53            ];
    4954        }
    50         return false;
     55        return (object) [
     56            'success' => false,
     57            'errors'  => $captcha_success->{'error-codes'},
     58        ];
    5159    }
    5260}
  • captchafox-for-forms/tags/1.5.0/src/php/Initializer.php

    r3007827 r3057882  
    131131                'class'   => Plugins\OtterBlocks\Forms::class,
    132132            ],
     133            [
     134                'group'   => 'fluent-forms',
     135                'action'  => 'form',
     136                'plugins' => [ 'fluentform/fluentform.php' ],
     137                'class'   => Plugins\FluentForms\Forms::class,
     138            ],
    133139        ];
    134140
  • captchafox-for-forms/tags/1.5.0/src/php/Plugins/NinjaForms/CaptchaFoxField.php

    r3007827 r3057882  
    6161        }
    6262
    63         $verified = Request::validate( $value );
     63        $verified = Request::validate( $value )->success;
    6464        if ( ! $verified ) {
    6565            return __( 'Invalid Captcha', 'captchafox-for-forms' );
  • captchafox-for-forms/tags/1.5.0/src/php/Settings/Plugins.php

    r3007827 r3057882  
    9898            'group'     => $setting_plugins,
    9999            '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' ),
    100109            'options'   => [
    101110                'form' => __( 'Forms', 'captchafox-for-forms' ),
  • captchafox-for-forms/tags/1.5.0/vendor/composer/autoload_classmap.php

    r3007827 r3057882  
    1313    'CaptchaFox\\Plugins\\BBPress\\Reply' => $baseDir . '/src/php/Plugins/BBPress/Reply.php',
    1414    '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',
    1517    'CaptchaFox\\Plugins\\Forminator\\Forms' => $baseDir . '/src/php/Plugins/Forminator/Forms.php',
    1618    '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  
    2828        'CaptchaFox\\Plugins\\BBPress\\Reply' => __DIR__ . '/../..' . '/src/php/Plugins/BBPress/Reply.php',
    2929        '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',
    3032        'CaptchaFox\\Plugins\\Forminator\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Forminator/Forms.php',
    3133        'CaptchaFox\\Plugins\\Mailchimp\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Mailchimp/Forms.php',
  • captchafox-for-forms/tags/1.5.0/vendor/composer/installed.php

    r3052710 r3057882  
    22    'root' => array(
    33        'name' => 'captchafox/captchafox-wordpress',
    4         'pretty_version' => '1.4.0',
    5         'version' => '1.4.0.0',
    6         'reference' => '5e37087bd27eecd9d0f6273564d1cdffdd1ea864',
     4        'pretty_version' => '1.5.0',
     5        'version' => '1.5.0.0',
     6        'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'captchafox/captchafox-wordpress' => array(
    14             'pretty_version' => '1.4.0',
    15             'version' => '1.4.0.0',
    16             'reference' => '5e37087bd27eecd9d0f6273564d1cdffdd1ea864',
     14            'pretty_version' => '1.5.0',
     15            'version' => '1.5.0.0',
     16            'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • captchafox-for-forms/trunk/captchafox.php

    r3052710 r3057882  
    77 * Plugin Name:           CaptchaFox for WordPress
    88 * Description:           GDPR compliant bot and spam protection with CaptchaFox.
    9  * Version:               1.4.0
     9 * Version:               1.5.0
    1010 * Requires at least:     5.0
    1111 * Requires PHP:          7.0
     
    2828
    2929const CAPTCHAFOX_BASE_FILE = __FILE__;
    30 const PLUGIN_VERSION = '1.4.0';
     30const PLUGIN_VERSION = '1.5.0';
    3131
    3232require 'vendor/autoload.php';
  • captchafox-for-forms/trunk/readme.txt

    r3052710 r3057882  
    11=== CaptchaFox for WordPress ===
    22Contributors: scorialabs
    3 Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots
     3Tags: captcha, abuse, recaptcha, spam, anti-spam, captchafox, gdpr, comments, block bots, form
    44Requires at least: 5.0
    55Tested up to: 6.5
    66Requires PHP: 7.0
    7 Stable tag: 1.4.0
     7Stable tag: 1.5.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4949* BBPress Reply
    5050* Otter Blocks
     51* Fluent Forms
    5152
    5253== Frequently Asked Questions ==
     
    7778== Changelog ==
    7879
     80= 1.5.0 =
     81* Support Fluent Forms
     82
    7983= 1.4.0 =
    8084* Tested on WooCommerce 8.6
  • captchafox-for-forms/trunk/src/php/Helper/CaptchaFox.php

    r3025079 r3057882  
    5757
    5858    /**
     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    /**
    5968     * Create HTML for widget
    6069     *
    61      * @return void
     70     * @param array $data Widget data.
     71     *
     72     * @return string
    6273     */
    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        }
    6578
    6679        $attrs = '';
     
    7386        $attrs = rtrim( $attrs );
    7487
    75         printf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [
     88        return sprintf( '<div class="captchafox" %s></div>', wp_kses( $attrs, [
    7689            'data',
    7790        ]) );
     91
    7892    }
    7993
  • captchafox-for-forms/trunk/src/php/Helper/Request.php

    r3007827 r3057882  
    1010     */
    1111    public static function validate_post() {
     12        // phpcs:disable WordPress.Security.NonceVerification.Missing
    1213        if ( ! isset( $_POST['cf-captcha-response'] ) ) {
    1314            return false;
     
    1516
    1617        $response = filter_var( wp_unslash( $_POST['cf-captcha-response'] ), FILTER_SANITIZE_FULL_SPECIAL_CHARS );
     18        // phpcs:enable WordPress.Security.NonceVerification.Missing
    1719
    18         return self::validate( $response );
     20        return self::validate( $response )->success;
    1921    }
    2022
     
    2426     * @param string $response Response.
    2527     *
    26      * @return bool
     28     * @return object
    2729     */
    2830    public static function validate( string $response ) {
     
    4648        $captcha_success = json_decode( $body );
    4749        if ( $captcha_success->success ) {
    48             return true;
     50            return (object) [
     51                'success' => true,
     52                'errors'  => [],
     53            ];
    4954        }
    50         return false;
     55        return (object) [
     56            'success' => false,
     57            'errors'  => $captcha_success->{'error-codes'},
     58        ];
    5159    }
    5260}
  • captchafox-for-forms/trunk/src/php/Initializer.php

    r3007827 r3057882  
    131131                'class'   => Plugins\OtterBlocks\Forms::class,
    132132            ],
     133            [
     134                'group'   => 'fluent-forms',
     135                'action'  => 'form',
     136                'plugins' => [ 'fluentform/fluentform.php' ],
     137                'class'   => Plugins\FluentForms\Forms::class,
     138            ],
    133139        ];
    134140
  • captchafox-for-forms/trunk/src/php/Plugins/NinjaForms/CaptchaFoxField.php

    r3007827 r3057882  
    6161        }
    6262
    63         $verified = Request::validate( $value );
     63        $verified = Request::validate( $value )->success;
    6464        if ( ! $verified ) {
    6565            return __( 'Invalid Captcha', 'captchafox-for-forms' );
  • captchafox-for-forms/trunk/src/php/Settings/Plugins.php

    r3007827 r3057882  
    9898            'group'     => $setting_plugins,
    9999            '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' ),
    100109            'options'   => [
    101110                'form' => __( 'Forms', 'captchafox-for-forms' ),
  • captchafox-for-forms/trunk/vendor/composer/autoload_classmap.php

    r3007827 r3057882  
    1313    'CaptchaFox\\Plugins\\BBPress\\Reply' => $baseDir . '/src/php/Plugins/BBPress/Reply.php',
    1414    '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',
    1517    'CaptchaFox\\Plugins\\Forminator\\Forms' => $baseDir . '/src/php/Plugins/Forminator/Forms.php',
    1618    'CaptchaFox\\Plugins\\Mailchimp\\Forms' => $baseDir . '/src/php/Plugins/Mailchimp/Forms.php',
  • captchafox-for-forms/trunk/vendor/composer/autoload_static.php

    r3007827 r3057882  
    2828        'CaptchaFox\\Plugins\\BBPress\\Reply' => __DIR__ . '/../..' . '/src/php/Plugins/BBPress/Reply.php',
    2929        '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',
    3032        'CaptchaFox\\Plugins\\Forminator\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Forminator/Forms.php',
    3133        'CaptchaFox\\Plugins\\Mailchimp\\Forms' => __DIR__ . '/../..' . '/src/php/Plugins/Mailchimp/Forms.php',
  • captchafox-for-forms/trunk/vendor/composer/installed.php

    r3052710 r3057882  
    22    'root' => array(
    33        'name' => 'captchafox/captchafox-wordpress',
    4         'pretty_version' => '1.4.0',
    5         'version' => '1.4.0.0',
    6         'reference' => '5e37087bd27eecd9d0f6273564d1cdffdd1ea864',
     4        'pretty_version' => '1.5.0',
     5        'version' => '1.5.0.0',
     6        'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'captchafox/captchafox-wordpress' => array(
    14             'pretty_version' => '1.4.0',
    15             'version' => '1.4.0.0',
    16             'reference' => '5e37087bd27eecd9d0f6273564d1cdffdd1ea864',
     14            'pretty_version' => '1.5.0',
     15            'version' => '1.5.0.0',
     16            'reference' => '59aef596ceae27d4263eac5ef83f2d948e26778b',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.