Plugin Directory

Changeset 3326245


Ignore:
Timestamp:
07/11/2025 12:02:00 PM (9 months ago)
Author:
bestwebsoft
Message:

"V1.82 - * The compatibility with new WordPress version updated. "

Location:
google-captcha
Files:
180 added
4 edited

Legend:

Unmodified
Added
Removed
  • google-captcha/trunk/bws_menu/class-bws-settings.php

    r3153390 r3326245  
    554554                            if ( ! current_user_can( 'edit_plugins' ) ) {
    555555                                echo '<p>' . esc_html__( 'You do not have sufficient permissions to edit plugins for this site.', 'bestwebsoft' ) . '</p>';
    556                                 return;
    557                             }
    558 
    559                             $list = array(
    560                                 'css' => array(
    561                                     'description'     => __( 'These styles will be added to the header on all pages of your site.', 'bestwebsoft' ),
    562                                     'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started',
    563                                 ),
    564                                 'php' => array(
    565                                     'description'     => sprintf( __( 'This PHP code will be hooked to the %s Action and will be printed on front end only.', 'bestwebsoft' ), '<a href="https://codex.wordpress.org/Plugin_API/Action_Reference/init" target="_blank"><code>init</code></a>' ),
    566                                     'learn_more_link' => 'https://php.net/',
    567                                 ),
    568                                 'js'  => array(
    569                                     'description'     => __( 'These code will be added to the header on all pages of your site.', 'bestwebsoft' ),
    570                                     'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript',
    571                                 ),
    572                             );
    573 
    574                             foreach ( $list as $extension => $extension_data ) {
    575                                 $name = 'js' === $extension ? 'JavaScript' : strtoupper( $extension );
    576                                 ?>
    577                                 <p><big>
    578                                         <strong><?php echo esc_html( $name ); ?></strong>
    579                                         <?php
    580                                         if ( ! $this->custom_code_args[ "{$extension}_writeable" ] ) {
    581                                             echo '(' . esc_html__( 'Browsing', 'bestwebsoft' ) . ')';
    582                                         }
    583                                         ?>
    584                                     </big>
    585                                 </p>
    586                                 <p class="bws_info">
    587                                     <label>
    588                                         <input type="checkbox" value="1"
     556                            } else {
     557
     558                                $list = array(
     559                                    'css' => array(
     560                                        'description'     => __( 'These styles will be added to the header on all pages of your site.', 'bestwebsoft' ),
     561                                        'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started',
     562                                    ),
     563                                    'php' => array(
     564                                        'description'     => sprintf( __( 'This PHP code will be hooked to the %s Action and will be printed on front end only.', 'bestwebsoft' ), '<a href="https://codex.wordpress.org/Plugin_API/Action_Reference/init" target="_blank"><code>init</code></a>' ),
     565                                        'learn_more_link' => 'https://php.net/',
     566                                    ),
     567                                    'js'  => array(
     568                                        'description'     => __( 'These code will be added to the header on all pages of your site.', 'bestwebsoft' ),
     569                                        'learn_more_link' => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript',
     570                                    ),
     571                                );
     572
     573                                foreach ( $list as $extension => $extension_data ) {
     574                                    $name = 'js' === $extension ? 'JavaScript' : strtoupper( $extension );
     575                                    ?>
     576                                    <p><big>
     577                                            <strong><?php echo esc_html( $name ); ?></strong>
    589578                                            <?php
    590                                             if ( $this->custom_code_args[ "is_{$extension}_active" ] ) {
    591                                                 echo 'checked';
     579                                            if ( ! $this->custom_code_args[ "{$extension}_writeable" ] ) {
     580                                                echo '(' . esc_html__( 'Browsing', 'bestwebsoft' ) . ')';
    592581                                            }
    593582                                            ?>
    594                                          />
    595                                         <?php printf( esc_html__( 'Activate custom %s code.', 'bestwebsoft' ), esc_html( $name ) ); ?>
    596                                     </label>
    597                                 </p>
    598                                 <textarea cols="70" rows="25" id="bws_newcontent_<?php echo esc_attr( $extension ); ?>" disabled="disabled"><?php
    599                                 if ( isset( $this->custom_code_args[ "content_{$extension}" ] ) ) {
    600                                     echo esc_html( stripslashes_deep( $this->custom_code_args[ "content_{$extension}" ] ) ); }
    601                                 ?></textarea>
    602                                 <p class="bws_info">
    603                                     <?php echo wp_kses_post( $extension_data['description'] ); ?>
    604                                     <br>
    605                                     <a href="<?php echo esc_url( $extension_data['learn_more_link'] ); ?>" target="_blank">
    606                                         <?php printf( esc_html__( 'Learn more about %s', 'bestwebsoft' ), esc_html( $name ) ); ?>
    607                                     </a>
    608                                 </p>
    609                                 <?php
     583                                        </big>
     584                                    </p>
     585                                    <p class="bws_info">
     586                                        <label>
     587                                            <input type="checkbox" value="1"
     588                                                <?php
     589                                                if ( $this->custom_code_args[ "is_{$extension}_active" ] ) {
     590                                                    echo 'checked';
     591                                                }
     592                                                ?>
     593                                             />
     594                                            <?php printf( esc_html__( 'Activate custom %s code.', 'bestwebsoft' ), esc_html( $name ) ); ?>
     595                                        </label>
     596                                    </p>
     597                                    <textarea cols="70" rows="25" id="bws_newcontent_<?php echo esc_attr( $extension ); ?>" disabled="disabled"><?php
     598                                    if ( isset( $this->custom_code_args[ "content_{$extension}" ] ) ) {
     599                                        echo esc_html( stripslashes_deep( $this->custom_code_args[ "content_{$extension}" ] ) ); }
     600                                    ?></textarea>
     601                                    <p class="bws_info">
     602                                        <?php echo wp_kses_post( $extension_data['description'] ); ?>
     603                                        <br>
     604                                        <a href="<?php echo esc_url( $extension_data['learn_more_link'] ); ?>" target="_blank">
     605                                            <?php printf( esc_html__( 'Learn more about %s', 'bestwebsoft' ), esc_html( $name ) ); ?>
     606                                        </a>
     607                                    </p>
     608                                    <?php
     609                                }
    610610                            }
    611611                            ?>
  • google-captcha/trunk/google-captcha.php

    r3236168 r3326245  
    77Text Domain: google-captcha
    88Domain Path: /languages
    9 Version: 1.80
     9Version: 1.82
    1010Author URI: https://bestwebsoft.com/
    1111License: GPLv3 or later
     
    3232
    3333require_once dirname( __FILE__ ) . '/includes/forms.php';
     34require_once dirname( __FILE__ ) . '/includes/forminator.php';
    3435
    3536if ( ! function_exists( 'gglcptch_admin_menu' ) ) {
     
    487488        $default_options = array(
    488489            'allowlist_message'       => __( 'You are in the allow list', 'google-captcha' ),
     490            'error_message'           => __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
     491            'empty_error_message'     => __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
    489492            'public_key'              => '',
    490493            'private_key'             => '',
     
    12141217     */
    12151218    function gglcptch_get_message( $message_code = 'incorrect', $echo = false ) {
    1216 
     1219        global $gglcptch_options;
    12171220        $message = '';
    12181221
    12191222        $messages = array(
    12201223            /* custom error */
    1221             'RECAPTCHA_EMPTY_RESPONSE' => __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
     1224            'RECAPTCHA_EMPTY_RESPONSE' => isset( $gglcptch_options['empty_error_message'] ) ? $gglcptch_options['empty_error_message'] : __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
    12221225            /* v2 error */
    12231226            'missing-input-secret'     => __( 'Secret Key is missing.', 'google-captcha' ),
     
    12291232            ),
    12301233            'incorrect-captcha-sol'    => __( 'User response is invalid', 'google-captcha' ),
    1231             'incorrect'                => __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
     1234            'incorrect'                => isset( $gglcptch_options['error_message'] ) ? $gglcptch_options['error_message'] : __( 'The reCaptcha verification failed. Please try again.', 'google-captcha' ),
    12321235            'multiple_blocks'          => __( 'More than one reCAPTCHA has been found in the current form. Please remove all unnecessary reCAPTCHA fields to make it work properly.', 'google-captcha' ),
    12331236            /* v3 error */
  • google-captcha/trunk/includes/class-gglcptch-settings-tabs.php

    r3236168 r3326245  
    116116
    117117                $this->options['allowlist_message']     = isset( $_POST['gglcptch_allowlist_message'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_allowlist_message'] ) ) : '';
     118                $this->options['error_message']         = isset( $_POST['gglcptch_error_message'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_error_message'] ) ) : '';
     119                $this->options['empty_error_message']   = isset( $_POST['gglcptch_empty_error_message'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_empty_error_message'] ) ) : '';
    118120                $this->options['public_key']            = isset( $_POST['gglcptch_public_key'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_public_key'] ) ) : '';
    119121                $this->options['private_key']           = isset( $_POST['gglcptch_private_key'] ) ? sanitize_text_field( wp_unslash( $_POST['gglcptch_private_key'] ) ) : '';
     
    473475                </tr>
    474476                <tr valign="top">
     477                    <th scope="row"><?php esc_html_e( 'Failed Error Message', 'google-captcha' ); ?></th>
     478                    <td>
     479                        <textarea name="gglcptch_error_message"><?php echo esc_html( $this->options['error_message'] ); ?></textarea>
     480                        <div class="bws_info"><?php esc_html_e( 'This message will be displayed when an error occurred while checking the reCaptcha.', 'google-captcha' ); ?></div>
     481                    </td>
     482                </tr>
     483                <tr valign="top">
     484                    <th scope="row"><?php esc_html_e( 'Empty field Error Message', 'google-captcha' ); ?></th>
     485                    <td>
     486                        <textarea name="gglcptch_empty_error_message"><?php echo esc_html( $this->options['empty_error_message'] ); ?></textarea>
     487                        <div class="bws_info"><?php esc_html_e( 'This message will be displayed when an error occurred while checking the reCaptcha.', 'google-captcha' ); ?></div>
     488                    </td>
     489                </tr>
     490                <tr valign="top">
    475491                    <th scope="row"><?php esc_html_e( 'Advanced Protection', 'google-captcha' ); ?></th>
    476492                    <td>
  • google-captcha/trunk/readme.txt

    r3236168 r3326245  
    44Tags: anti-spam security, antispam, recaptcha, captcha, captha, Invisible reCaptcha, Invisible captcha, Invisibl reCaptcha, comment, cpatcha, google catcha, Invisible re captcha, recaptcha version3
    55Requires at least: 5.6
    6 Tested up to: 6.7
    7 Stable tag: 1.80
     6Tested up to: 6.8
     7Stable tag: 1.82
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5050* Detailed step-by-step documentation and videos
    5151* Multilingual and RTL ready
     52* Edit error message
    5253
    5354> **Pro Features**
     
    7071>   * BuddyBoss
    7172>   * Formidable Forms
     73>   * Forminator Forms
    7274> * Compatible with WooCommerce:
    7375>   * Login form
     
    289291== Changelog ==
    290292
     293= V1.82 - 11.07.2025 =
     294* Update : All functionality was updated for WordPress 6.8.
     295* Pro : The new compatibility with Forminator forms has been added.
     296* Update : BWS Panel section was updated.
     297* Bugfix : Minor bugs fixed.
     298* NEW : Ability to change the reCaptcha error message has been added.
     299
    291300= V1.80 - 06.02.2025 =
    292301* Update : All functionality was updated for WordPress 6.7.
     
    653662== Upgrade Notice ==
    654663
     664= V1.82 =
     665* The compatibility with new WordPress version updated.
     666* New features added.
     667
    655668= V1.80 =
    656669* The compatibility with new WordPress version updated.
Note: See TracChangeset for help on using the changeset viewer.