LLMS_Captcha::__construct()


Source Source

File: includes/spam/class-llms-captcha.php

	public function __construct() {
		$slug             = sanitize_title( $this->get_slug() );
		$constant_prefix  = 'LLMS_' . strtoupper( $slug );
		$this->site_key   = defined( $constant_prefix . '_SITE_KEY' ) ? constant( $constant_prefix . '_SITE_KEY' ) : get_option( 'lifterlms_' . $slug . '_site_key' );
		$this->secret_key = defined( $constant_prefix . '_SECRET_KEY' ) ? constant( $constant_prefix . '_SECRET_KEY' ) : get_option( 'lifterlms_' . $slug . '_secret_key' );

		add_action( 'llms_checkout_footer_before', array( $this, 'render' ) );
		add_action( 'lifterlms_after_registration_fields', array( $this, 'render' ) );
		add_action( 'lifterlms_after_free_enroll_fields', array( $this, 'render' ) );

		add_action( 'llms_before_checkout_validation', array( $this, 'validate' ) );
		add_filter( 'llms_before_registration_validation', array( $this, 'validate' ) );

		add_action( 'lifterlms_after_free_enroll_fields', array( $this, 'show_notices' ) );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.