| Server IP : 51.254.39.36 / Your IP : 216.73.217.109 Web Server : Microsoft-IIS/10.0 System : Windows NT WIN-12GDIEC772I 10.0 build 20348 (Windows Server 2022) AMD64 User : IWPD_21(allbatf787) ( 0) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Inetpub/vhosts/allbat-sb.fr/httpdocs/wp-content/plugins/kadence-recaptcha/ |
Upload File : |
<?php
/**
* Plugin Name: Kadence CAPTCHA
* Plugin URI: https://www.kadencewp.com/product/kadence-google-recaptcha/
* Description: Adds Googles reCAPTCHA or Cloudflare Turnstile to WP comment forms, login forms, registration forms, woocommerce reviews, checkout, etc.
* Version: 1.3.7
* Author: Kadence WP
* Author URI: https://www.kadencewp.com/
* License: GPL2
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Domain Path: /languages
* Text Domain: kadence-recaptcha
*
* @package Kadence ReCaptcha
*/
define( 'KT_RECAPTCHA_PATH', realpath( plugin_dir_path( __FILE__ ) ) . DIRECTORY_SEPARATOR );
define( 'KT_RECAPTCHA_URL', plugin_dir_url( __FILE__ ) );
define( 'KT_RECAPTCHA_VERSION', '1.3.7' );
require_once KT_RECAPTCHA_PATH . 'vendor/autoload.php';
require_once KT_RECAPTCHA_PATH . 'vendor/vendor-prefixed/autoload.php';
require_once KT_RECAPTCHA_PATH . 'inc/uplink/Helper.php';
require_once KT_RECAPTCHA_PATH . 'inc/uplink/Connect.php';
/**
* Main plugin class.
*/
class Kadence_Recaptcha {
/**
* Instance control
*
* @var null
*/
private static $instance = null;
/**
* Is Classic Kadence Theme
*
* @var null
*/
private static $is_classic_kadence = null;
/**
* Instance Control
*/
public static function get_instance() {
if ( is_null( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Construct
*/
public function __construct() {
add_action( 'plugins_loaded', array( $this, 'on_plugins_loaded' ) );
}
/**
* On plugins loaded.
*/
public function on_plugins_loaded() {
require_once KT_RECAPTCHA_PATH . 'inc/class-kadence-recaptcha-settings.php';
$options = ( apply_filters( 'kadence_recaptcha_network', false ) ? get_site_option( 'kt_recaptcha' ) : get_option( 'kt_recaptcha' ) );
if ( ! empty( $options ) && ! is_array( $options ) ) {
$options = json_decode( $options, true );
}
if ( ( isset( $options['kt_re_site_key'] ) && ! empty( $options['kt_re_site_key'] ) ) || ( isset( $options['v3_re_site_key'] ) && ! empty( $options['v3_re_site_key'] ) ) || ( isset( $options['turnstile_site_key'] ) && ! empty( $options['turnstile_site_key'] ) ) ) {
require_once KT_RECAPTCHA_PATH . 'inc/recaptcha.php'; // Gets recaptcha class started.
}
}
/**
* Check if using Classic Kadence Theme for use in theme forms.
*/
public static function is_kadence_theme() {
if ( is_null( self::$is_classic_kadence ) ) {
$the_theme = wp_get_theme();
if ( 'Ascend - Premium' == $the_theme->get( 'Name' ) || 'ascend_premium' == $the_theme->get( 'Template' ) || 'Virtue - Premium' == $the_theme->get( 'Name' ) || 'virtue_premium' == $the_theme->get( 'Template' ) || 'Pinnacle Premium' == $the_theme->get( 'Name' ) || 'pinnacle_premium' == $the_theme->get( 'Template' ) ) {
self::$is_classic_kadence = true;
} else {
self::$is_classic_kadence = false;
}
}
return self::$is_classic_kadence;
}
}
Kadence_Recaptcha::get_instance();
/**
* Handle plugin updates.
*/
function kadence_recaptcha_updating() {
require_once KT_RECAPTCHA_PATH . 'kadence-update-checker/kadence-update-checker.php';
$kadence_recaptcha_update_checker = Kadence_Update_Checker::buildUpdateChecker(
'https://kernl.us/api/v1/updates/5b187815df649755e65c98d8/',
__FILE__,
'kadence-recaptcha'
);
}
add_action( 'after_setup_theme', 'kadence_recaptcha_updating', 1 );
/**
* Compatible with HPOS
*/
add_action( 'before_woocommerce_init', function() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );