本文整理汇总了PHP中ReCaptcha::getSignupUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP ReCaptcha::getSignupUrl方法的具体用法?PHP ReCaptcha::getSignupUrl怎么用?PHP ReCaptcha::getSignupUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReCaptcha
的用法示例。
在下文中一共展示了ReCaptcha::getSignupUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: admin_form
public function admin_form()
{
$saved = false;
if (qa_clicked('recaptcha_save_button')) {
qa_opt('recaptcha_public_key', qa_post_text('recaptcha_public_key_field'));
qa_opt('recaptcha_private_key', qa_post_text('recaptcha_private_key_field'));
$saved = true;
}
$pub = trim(qa_opt('recaptcha_public_key'));
$pri = trim(qa_opt('recaptcha_private_key'));
$error = null;
if (!strlen($pub) || !strlen($pri)) {
require_once $this->directory . 'recaptchalib.php';
$error = 'To use reCAPTCHA, you must <a href="' . qa_html(ReCaptcha::getSignupUrl()) . '" target="_blank">sign up</a> to get these keys.';
}
$form = array('ok' => $saved ? 'reCAPTCHA settings saved' : null, 'fields' => array('public' => array('label' => 'reCAPTCHA public key:', 'value' => $pub, 'tags' => 'name="recaptcha_public_key_field"'), 'private' => array('label' => 'reCAPTCHA private key:', 'value' => $pri, 'tags' => 'name="recaptcha_private_key_field"', 'error' => $error)), 'buttons' => array(array('label' => 'Save Changes', 'tags' => 'name="recaptcha_save_button"')));
return $form;
}