' . '
', ); return $fields; }, 7 ); // 画像認証 if( isset( $luxe['captcha_enable'] ) && $luxe['captcha_enable'] !== 'none' ) { // reCAPTCHA v3 if( $luxe['captcha_enable'] === 'recaptcha-v3' && isset( $luxe['recaptcha_site_key'] ) && !empty( $luxe['recaptcha_site_key'] ) ) { add_filter( 'comment_form_default_fields', function( $fields ) use( $luxe ) { $fields += array( 'recaptcha' => '' ); return $fields; }, 8 ); } // reCAPTCHA v2 elseif( $luxe['captcha_enable'] === 'recaptcha' && isset( $luxe['recaptcha_site_key'] ) && !empty( $luxe['recaptcha_site_key'] ) ) { add_filter( 'comment_form_default_fields', function( $fields ) use( $luxe ) { $fields += array( 'recaptcha'=> '' ); return $fields; }, 8 ); } // Securimage elseif( $luxe['captcha_enable'] === 'securimage' ) { add_filter( 'comment_form_default_fields', function( $fields ) use( $luxe ) { global $awesome; $get_pram = ''; $capopt = array( 'iw' => 'secimg_image_width', // image_width 'ih' => 'secimg_image_height', // image_height 'sl' => 'secimg_start_length', // code_length start 'el' => 'secimg_end_length', // code_length end 'ch' => 'secimg_charset', // charset 'fr' => 'secimg_font_ratio', // font_ratio 'cl' => 'secimg_color', // text_color 'bg' => 'secimg_bg_color', // image_bg_color 'pb' => 'secimg_perturbation', // perturbation 'nl' => 'secimg_noise_level', // noise_level 'nc' => 'secimg_noise_color', // noise_color 'ln' => 'secimg_num_lines', // num_lines 'lc' => 'secimg_line_color', // line_color ); foreach( $capopt as $key => $val ) { if( isset( $luxe[$val] ) ) { $get_pram .= '&' . $key . '=' . ltrim( $luxe[$val], '#' ); } } $get_pram = ltrim( $get_pram, '&' ); $image_width = isset( $luxe['secimg_image_width'] ) ? $luxe['secimg_image_width'] : 170; $image_height = isset( $luxe['secimg_image_height'] ) ? $luxe['secimg_image_height'] : 45; $fields += array( 'captcha' => '' . __( 'Captcha', 'luxeritas' ) . ' *
' . '' .
'' . str_replace( '
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
' . '', $comment_form ); } else { comment_form( $args ); } } ?>