Add a CAPTCHA

This commit is contained in:
smallxu038 2024-02-19 23:35:30 +08:00 committed by GitHub
parent 743bbd1a4c
commit 0fb254fd85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,11 +46,18 @@
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
<?php if (akina_option('verification_type') == 'Google reCAPTCHA'&& akina_option('rehidden') == '1') {?>
<!--添加隐形验证码-->
<div id="recaptcha" class="g-recaptcha"
data-sitekey="<?php echo akina_option('site_key'); ?>"
data-callback="onRecaptchaSubmit"
data-size="invisible">
</div>
<?php }?>
<?php <?php
$robot_comments = ''; $robot_comments = '';
if(comments_open()){ if(comments_open()){
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>'.__('I\'m not a robot', 'sakura').'</label>'; if(akina_option('norobot')) require get_template_directory() . '/inc/classes/Captcha.php';
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : ''; $private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : '';
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>'.__('Comment reply notify', 'sakura').'</label>' : ''; $mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>'.__('Comment reply notify', 'sakura').'</label>' : '';
$args = array( $args = array(