public function get_html($theme = 'light', $lang = 'en', $type = 'image'){
        if( $this->enabled ){
            // Option value
            $option = [];
            // Select theme
            switch($theme){
                case 'dark':
                    $option['theme'] = $theme;
                    break;
                case 'red':
                default:
					$option['theme'] = 'light';
                    // Do nothing
                    break;
            }
	        // Select image
	        switch( $type ){
		        case 'audio':
					$option['type'] = $type;
			        break;
		        default:
					$option['type'] = 'image';
			        break;
	        }
            // Select language
            switch($lang){
	            case 'ar':
	            case 'bg':
	            case 'ca':
	            case 'zh-CN':
	            case 'zh-TW':
	            case 'hr':
	            case 'cs':
	            case 'da':
	            case 'nl':
	            case 'en-GB':
	            case 'en':
	            case 'fil':
	            case 'fi':
	            case 'fr':
	            case 'fr-CA':
	            case 'de':
	            case 'de-AT':
	            case 'de-CH':
	            case 'el':
	            case 'iw':
	            case 'hi':
	            case 'hu':
	            case 'id':
	            case 'it':
	            case 'ja':
	            case 'ko':
	            case 'lv':
	            case 'lt':
	            case 'no':
	            case 'fa':
	            case 'pl':
	            case 'pt':
	            case 'pt-BR':
	            case 'pt-PT':
	            case 'ro':
	            case 'ru':
	            case 'sr':
	            case 'sk':
	            case 'sl':
	            case 'es':
	            case 'es-419':
	            case 'sv':
	            case 'th':
	            case 'tr':
	            case 'uk':
	            case 'vi':
	                $option['lang'] = $lang;
                    break;
                default:
                    // Do nothing
					$option['lang'] = 'en';
                    break;

            }
            /**
             * wpametu_recaptcha_setting
             *
             * Filter option to set for reCaptcha
             *
             * @param array $option
             * @return array
             */
            $option = apply_filters('wpametu_recaptcha_setting', $option);
            $script = '<script src="https://www.google.com/recaptcha/api.js?hl='.$option['lang'].'" async defer></script>';
            $html = <<<HTML
<div class="g-recaptcha" data-sitekey="%s" data-theme="%s" data-type="%s"></div>
HTML;
            return $script.sprintf($html, constant(self::PUBLIC_KEY), $option['theme'], $option['type']);
        }else{
            return false;
        }
    }
public function get_html($theme = 'light', $lang = 'en', $type = 'image'){
        if( $this->enabled ){
            // Option value
            $option = [];
            // Select theme
            switch($theme){
                case 'dark':
                    $option['theme'] = $theme;
                    break;
                case 'red':
                default:
					$option['theme'] = 'light';
                    // Do nothing
                    break;
            }
	        // Select image
	        switch( $type ){
		        case 'audio':
					$option['type'] = $type;
			        break;
		        default:
					$option['type'] = 'image';
			        break;
	        }
            // Select language
            switch($lang){
	            case 'ar':
	            case 'bg':
	            case 'ca':
	            case 'zh-CN':
	            case 'zh-TW':
	            case 'hr':
	            case 'cs':
	            case 'da':
	            case 'nl':
	            case 'en-GB':
	            case 'en':
	            case 'fil':
	            case 'fi':
	            case 'fr':
	            case 'fr-CA':
	            case 'de':
	            case 'de-AT':
	            case 'de-CH':
	            case 'el':
	            case 'iw':
	            case 'hi':
	            case 'hu':
	            case 'id':
	            case 'it':
	            case 'ja':
	            case 'ko':
	            case 'lv':
	            case 'lt':
	            case 'no':
	            case 'fa':
	            case 'pl':
	            case 'pt':
	            case 'pt-BR':
	            case 'pt-PT':
	            case 'ro':
	            case 'ru':
	            case 'sr':
	            case 'sk':
	            case 'sl':
	            case 'es':
	            case 'es-419':
	            case 'sv':
	            case 'th':
	            case 'tr':
	            case 'uk':
	            case 'vi':
	                $option['lang'] = $lang;
                    break;
                default:
                    // Do nothing
					$option['lang'] = 'en';
                    break;

            }
            /**
             * wpametu_recaptcha_setting
             *
             * Filter option to set for reCaptcha
             *
             * @param array $option
             * @return array
             */
            $option = apply_filters('wpametu_recaptcha_setting', $option);
            $script = '<script src="https://www.google.com/recaptcha/api.js?hl='.$option['lang'].'" async defer></script>';
            $html = <<<HTML
<div class="g-recaptcha" data-sitekey="%s" data-theme="%s" data-type="%s"></div>
HTML;
            return $script.sprintf($html, constant(self::PUBLIC_KEY), $option['theme'], $option['type']);
        }else{
            return false;
        }
    }
public function get_html ( $ theme = 'light' , $ lang = 'en' , $ type = 'image' ) { if ( $ this -> enabled ) { // Option value $ option = [ ] ; // Select theme switch ( $ theme ) { case 'dark' : $ option [ 'theme' ] = $ theme ; break ; case 'red' : default : $ option [ 'theme' ] = 'light' ; // Do nothing break ; } // Select image switch ( $ type ) { case 'audio' : $ option [ 'type' ] = $ type ; break ; default : $ option [ 'type' ] = 'image' ; break ; } // Select language switch ( $ lang ) { case 'ar' : case 'bg' : case 'ca' : case 'zh-CN' : case 'zh-TW' : case 'hr' : case 'cs' : case 'da' : case 'nl' : case 'en-GB' : case 'en' : case 'fil' : case 'fi' : case 'fr' : case 'fr-CA' : case 'de' : case 'de-AT' : case 'de-CH' : case 'el' : case 'iw' : case 'hi' : case 'hu' : case 'id' : case 'it' : case 'ja' : case 'ko' : case 'lv' : case 'lt' : case 'no' : case 'fa' : case 'pl' : case 'pt' : case 'pt-BR' : case 'pt-PT' : case 'ro' : case 'ru' : case 'sr' : case 'sk' : case 'sl' : case 'es' : case 'es-419' : case 'sv' : case 'th' : case 'tr' : case 'uk' : case 'vi' : $ option [ 'lang' ] = $ lang ; break ; default : // Do nothing $ option [ 'lang' ] = 'en' ; break ; } /**
             * wpametu_recaptcha_setting
             *
             * Filter option to set for reCaptcha
             *
             * @param array $option
             * @return array
             */ $ option = apply_filters ( 'wpametu_recaptcha_setting' , $ option ) ; $ script = '<script src="https://www.google.com/recaptcha/api.js?hl=' . $ option [ 'lang' ] . '" async defer></script>' ; $ html =  <<<HTML
<div class="g-recaptcha" data-sitekey="%s" data-theme="%s" data-type="%s"></div>
HTML ; return $ script . sprintf ( $ html , constant ( self :: PUBLIC_KEY ) , $ option [ 'theme' ] , $ option [ 'type' ] ) ; } else { return false ; } }
Return reCaptcha's HTML

@link https://developers.google.com/recaptcha/docs/language
@param string $theme light(default), dark
@param string $lang en(default), fr, nl, de, pt, ru, es, tr, ja and more.
@param string $type image(default) audio
@return string|false
Return reCaptcha s HTML