本文整理汇总了PHP中login_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP login_footer函数的具体用法?PHP login_footer怎么用?PHP login_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了login_footer函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: checkPurchaseForm
public function checkPurchaseForm()
{
$errors = new \WP_Error();
$title = __('Check Purchase Key', 'marketcheck');
$purchaseKey = $this->getPurchaseKey();
$selectedMarket = $this->getSelectedMarket();
$isSubmited = $this->getPostVar('marketcheck-submitted');
if ($isSubmited) {
if (!$selectedMarket) {
$errors->add('invalid-market', __('<strong>Error</strong>: Invalid Market Selected.', 'marketcheck'));
}
if (!$purchaseKey) {
$errors->add('empty_purchase', __('<strong>Error</strong>: Empty Purchase Code.', 'marketcheck'));
}
}
if ($isSubmited && $selectedMarket && $purchaseKey) {
$this->getCurrentMarket()->setPurchaseKey($purchaseKey);
$isValidPurchase = $this->getCurrentMarket()->isValidPurchase();
if (is_wp_error($isValidPurchase)) {
$errors = $isValidPurchase;
} else {
return;
}
}
login_header($title, '<p class="message register">' . $title, $errors);
$this->showPreRegisterForm();
login_footer('purchase-key');
die;
}
开发者ID:zulfnore,项目名称:MarketCheck,代码行数:29,代码来源:SignUp.php
示例2: Disallow_lost_password
public function Disallow_lost_password()
{
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
login_header(__('Password reset disabled', c_bid_text_domain), '<p class="message">' . sprintf(__('%s uses Mozilla Persona to sign in and does not use passwords. Password reset is disabled.', c_bid_text_domain), $blogname) . "</p>");
login_footer('user_login');
exit;
}
开发者ID:DenisMalofeyev,项目名称:browserid-wordpress,代码行数:9,代码来源:browserid-lostpassword.php
示例3: wpcom_vip_login_limit_dont_show_login_form
function wpcom_vip_login_limit_dont_show_login_form()
{
if ('post' != strtolower($_SERVER['REQUEST_METHOD']) || !isset($_POST['log'])) {
return;
}
$username = sanitize_user($_POST['log']);
if ($error = wpcom_vip_login_is_limited($username)) {
login_header(__('Error'), '', $error);
login_footer();
exit;
}
}
开发者ID:humanmade,项目名称:vip-mu-plugins-public,代码行数:12,代码来源:security.php
示例4: wp_attempt_focus
<?php
if (!$error) {
?>
wp_attempt_focus();
<?php
}
?>
if(typeof wpOnload=='function')wpOnload();
<?php
if ($interim_login) {
?>
(function(){
try {
var i, links = document.getElementsByTagName('a');
for ( i in links ) {
if ( links[i].href )
links[i].target = '_blank';
}
} catch(e){}
}());
<?php
}
?>
</script>
<?php
login_footer();
break;
}
// end action switch
开发者ID:neruub,项目名称:shop_sda,代码行数:30,代码来源:wp-login.php
示例5: esc_attr
</p>
<input type="hidden" name="xf_user[username]" value="<?php
echo esc_attr($xfUser['username']);
?>
"/>
<input type="hidden" name="refresh_token" value="<?php
echo esc_attr($refreshToken);
?>
"/>
<input type="hidden" name="scope" value="<?php
echo esc_attr($scope);
?>
"/>
<input type="hidden" name="redirect_to" value="<?php
echo esc_attr($redirectTo);
?>
"/>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large"
value="<?php
esc_attr_e('Associate Account', 'xenforo-api-consumer');
?>
"/>
</p>
</form>
<?php
login_footer('user_login');
开发者ID:codeversed,项目名称:bdApi,代码行数:30,代码来源:login_associate.php
示例6: px_verify_view_registration_form
function px_verify_view_registration_form($errors = '', $verified = array())
{
login_header(__('Registration Form'), '<p class="message register">' . __('Register An Account') . '</p>', $errors);
if ($verified) {
?>
<div class="message success">
<h3>Purchase Information</h3><br/>
<p><strong>Buyer: </strong><?php
echo $verified['px_envato_username'];
?>
</p>
<p><strong>Item: </strong><?php
echo $verified['px_envato_item'];
?>
</p>
<p><strong>License: </strong><?php
echo $verified['px_envato_license'];
?>
</p>
<p><strong>Purchase Code: </strong><?php
echo $verified['px_envato_purchase_code'];
?>
</p>
</div>
<?php
}
?>
<form name="registerform" id="registerform" action="<?php
echo esc_url(site_url('wp-login.php?action=register', 'login_post'));
?>
" method="post">
<input type="hidden" name="purchase_code" value="<?php
echo $verified['px_envato_purchase_code'];
?>
" />
<p>
<label for="user_login"><?php
_e('Username');
?>
<br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php
echo $verified['px_envato_username'];
?>
" size="20" tabindex="10" /></label>
</p>
<p>
<label for="user_email"><?php
_e('E-mail');
?>
<br />
<input type="email" name="user_email" id="user_email" class="input" value="" size="25" tabindex="20" /></label>
</p>
<p id="reg_passmail"><?php
_e('A password will be e-mailed to you.');
?>
</p>
<br class="clear" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php
esc_attr_e('Register');
?>
" tabindex="100" /></p>
</form>
<p id="nav">
<a href="<?php
echo esc_url(wp_login_url());
?>
"><?php
_e('Log in');
?>
</a> |
<a href="<?php
echo esc_url(wp_lostpassword_url());
?>
" title="<?php
esc_attr_e('Password Lost and Found');
?>
"><?php
_e('Lost your password?');
?>
</a>
</p>
<?php
login_footer('user_login');
}
开发者ID:pixelartdev,项目名称:Pixelart-Verifier,代码行数:89,代码来源:login.php
示例7: display_error
/**
* Display an error using login page wrapper
*
* @param WP_Error $error Error object
*/
public function display_error(WP_Error $error)
{
login_header(__('Error'), '', $error);
login_footer();
}
开发者ID:trevordevore,项目名称:OAuth1,代码行数:10,代码来源:class-wp-json-authentication-oauth1-authorize.php
示例8: cimy_confirmation_form
function cimy_confirmation_form()
{
if (empty($_POST['register_confirmation'])) {
return;
}
$confirmation = false;
$http_post = 'POST' == $_SERVER['REQUEST_METHOD'];
$user_login = '';
$user_email = '';
if ($http_post) {
$user_login = $_POST['user_login'];
$user_email = $_POST['user_email'];
if (function_exists("register_new_user")) {
// fake registration to check if no errors then we'll proceed to confirmation phase
$fake_errors = register_new_user($user_login, $user_email);
// ok we can remove registration checks
// remove_action('register_post', 'cimy_registration_check', 10);
// remove_action('register_post', 'cimy_registration_captcha_check', 9);
} else {
return;
}
if (!is_wp_error($fake_errors)) {
$redirect_to = !empty($_POST['redirect_to']) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
wp_safe_redirect($redirect_to);
exit;
} else {
if (count($fake_errors->errors) == 1 && isset($fake_errors->errors["register_confirmation"])) {
$confirmation = true;
}
}
}
if ($confirmation) {
global $cimy_uef_domain;
$redirect_to = apply_filters('registration_redirect', !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '');
$message = new WP_Error();
$message->add('confirmation', __('Confirm your registration', $cimy_uef_domain), 'message');
login_header(__("Confirm your registration", $cimy_uef_domain), "", $message);
?>
<form name="registerform" id="registerform" action="<?php
echo site_url('wp-login.php?action=register', 'login_post');
?>
" method="post">
<?php
cimy_registration_form(null, 2);
?>
<p id="reg_passmail"><?php
_e('A password will be e-mailed to you.');
?>
</p>
<br class="clear" />
<input type="hidden" name="redirect_to" value="<?php
echo esc_attr($redirect_to);
?>
" />
<?php
wp_nonce_field('confirm_form', 'confirm_form_nonce');
?>
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php
esc_attr_e('Register');
?>
" tabindex="100" /></p>
</form>
<p id="nav">
<a href="javascript: history.go(-1)"><?php
_e('← Back', $cimy_uef_domain);
?>
</a>
</p>
<?php
login_footer("");
exit(0);
}
}
开发者ID:podemosfrance,项目名称:podemosfrance.info,代码行数:74,代码来源:cimy_uef_register.php
示例9: edd_slg_social_login_redirect
//.........这里部分代码省略.........
//send user to checkout page
//edd_slg_send_on_checkout_page();
}
//when user will click submit button of custom login
//check user clicks submit button of registration page and get parameter should be valid param
if (isset($_POST['edd-slg-submit']) && !empty($_POST['edd-slg-submit']) && $_POST['edd-slg-submit'] == __('Register', 'eddslg')) {
$loginurl = wp_login_url();
if (isset($_POST['edd_slg_social_email'])) {
//check email is set or not
$socialemail = $_POST['edd_slg_social_email'];
if (empty($socialemail)) {
//if email is empty
$errors->add('empty_email', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('Enter your email address.', 'eddslg'));
} elseif (!is_email($socialemail)) {
//if email is not valid
$errors->add('invalid_email', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('The email address did not validate.', 'eddslg'));
$socialemail = '';
} elseif (email_exists($socialemail)) {
//if email is exist or not
$errors->add('email_exists', '<strong>' . __('ERROR', 'eddslg') . ' :</strong> ' . __('Email already exists, If you have an account login first.', 'eddslg'));
}
if ($errors->get_error_code() == '') {
//
if (!empty($data)) {
//check user data is not empty
$data['email'] = $socialemail;
//create user
$usercreated = $this->edd_slg_add_user($data);
if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget'])) {
unset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget']);
}
if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url'])) {
unset($_SESSION['edd']['edd_slg_stcd_redirect_url']);
}
wp_redirect($redirect_url);
exit;
//send user to checkout page
//edd_slg_send_on_checkout_page();
}
}
}
}
//redirect user to custom registration form
if (isset($_GET['edd_slg_social_login']) && !empty($_GET['edd_slg_social_login'])) {
//login call back url after registration
/*$callbackurl = wp_login_url();
$callbackurl = add_query_arg('edd_slg_social_login_done', 1, $callbackurl);*/
$socialemail = isset($_POST['edd_slg_social_email']) ? $_POST['edd_slg_social_email'] : '';
//check the user who is going to connect with site
//it is alreay exist with same data or not
//if user is exist then simply make that user logged in
$metaquery = array(array('key' => 'edd_slg_social_user_connect_via', 'value' => $data['type']), array('key' => 'edd_slg_social_identifier', 'value' => $data['id']));
$getusers = get_users(array('meta_query' => $metaquery));
$wpuser = array_shift($getusers);
//getting users
//check user is exist or not conected with same metabox
if (!empty($wpuser)) {
//make user logged in
wp_set_auth_cookie($wpuser->ID, false);
if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget'])) {
unset($_SESSION['edd']['edd_slg_stcd_redirect_url_widget']);
}
if (isset($_SESSION['edd']['edd_slg_stcd_redirect_url'])) {
unset($_SESSION['edd']['edd_slg_stcd_redirect_url']);
}
wp_redirect($redirect_url);
exit;
} else {
//if user is not exist then show register user form
login_header(__('Registration Form', 'eddslg'), '<p class="message register">' . __('Please enter your email address to complete registration.', 'eddslg') . '</p>', $errors);
?>
<form name="registerform" id="registerform" action="" method="post">
<p>
<label for="wcsl_email"><?php
_e('E-mail', 'eddslg');
?>
<br />
<input type="text" name="edd_slg_social_email" id="edd_slg_social_email" class="input" value="<?php
echo $socialemail;
?>
" size="25" tabindex="20" /></label>
</p>
<p id="reg_passmail">
<?php
_e('Username and Password will be sent to your email.', 'eddslg');
?>
</p>
<br class="clear" />
<p class="submit"><input type="submit" name="edd-slg-submit" id="edd-slg-submit" class="button-primary" value="<?php
_e('Register', 'eddslg');
?>
" tabindex="100" /></p>
</form>
<?php
login_footer('user_login');
exit;
}
}
}
}
开发者ID:SelaInc,项目名称:eassignment,代码行数:101,代码来源:class-edd-slg-public.php
示例10: ll_login_footer
function ll_login_footer($input_id = '')
{
if (!function_exists('login_header')) {
ob_start();
require_once ABSPATH . '/wp-login.php';
ob_end_clean();
}
login_footer($input_id);
/******
echo "</div>\n";
if ( !empty($input_id) ) {
?>
<script type="text/javascript">
try{document.getElementById('<?php echo $input_id; ?>').focus();}catch(e){}
if(typeof wpOnload=='function')wpOnload();
</script>
<?php
}
?>
<p id="backtoblog"><a href="<?php bloginfo('wpurl'); ?>/" title="<?php esc_attr_e('Are you lost?') ?>"><?php printf(__('← Back to %s'), get_bloginfo('title', 'display' )); ?></a></p>
<?php do_action('login_footer'); ?>
</body>
</html>
<?php
********/
}
开发者ID:jaiweb,项目名称:ASP,代码行数:29,代码来源:loginlock.php
示例11: show_user_pending_message
/**
* Display a message to the user after they have registered
*
* @uses registration_errors
*/
public function show_user_pending_message($errors)
{
if (!empty($_POST['redirect_to'])) {
// if a redirect_to is set, honor it
wp_safe_redirect($_POST['redirect_to']);
exit;
}
// if there is an error already, let it do it's thing
if ($errors->get_error_code()) {
return $errors;
}
$message = nua_default_registration_complete_message();
$message = nua_do_email_tags($message, array('context' => 'pending_message'));
$message = apply_filters('new_user_approve_pending_message', $message);
$errors->add('registration_required', $message, 'message');
$success_message = __('Registration successful.', 'new-user-approve');
$success_message = apply_filters('new_user_approve_registration_message', $success_message);
login_header(__('Pending Approval', 'new-user-approve'), '<p class="message register">' . $success_message . '</p>', $errors);
login_footer();
// an exit is necessary here so the normal process for user registration doesn't happen
exit;
}
开发者ID:0dp,项目名称:dreamcity,代码行数:27,代码来源:new-user-approve.php
示例12: simplr_login_switch
function simplr_login_switch()
{
$options = get_option('simplr_reg_options');
if (!isset($_GET['action'])) {
$_GET['action'] = 'login';
}
$action = $_GET['action'];
global $errors;
switch ($action) {
case 'logout':
check_admin_referer('log-out');
wp_logout();
$redirect_to = !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true';
wp_safe_redirect($redirect_to);
exit;
break;
case 'lostpassword':
case 'retrievepassword':
?>
<form name="lostpasswordform" id="lostpasswordform" action="<?php
echo get_permalink($options->login_redirect);
?>
?action=lostpassword" method="post">
<p>
<label><?php
_e('Username or E-mail:', 'simplr-registration-form');
?>
<br />
<input type="text" name="user_login" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
</p>
<?php
do_action('lostpassword_form');
?>
<input type="hidden" name="redirect_to" value="<?php
echo esc_attr(@$redirect_to);
?>
" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php
esc_attr_e('Get New Password', 'simplr-registration-form');
?>
" tabindex="100" /></p>
</form>
<p id="nav">
<a href="<?php
echo site_url('wp-login.php', 'login');
?>
"><?php
_e('Log in', 'simplr-registration-form');
?>
</a>
<?php
if (get_option('users_can_register')) {
?>
| <a href="<?php
echo site_url('wp-login.php?action=register', 'login');
?>
"><?php
_e('Register', 'simplr-registration-form');
?>
</a>
<?php
}
?>
</p>
<?php
login_footer('user_login');
break;
case 'resetpass':
case 'rp':
$user = check_password_reset_key($_GET['key'], $_GET['login']);
if (is_wp_error($user)) {
wp_redirect(site_url('wp-login.php?action=lostpassword&error=invalidkey'));
exit;
}
$errors = '';
if (isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2']) {
$errors = new WP_Error('password_reset_mismatch', __('The passwords do not match.', 'simplr-registration-form'));
} elseif (isset($_POST['pass1']) && !empty($_POST['pass1'])) {
reset_password($user, $_POST['pass1']);
login_header(__('Password Reset', 'simplr-registration-form'), '<p class="message reset-pass">' . __('Your password has been reset.', 'simplr-registration-form') . ' <a href="' . site_url('wp-login.php', 'login') . '">' . __('Log in', 'simplr-registration-form') . '</a></p>');
login_footer();
exit;
}
wp_enqueue_script('utils');
wp_enqueue_script('user-profile');
login_header(__('Reset Password', 'simplr-registration-form'), '<p class="message reset-pass">' . __('Enter your new password below.', 'simplr-registration-form') . '</p>', $errors);
?>
<form name="resetpassform" id="resetpassform" action="<?php
echo get_permalink($options->login_redirect) . '?action=resetpass&key=' . urlencode($_GET['key']) . '&login=' . urlencode($_GET['login']);
?>
" method="post">
<input type="hidden" id="user_login" value="<?php
echo esc_attr($_GET['login']);
?>
" autocomplete="off" />
<p>
//.........这里部分代码省略.........
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:101,代码来源:login.php
示例13: rpr_login_form_adminverify
public function rpr_login_form_adminverify()
{
global $register_plus_redux;
global $errors;
if (is_array($errors->errors) && isset($errors->errors['registered'])) {
$temp = $errors->errors;
unset($temp['registered']);
$errors->errors = $temp;
}
if (is_array($errors->error_data) && isset($errors->error_data['registered'])) {
$temp = $errors->error_data;
unset($temp['registered']);
$errors->error_data = $temp;
}
if (!is_wp_error($errors)) {
$errors = new WP_Error();
}
$errors->add('verify_user_admin', nl2br($register_plus_redux->rpr_get_option('message_verify_user_admin')), 'message');
login_header(__('Admin Verification', 'register-plus-redux'), '', $errors);
login_footer();
exit;
}
开发者ID:radiok,项目名称:register-plus-redux,代码行数:22,代码来源:rpr-login.php
示例14: new_twitter_request_email
function new_twitter_request_email()
{
$user_email = '';
$errors = new WP_Error();
if (isset($_POST['user_email'])) {
$user_email = $_POST['user_email'];
if ($user_email == '') {
$errors->add('empty_email', __('<strong>ERROR</strong>: Please type your e-mail address.'));
} elseif (!is_email($user_email)) {
$errors->add('invalid_email', __('<strong>ERROR</strong>: The email address isn’t correct.'));
$user_email = '';
} elseif (email_exists($user_email)) {
$errors->add('email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'));
}
if (isset($_POST['user_email']) && $errors->get_error_code() == '') {
return $user_email;
}
}
login_header(__('Registration Form'), '<p class="message register">' . __('Please enter your email address to register!') . '</p>', $errors);
?>
<form name="registerform" id="registerform" action="<?php
echo esc_url(site_url('wp-login.php?loginTwitter=1', 'login_post'));
?>
" method="post">
<p>
<label for="user_email"><?php
_e('E-mail');
?>
<br />
<input type="email" name="user_email" id="user_email" class="input" value="<?php
echo esc_attr(stripslashes($user_email));
?>
" size="25" tabindex="20" /></label>
</p>
<p id="reg_passmail"><?php
_e('A password will be e-mailed to you.');
?>
</p>
<br class="clear" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php
esc_attr_e('Register');
?>
" tabindex="100" /></p>
</form>
<?php
login_footer('user_login');
exit;
}
开发者ID:pwsclau,项目名称:kurastar_dev,代码行数:48,代码来源:nextend-twitter-connect.php
示例15: show_reset_password_form
function show_reset_password_form($user, $oncerkey, $redirect_to = false, $errors = false)
{
if (!is_a($user, 'WP_User')) {
// Ooops we don't have a user to use :( return to the login form as this shouldn't happen except in hack attempts
wp_safe_redirect(wp_login_url());
exit;
}
wp_enqueue_script('utils');
wp_enqueue_script('user-profile');
// We are going to save our key to a oncer for later checking - but set it to expire in 5 minutes
shrkey_set_usermeta_timed_oncer($user->ID, '_shrkey_password_expired_key', $oncerkey, '+5 minutes');
login_header(__('Expired Password', 'expirepassword'), '<p class="message reset-pass">' . __('Your password has <strong>expired</strong>. Enter a new password below.', 'expirepassword') . '</p>', $errors);
?>
<form name="expiredpasswordform" id="expiredpasswordform" method="post" action="<?php
echo esc_url(site_url('wp-login.php?action=expiredpassword', 'login_post'));
?>
">
<input type="hidden" name="user_login" id="user_login" value="<?php
echo esc_attr($user->user_login);
?>
" autocomplete="off" />
<input type="hidden" name="key" id="key" value="<?php
echo esc_attr($oncerkey);
?>
" autocomplete="off" />
<input type="hidden" name="redirect_to" id="redirect_to" value="<?php
echo esc_attr($redirect_to);
?>
" autocomplete="off" />
<label for="pass1"><?php
_e('New password');
?>
</label><br />
<div class="wp-pwd">
<span class="password-input-wrapper">
<input type="password" data-reveal="1" data-pw="<?php
echo esc_attr(wp_generate_password(16));
?>
" name="pass1" id="pass1" class="input" size="20" value="" autocomplete="off" aria-describedby="pass-strength-result" />
</span>
<div id="pass-strength-result" class="hide-if-no-js" aria-live="polite"><?php
_e('Strength indicator');
?>
</div>
</div>
</p>
<p class="user-pass2-wrap">
<label for="pass2"><?php
_e('Confirm new password');
?>
</label><br />
<input type="password" name="pass2" id="pass2" class="input" size="20" value="" autocomplete="off" />
</p>
<p class="description indicator-hint"><?php
_e('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'expirepassword');
?>
</p>
<br class="clear" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php
esc_attr_e('Reset Password', 'expirepassword');
?>
" /></p>
</form>
<?php
// Show the standard footer
login_footer('pass1');
}
开发者ID:newball,项目名称:expirepassword,代码行数:70,代码来源:public.expirepassword.php
示例16: login_init_callback
//.........这里部分代码省略.........
switch ($action) {
case 'register':
//Registration using 'register' action is now disabled!
wp_redirect(site_url('wp-login.php?registration=disabled'));
exit;
case $this->new_action:
//$action = 'register';
if (is_multisite()) {
// Multisite uses wp-signup.php
wp_redirect(apply_filters('wp_signup_location', site_url('wp-signup.php')));
exit;
}
if (!get_option('users_can_register')) {
wp_redirect(site_url('wp-login.php?registration=disabled'));
exit;
}
$user_login = '';
$user_email = '';
if ($http_post) {
$user_login = $_POST['user_login'];
$user_email = $_POST['user_email'];
$errors = register_new_user($user_login, $user_email);
if (!is_wp_error($errors)) {
$redirect_to = !empty($_POST['redirect_to']) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
wp_safe_redirect($redirect_to);
exit;
}
}
$redirect_to = apply_filters('registration_redirect', !empty($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : '');
login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
?>
<form name="registerform" id="registerform" action="<?php
echo site_url('wp-login.php?action=' . $this->new_action, 'login_post');
?>
" method="post">
<p>
<label><?php
_e('Username');
?>
<br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php
echo esc_attr(stripslashes($user_login));
?>
" size="20" tabindex="10" /></label>
</p>
<p>
<label><?php
_e('E-mail');
?>
<br />
<input type="text" name="user_email" id="user_email" class="input" value="<?php
echo esc_attr(stripslashes($user_email));
?>
" size="25" tabindex="20" /></label>
</p>
<?php
do_action('register_form');
?>
<p id="reg_passmail"><?php
_e('A password will be e-mailed to you.');
?>
</p>
<br class="clear" />
<input type="hidden" name="redirect_to" value="<?php
echo esc_attr($redirect_to);
?>
" />
<p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php
esc_attr_e('Register');
?>
" tabindex="100" /></p>
</form>
<p id="nav">
<a href="<?php
echo site_url('wp-login.php', 'login');
?>
"><?php
_e('Log in');
?>
</a> |
<a href="<?php
echo site_url('wp-login.php?action=lostpassword', 'login');
?>
" title="<?php
_e('Password Lost and Found');
?>
"><?php
_e('Lost your password?');
?>
</a>
</p>
<?php
login_footer('user_login');
//break;
exit;
}
}
开发者ID:kasuparu,项目名称:wp-timecraft,代码行数:101,代码来源:custom-registration-link.php
注:本文中的login_footer函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论