Plugin Directory

Changeset 3233219


Ignore:
Timestamp:
02/01/2025 08:15:02 PM (14 months ago)
Author:
hostbox
Message:

Update to version 0.0.7 from GitHub

Location:
hostbox-google-recaptcha
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • hostbox-google-recaptcha/tags/0.0.7/hostbox-recaptcha.php

    r3232942 r3233219  
    33Plugin Name: Hostbox Google reCAPTCHA
    44Description: Adds Google reCAPTCHA (v2 or v3) to WordPress, compatible with WooCommerce and Contact Form 7.
    5 Version: 0.0.6
     5Version: 0.0.7
    66Author: Hostbox
    77Author URI: https://www.hostbox.me
     
    117117      $this->plugin_url . 'css/recaptcha.css',
    118118      [],
    119       '0.0.6'
     119      '0.0.7'
    120120    );
    121121
     
    129129      $recaptcha_url,
    130130      [],
    131       '0.0.6',
     131      '0.0.7',
    132132      ['strategy' => 'defer'],
    133133    );
     
    138138      $this->plugin_url . 'js/recaptcha.js',
    139139      ['jquery', 'google-recaptcha'],
    140       '0.0.6',
     140      '0.0.7',
    141141      true
    142142    );
     
    147147      $this->plugin_url . 'js/admin.js',
    148148      ['jquery'],
    149       '0.0.6',
     149      '0.0.7',
    150150      true
    151151    );
     
    233233   */
    234234  public function verify_wc_recaptcha($error) {
     235    if (empty($this->site_key)) {
     236      return $error;
     237    }
     238
    235239    if (!$this->verify_recaptcha()) {
    236240      return new WP_Error('captcha_error', $this->verify_recaptcha_error());
     
    244248   */
    245249  public function verify_comment_captcha($commentdata) {
     250    if (empty($this->site_key)) {
     251      return $commentdata;
     252    }
     253
    246254    if (!$this->verify_recaptcha()) {
    247255      wp_die(esc_html($this->verify_recaptcha_error()), 'Captcha Verification Failed', ['response' => 403, 'back_link' => true]);
     
    303311   */
    304312  public function verify_login_captcha($user, $username, $password) {
     313    if (empty($this->site_key)) {
     314      return $user;
     315    }
     316
    305317    if (isset($_POST['woocommerce-login-nonce'])) {
    306318      if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['woocommerce-login-nonce'], 'woocommerce-login')))) {
     
    322334   */
    323335  private function verify_recaptcha() {
    324     // If no secret key is set, bypass verification
    325336    if (empty($this->secret_key)) {
    326337      return false;
  • hostbox-google-recaptcha/tags/0.0.7/readme.txt

    r3232942 r3233219  
    66Tested up to: 6.7.1
    77Requires PHP: 7.0
    8 Stable tag: 0.0.6
     8Stable tag: 0.0.7
    99Author: Hostbox
    1010Author URI: https://www.hostbox.me
     
    9999= February 1, 2023 =
    100100
     101Version 0.0.7 changelog:
     102
     103* Fixed: Skip verification if no site key is set
     104
    101105Version 0.0.6 changelog:
    102106
     
    132136== Upgrade Notice ==
    133137
     138= 0.0.7 =
     139
     140* Fixed: Skip verification if no site key is set
     141
    134142= 0.0.6 =
    135143
  • hostbox-google-recaptcha/trunk/hostbox-recaptcha.php

    r3232942 r3233219  
    33Plugin Name: Hostbox Google reCAPTCHA
    44Description: Adds Google reCAPTCHA (v2 or v3) to WordPress, compatible with WooCommerce and Contact Form 7.
    5 Version: 0.0.6
     5Version: 0.0.7
    66Author: Hostbox
    77Author URI: https://www.hostbox.me
     
    117117      $this->plugin_url . 'css/recaptcha.css',
    118118      [],
    119       '0.0.6'
     119      '0.0.7'
    120120    );
    121121
     
    129129      $recaptcha_url,
    130130      [],
    131       '0.0.6',
     131      '0.0.7',
    132132      ['strategy' => 'defer'],
    133133    );
     
    138138      $this->plugin_url . 'js/recaptcha.js',
    139139      ['jquery', 'google-recaptcha'],
    140       '0.0.6',
     140      '0.0.7',
    141141      true
    142142    );
     
    147147      $this->plugin_url . 'js/admin.js',
    148148      ['jquery'],
    149       '0.0.6',
     149      '0.0.7',
    150150      true
    151151    );
     
    233233   */
    234234  public function verify_wc_recaptcha($error) {
     235    if (empty($this->site_key)) {
     236      return $error;
     237    }
     238
    235239    if (!$this->verify_recaptcha()) {
    236240      return new WP_Error('captcha_error', $this->verify_recaptcha_error());
     
    244248   */
    245249  public function verify_comment_captcha($commentdata) {
     250    if (empty($this->site_key)) {
     251      return $commentdata;
     252    }
     253
    246254    if (!$this->verify_recaptcha()) {
    247255      wp_die(esc_html($this->verify_recaptcha_error()), 'Captcha Verification Failed', ['response' => 403, 'back_link' => true]);
     
    303311   */
    304312  public function verify_login_captcha($user, $username, $password) {
     313    if (empty($this->site_key)) {
     314      return $user;
     315    }
     316
    305317    if (isset($_POST['woocommerce-login-nonce'])) {
    306318      if (!wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['woocommerce-login-nonce'], 'woocommerce-login')))) {
     
    322334   */
    323335  private function verify_recaptcha() {
    324     // If no secret key is set, bypass verification
    325336    if (empty($this->secret_key)) {
    326337      return false;
  • hostbox-google-recaptcha/trunk/readme.txt

    r3232942 r3233219  
    66Tested up to: 6.7.1
    77Requires PHP: 7.0
    8 Stable tag: 0.0.6
     8Stable tag: 0.0.7
    99Author: Hostbox
    1010Author URI: https://www.hostbox.me
     
    9999= February 1, 2023 =
    100100
     101Version 0.0.7 changelog:
     102
     103* Fixed: Skip verification if no site key is set
     104
    101105Version 0.0.6 changelog:
    102106
     
    132136== Upgrade Notice ==
    133137
     138= 0.0.7 =
     139
     140* Fixed: Skip verification if no site key is set
     141
    134142= 0.0.6 =
    135143
Note: See TracChangeset for help on using the changeset viewer.