function wppb_display_recaptcha_default_wp_register() { $field = wppb_get_recaptcha_field(); if (!empty($field)) { $publickey = trim($field['public-key']); $item_title = apply_filters('wppb_register_recaptcha_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title'])); $item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']); wppb_recaptcha_set_default_values(); if (isset($field['captcha-wp-forms']) && strpos($field['captcha-wp-forms'], 'default_wp_register') !== false) { // check where reCAPTCHA should display and add reCAPTCHA html $recaptcha_output = '<label for="recaptcha_response_field" style="padding-left:15px; padding-bottom:7px;">' . $item_title . '</label>' . wppb_recaptcha_get_html($publickey); if (!empty($item_description)) { $recaptcha_output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>'; } echo '<div class="wppb-form-field wppb-recaptcha" style="margin-left:-14px; margin-bottom: 15px;">' . $recaptcha_output . '</div>'; } } }
function wppb_add_recaptcha_to_registration_form() { $reCaptchaSettings = get_option('reCaptchaSettings', 'not_found'); if ($reCaptchaSettings == 'not_found') { $publickey = ""; $privatekey = ""; } else { $publickey = trim($reCaptchaSettings['publicKey']); $privatekey = trim($reCaptchaSettings['privateKey']); } return wppb_recaptcha_get_html($publickey); }