當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wp_lostpassword_url函數代碼示例

本文整理匯總了PHP中wp_lostpassword_url函數的典型用法代碼示例。如果您正苦於以下問題:PHP wp_lostpassword_url函數的具體用法?PHP wp_lostpassword_url怎麽用?PHP wp_lostpassword_url使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wp_lostpassword_url函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wp_login_form

    function wp_login_form($args = array())
    {
        $defaults = array('redirect' => (is_ssl() ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 'form_id' => uniqid('loginform_'), 'label_username' => __('Username', 'dfd'), 'placeholder_username' => __('Enter your login', 'dfd'), 'label_password' => __('Password', 'dfd'), 'placeholder_password' => __('Enter your password', 'dfd'), 'label_lost_password' => __('Lost password', 'dfd'), 'label_log_in' => __('Log In', 'dfd'), 'id_username' => uniqid('user_login_'), 'id_password' => uniqid('user_pass_'), 'id_submit' => uniqid('wp-submit_'), 'lost_password' => true, 'value_username' => '');
        $args = wp_parse_args($args, apply_filters('login_form_defaults', $defaults));
        $registration_link = '';
        if (get_option('users_can_register')) {
            $registration_link = '
			<a href="' . wp_registration_url() . '"><i class="ios7icon-lock"></i>' . __('Registration', 'dfd') . '</a>
		';
        }
        $form = '
		<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . esc_url(site_url('wp-login.php', 'login_post')) . '" method="post">
			' . apply_filters('login_form_top', '', $args) . '
			<p class="login-username">
				<label for="' . esc_attr($args['id_username']) . '">' . esc_html($args['label_username']) . '</label>
				<input type="text" name="log" id="' . esc_attr($args['id_username']) . '" class="input" value="' . esc_attr($args['value_username']) . '" size="20" placeholder="' . esc_html($args['placeholder_username']) . '" />
			</p>
			<p class="login-password">
				<label for="' . esc_attr($args['id_password']) . '">' . esc_html($args['label_password']) . '</label>
				<input type="password" name="pwd" id="' . esc_attr($args['id_password']) . '" class="input" value="" size="20" placeholder="' . esc_html($args['placeholder_password']) . '" />
			</p>
			<p class="login-submit">
				<button type="submit" name="wp-submit" id="' . esc_attr($args['id_submit']) . '" class="button"><i class="icon-arrow-left-1"></i>' . esc_attr($args['label_log_in']) . '</button>
				<input type="hidden" name="redirect_to" value="' . esc_url($args['redirect']) . '" />
			</p>
			' . ($args['lost_password'] ? '<p class="login-lost-password"><label>' . '<a href="' . wp_lostpassword_url() . '">' . esc_attr($args['label_lost_password']) . '</a></label></p>' : '') . '<p class="login-registration">
				' . $registration_link . '
			</p>' . apply_filters('login_form_bottom', '', $args) . '
		</form>';
        echo $form;
    }
開發者ID:sabdev1,項目名稱:ljcdevsab,代碼行數:31,代碼來源:widget-login.php

示例2: ap_scripts_front

function ap_scripts_front()
{
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-form', array('jquery'), false);
    wp_enqueue_script('ap-functions-js', ANSPRESS_URL . 'assets/prod/ap-functions.min.js', array('jquery', 'jquery-form'));
    wp_enqueue_script('ap-anspress_script', ANSPRESS_URL . 'assets/prod/anspress_site.min.js', array('jquery', 'jquery-form'), AP_VERSION);
    wp_enqueue_script('peity-js', ap_get_theme_url('js/jquery.peity.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-initial.js', ap_get_theme_url('js/initial.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-scrollbar.js', ap_get_theme_url('js/jquery.scrollbar.min.js'), 'jquery', AP_VERSION);
    wp_enqueue_script('ap-js', ap_get_theme_url('prod/ap.min.js'), array('jquery', 'jquery-form'), AP_VERSION);
    wp_enqueue_style('ap-style', ap_get_theme_url('css/main.css'), array(), AP_VERSION);
    $custom_css = '
        #anspress .ap-q-cells{
                margin-left: ' . (ap_opt('avatar_size_qquestion') + 10) . 'px;
        }
        #anspress .ap-a-cells{
                margin-left: ' . (ap_opt('avatar_size_qanswer') + 10) . 'px;
        }#anspress .ap-comment-content{
                margin-left: ' . (ap_opt('avatar_size_qcomment') + 15) . 'px;
        }';
    wp_add_inline_style('ap-style', $custom_css);
    wp_enqueue_style('ap-fonts', ap_get_theme_url('fonts/style.css'), array(), AP_VERSION);
    do_action('ap_enqueue');
    wp_enqueue_style('ap-responsive', ap_get_theme_url('css/responsive.css'), array(), AP_VERSION);
    wp_enqueue_style('ap-overrides', ap_get_theme_url('css/overrides.css'), array(), AP_VERSION);
    echo '<script type="text/javascript">';
    echo 'var ajaxurl = "' . admin_url('admin-ajax.php') . '",';
    echo 'ap_nonce 	= "' . wp_create_nonce('ap_ajax_nonce') . '",';
    echo 'ap_max_tags = "' . ap_opt('max_tags') . '",';
    echo 'disable_hover_card = "' . (ap_opt('disable_hover_card') ? true : false) . '"';
    echo '</script>';
    wp_localize_script('ap-anspress_script', 'aplang', array('password_field_not_macthing' => __('Password not matching', 'ap'), 'password_length_less' => __('Password length must be 6 or higher', 'ap'), 'not_valid_email' => __('Not a valid email', 'ap'), 'username_less' => __('Username length must be 4 or higher', 'ap'), 'username_not_avilable' => __('Username not available', 'ap'), 'email_already_in_use' => sprintf(__('Email already in use. %sDo you want to reset your password?%s', 'ap'), '<a href="' . wp_lostpassword_url() . '">', '</a>'), 'loading' => __('Loading', 'ap'), 'sending' => __('Sending request', 'ap'), 'adding_to_fav' => __('Adding question to your favorites', 'ap'), 'voting_on_post' => __('Sending your vote', 'ap'), 'requesting_for_closing' => __('Requesting for closing this question', 'ap'), 'sending_request' => __('Submitting request', 'ap'), 'loading_comment_form' => __('Loading comment form', 'ap'), 'submitting_your_question' => __('Sending your question', 'ap'), 'submitting_your_answer' => __('Sending your answer', 'ap'), 'submitting_your_comment' => __('Sending your comment', 'ap'), 'deleting_comment' => __('Deleting comment', 'ap'), 'updating_comment' => __('Updating comment', 'ap'), 'loading_form' => __('Loading form', 'ap'), 'saving_labels' => __('Saving labels', 'ap'), 'loading_suggestions' => __('Loading suggestions', 'ap'), 'uploading_cover' => __('Uploading cover', 'ap'), 'saving_profile' => __('Saving profile', 'ap'), 'sending_message' => __('Sending message', 'ap'), 'loading_conversation' => __('Loading conversation', 'ap'), 'loading_new_message_form' => __('Loading new message form', 'ap'), 'loading_more_conversations' => __('Loading more conversations', 'ap'), 'searching_conversations' => __('Searching conversations', 'ap'), 'loading_message_edit_form' => __('Loading message form', 'ap'), 'updating_message' => __('Updating message', 'ap'), 'deleting_message' => __('Deleting message', 'ap'), 'uploading' => __('Uploading', 'ap'), 'error' => ap_icon('error'), 'warning' => ap_icon('warning'), 'success' => ap_icon('success'), 'not_valid_response' => __('Something went wrong in server side, not a valid response.', 'ap')));
    wp_localize_script('ap-site-js', 'apoptions', array('ajaxlogin' => ap_opt('ajax_login')));
}
開發者ID:kennyma603,項目名稱:anspress,代碼行數:34,代碼來源:functions.php

示例3: v_forcelogin

function v_forcelogin()
{
    if (!is_user_logged_in() && (v_getUrl() != wp_login_url() && v_getUrl() != wp_registration_url() && v_getUrl() != wp_lostpassword_url())) {
        wp_redirect(wp_login_url(), 302);
        exit;
    }
}
開發者ID:pixeline,項目名稱:wp-projecthub,代碼行數:7,代碼來源:functions.force-login.php

示例4: enqueue_api_scripts

    public function enqueue_api_scripts()
    {
        if (!$this->_data->get_option('accept_api_logins')) {
            return false;
        }
        $domain = get_bloginfo('name');
        $domain = $domain ? $domain : __('WordPress', Eab_EventsHub::TEXT_DOMAIN);
        $show_facebook = !$this->_data->get_option('api_login-hide-facebook');
        $show_twitter = !$this->_data->get_option('api_login-hide-twitter');
        $show_google = !$this->_data->get_option('api_login-hide-google');
        $registration_msg = '';
        $registration_services = array();
        if ($show_facebook) {
            $registration_services[] = 'Facebook';
        }
        if ($show_twitter) {
            $registration_services[] = 'Twitter';
        }
        if ($show_google) {
            $registration_services[] = 'Google';
        }
        // Properly enumerate supported service IDs and construct the registration supplement message.
        if (!empty($registration_services)) {
            if (count($registration_services) > 1) {
                $supported_ids = sprintf(_x('%s or %s', 'Supported registration services: the first variable can be single service or comma-separated enumeration', Eab_EventsHub::TEXT_DOMAIN), join(', ', array_slice($registration_services, 0, count($registration_services) - 1)), end($registration_services));
            } else {
                $supported_ids = end($registration_services);
            }
            $registration_msg = sprintf(_x(' - or just click cancel to register using your %s ID', 'Registration supplemental message part', Eab_EventsHub::TEXT_DOMAIN), $supported_ids);
        }
        wp_enqueue_script('eab_api_js', plugins_url('events-and-bookings/js/eab-api.js'), array('jquery'), Eab_EventsHub::CURRENT_VERSION);
        wp_localize_script('eab_api_js', 'l10nEabApi', apply_filters('eab-javascript-api_vars', array('facebook' => __('Login with Facebook', Eab_EventsHub::TEXT_DOMAIN), 'twitter' => __('Login with Twitter', Eab_EventsHub::TEXT_DOMAIN), 'google' => __('Login with Google', Eab_EventsHub::TEXT_DOMAIN), 'wordpress' => sprintf(__('Login with %s', Eab_EventsHub::TEXT_DOMAIN), $domain), 'cancel' => __('Cancel', Eab_EventsHub::TEXT_DOMAIN), 'please_wait' => __('Please, wait...', Eab_EventsHub::TEXT_DOMAIN), 'wp_register' => __('Register', Eab_EventsHub::TEXT_DOMAIN), 'wp_registration_msg' => sprintf(_x('Create a username in order to register for this event %s', 'The variable is registration supplemental part', Eab_EventsHub::TEXT_DOMAIN), $registration_msg), 'wp_login' => __('Log in', Eab_EventsHub::TEXT_DOMAIN), 'wp_login_msg' => sprintf(_x('Login with your existing username in order to register for this event %s', 'The variable is registration supplemental part', Eab_EventsHub::TEXT_DOMAIN), $registration_msg), 'wp_username' => __('Username', Eab_EventsHub::TEXT_DOMAIN), 'wp_password' => __('Password', Eab_EventsHub::TEXT_DOMAIN), 'wp_email' => __('Email', Eab_EventsHub::TEXT_DOMAIN), 'wp_toggle_on' => __('Already a member? Log in here', Eab_EventsHub::TEXT_DOMAIN), 'wp_toggle_off' => __('Click here to register', Eab_EventsHub::TEXT_DOMAIN), 'wp_lost_pw_text' => __('Forgot your password', Eab_EventsHub::TEXT_DOMAIN), 'wp_lost_pw_url' => wp_lostpassword_url(), 'wp_submit' => __('Submit', Eab_EventsHub::TEXT_DOMAIN), 'wp_cancel' => __('Cancel', Eab_EventsHub::TEXT_DOMAIN), 'data' => array('show_facebook' => $show_facebook, 'show_twitter' => $show_twitter, 'show_google' => $show_google, 'show_wordpress' => !$this->_data->get_option('api_login-hide-wordpress'), 'gg_client_id' => $this->_data->get_option('google-client_id')), 'wp_missing_username_password' => __('Username and password are required!', Eab_EventsHub::TEXT_DOMAIN), 'wp_username_pass_invalid' => __('Invalid username or password!', Eab_EventsHub::TEXT_DOMAIN), 'wp_missing_user_email' => __('Username and email are required!', Eab_EventsHub::TEXT_DOMAIN), 'wp_signup_error' => __('Your email/username is already taken or email is invalid!', Eab_EventsHub::TEXT_DOMAIN))));
        if (!$this->_data->get_option('facebook-no_init')) {
            if (defined('EAB_INTERNAL_FLAG__FB_INIT_ADDED')) {
                return false;
            }
            add_action('wp_footer', create_function('', "echo '" . sprintf('<div id="fb-root"></div><script type="text/javascript">
				window.fbAsyncInit = function() {
					FB.init({
					  appId: "%s",
					  status: true,
					  cookie: true,
					  xfbml: true,
					  version    : "v2.5"
					});
				};
				// Load the FB SDK Asynchronously
				(function(d){
					var js, id = "facebook-jssdk"; if (d.getElementById(id)) {return;}
					js = d.createElement("script"); js.id = id; js.async = true;
					js.src = "//connect.facebook.net/en_US/all.js";
					d.getElementsByTagName("head")[0].appendChild(js);
				}(document));
				</script>', $this->_data->get_option('facebook-app_id')) . "';"));
            define('EAB_INTERNAL_FLAG__FB_INIT_ADDED', true, true);
        }
    }
開發者ID:nayabbukhari,項目名稱:circulocristiano,代碼行數:57,代碼來源:class_eab_api.php

示例5: accesspress_password_recovery_link_shortcode

/**
 * Generate a password recovery link.
 *
 * @since 2.0.2
 */
function accesspress_password_recovery_link_shortcode($atts)
{
    $atts = shortcode_atts(array('text' => __('Lost Password?', 'premise')), $atts);
    if (is_user_logged_in()) {
        return;
    }
    $redirect = add_query_arg('just-logged-in', 'true', get_permalink(accesspress_get_option('login_page')));
    return sprintf('<a href="%s">%s</a>', wp_lostpassword_url(esc_url_raw($redirect)), current_user_can('unfiltered_html') ? $atts['text'] : esc_html($atts['text']));
}
開發者ID:hscale,項目名稱:webento,代碼行數:14,代碼來源:shortcodes.php

示例6: widget

 /**
  * Widget
  * Display the widget in the sidebar
  * Save output to the cache if empty
  *
  * @param  array  sidebar arguments
  * @param  array  instance
  */
 public function widget($args, $instance)
 {
     extract($args);
     // Print the widget wrapper
     echo $before_widget;
     if (is_user_logged_in()) {
         // Get current user instance
         global $current_user;
         // Print title
         $title = $instance['title_user'] ? $instance['title_user'] : __('Hey %s!', 'jigoshop');
         if ($title) {
             echo $before_title . sprintf($title, ucwords($current_user->display_name)) . $after_title;
         }
         // Create the default set of links
         $links = apply_filters('jigoshop_widget_logout_user_links', array(__('My Account', 'jigoshop') => get_permalink(jigoshop_get_page_id('myaccount')), __('Change Password', 'jigoshop') => get_permalink(jigoshop_get_page_id('change_password')), __('Logout', 'jigoshop') => wp_logout_url(home_url())));
     } else {
         // Print title
         $title = $instance['title_guest'] ? $instance['title_guest'] : __('Login', 'jigoshop');
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         do_action('jigoshop_widget_login_before_form');
         // Get redirect URI
         $redirect_to = apply_filters('jigoshop_widget_login_redirect', get_permalink(jigoshop_get_page_id('myaccount')));
         $fields = array();
         // Support for other plugins which uses GET parameters
         $fields = apply_filters('jigoshop_get_hidden_fields', $fields);
         echo "<form action='" . esc_url(wp_login_url($redirect_to)) . "' method='post' class='jigoshop_login_widget'>";
         foreach ($fields as $key => $value) {
             echo '<input type="hidden" name="' . $key . '" value="' . $value . '" />';
         }
         // Username
         echo "\n\t\t\t<p>\n\t\t\t\t<label for='log'>" . __('Username', 'jigoshop') . "</label>\n\t\t\t\t<input type='text' name='log' id='log' class='input-text username' />\n\t\t\t</p>\n\t\t\t";
         // Password
         echo "\n\t\t\t<p>\n\t\t\t\t<label for='pwd'>" . __('Password', 'jigoshop') . "</label>\n\t\t\t\t<input type='password' name='pwd' id='pwd' class='input-text password' />\n\t\t\t</p>\n\t\t\t";
         echo "\n\t\t\t<p>\n\t\t\t\t<input type='submit' name='submit' value='" . __('Login', 'jigoshop') . "' class='input-submit' />\n\t\t\t\t<a class='forgot' href='" . esc_url(wp_lostpassword_url($redirect_to)) . "'>" . __('Forgot it?', 'jigoshop') . "</a>\n\t\t\t</p>\n\t\t\t";
         if (Jigoshop_Base::get_options()->get('jigoshop_enable_signup_form') == 'yes') {
             echo '<p class="register">';
             wp_register(__('New user?', 'jigoshop') . ' ', '');
             echo '</p>';
         }
         echo "</form>";
         do_action('jigoshop_widget_login_after_form');
         $links = apply_filters('jigoshop_widget_login_user_links', array());
     }
     // Loop & print out the links
     if ($links) {
         echo "\n\t\t\t<nav role='navigation'>\n\t\t\t\t<ul class='pagenav'>";
         foreach ($links as $title => $href) {
             $href = esc_url($href);
             echo "<li><a title='Go to {$title}' href='{$href}'>{$title}</a></li>";
         }
         echo "\n\t\t\t\t</ul>\n\t\t\t</nav>";
     }
     // Print closing widget wrapper
     echo $after_widget;
 }
開發者ID:ashik968,項目名稱:digiplot,代碼行數:65,代碼來源:user_login.php

示例7: get_url

 /**
  * @param $page
  */
 function get_url($page)
 {
     switch ($page) {
         case 'lostpassword':
             return esc_url(wp_lostpassword_url());
         case 'logout':
             return wp_logout_url(get_permalink());
     }
 }
開發者ID:hoangsoft90,項目名稱:hw-hoangweb-plugin,代碼行數:12,代碼來源:hw-context-user.php

示例8: pp_password_reset_url

/**
 * Return ProfilePress password reset url.
 *
 * @return bool|string
 */
function pp_password_reset_url()
{
    $data = pp_db_data();
    $db_url = $data['set_lost_password_url'];
    if (!empty($db_url)) {
        return get_permalink($db_url);
    } else {
        return wp_lostpassword_url();
    }
}
開發者ID:artre,項目名稱:study,代碼行數:15,代碼來源:global-functions.php

示例9: wpjb_snipp_password_reminder_link

/**
 * Adds "Remind Password" link to WPJB login forms.
 *
 * This function uses wpjb_shortcode_login filter to create and insert
 * remind password link.
 *
 * @param Daq_View View object to be updated
 * @return Daq_View Updated View object
 */
function wpjb_snipp_password_reminder_link(Daq_View $view)
{
    $buttons = $view->buttons;
    // Add another button (technically this can be any HTML tag)
    $buttons[] = array("tag" => "a", "href" => wp_lostpassword_url(), "html" => "Remind Password");
    // Note you cannot modify $view->buttons array directly,
    // you can only assign value to it.
    $view->buttons = $buttons;
    return $view;
}
開發者ID:simpliko,項目名稱:wpjobboard-snippets,代碼行數:19,代碼來源:password-reminder-link.php

示例10: atcf_shortcode_login_form_bottom

/**
 * Forgot Password/Register links
 *
 * Append helpful links to the bottom of the login form.
 *
 * @since Astoundify Crowdfunding 1.0
 *
 * @return $form
 */
function atcf_shortcode_login_form_bottom()
{
    global $edd_options;
    $add = '<p>
		<a href="' . wp_lostpassword_url() . '">' . __('Forgot Password', 'atcf') . '</a> ';
    if (isset($edd_options['register_page'])) {
        $add .= _x('or', 'login form action divider', 'atcf');
        $add .= ' <a href="' . esc_url(get_permalink($edd_options['register_page'])) . '">' . __('Register', 'atcf') . '</a>';
    }
    $add .= '</p>';
    return $add;
}
開發者ID:ajeremias,項目名稱:fundify-child,代碼行數:21,代碼來源:shortcode-login.php

示例11: tpl_link_reset_password

/**
 * Include the reset password link template
 * @param  string $label   	Link text. Default: 'Reset Password'
 * @param  string $classes 	Classes to add to the <a> tag. Default: 'reset-password'
 */
function tpl_link_reset_password($label = null, $classes = 'reset-password')
{
    if (is_null($label)) {
        $label = __('Reset Password', 'theme');
    }
    if (Settings::frontend_login_enabled()) {
        $url = home_url('reset-password');
    } else {
        $url = wp_lostpassword_url();
    }
    tpl('link', 'reset-password', array('url' => $url, 'label' => $label, 'classes' => $classes));
}
開發者ID:andrewcroce,項目名稱:TPL,代碼行數:17,代碼來源:link_functions.php

示例12: widget

    /**
     * load widget
     *
     * @name    widget
     * @author  Marcelo Mesquita <stallefish@gmail.com>
     * @since   2012-05-09
     * @updated 2012-05-10
     * @param   array $args - widget structure
     * @param   array $instance - widget data
     * @return  void
     */
    function widget($args, $instance)
    {
        global $wpdb;
        print $args['before_widget'];
        if (!empty($instance['title'])) {
            print $args['before_head'];
            print $args['before_title'] . $instance['title'] . $args['after_title'];
            print $args['after_head'];
        }
        print $args['before_body'];
        if (is_user_logged_in()) {
            global $current_user;
            ?>
				<div class="greetings">
					<p>Olá, <?php 
            print $current_user->display_name;
            ?>
 <a href="<?php 
            print wp_logout_url(site_url());
            ?>
" title="sair">sair</a></p>
				</div>
				<div class="clear"></div>
			<?php 
        } else {
            ?>
				<div class="login">
					<form action="<?php 
            print wp_login_url(site_url());
            ?>
" method="post">
						<input type="text" id="user_login" name="log" value="CPF" class="memory" />
						<input type="password" id="user_pass" name="pwd" value="senha" /><button type="submit" name="wp-submit" id="wp-submit" value="Login">OK</button>
						<a href="<?php 
            print wp_lostpassword_url();
            ?>
" title="Esqueceu a senha?" class="forget">Esqueceu a senha?</a>
					</form>
				</div>
				<div class="register">
					<a href="<?php 
            print site_url('/cadastro/');
            ?>
" title="Ainda não possuo cadastro">Ainda <span>não</span> possuo cadastro.</a>
				</div>
				<div class="clear"></div>
			<?php 
        }
        print $args['after_body'];
        print $args['after_widget'];
    }
開發者ID:CoordCulturaDigital-Minc,項目名稱:setoriais,代碼行數:62,代碼來源:sav-widget-login.php

示例13: cws_do_login_form

function cws_do_login_form()
{
    // Get login status and username
    $loggedin = is_user_logged_in();
    $user = wp_get_current_user();
    // If already logged in, output pleasent message with logout option.
    // The logout option will redirect back to this custom login/logout page.
    if ($loggedin) {
        ?>

		<h3>You are already logged in!</h3>
		<p>Hello <?php 
        echo $user->user_firstname;
        ?>
! Looks like you are already signed in. No need to log in again.</p>
		<p><a href="/">Go to Homepage</a> or <a href="<?php 
        echo wp_logout_url(get_permalink() . "/login");
        ?>
">Log Out</a></p>

	<?php 
    } else {
        // Set up array to pass to login function
        $args = array('form_id' => 'loginform', 'redirect' => get_bloginfo('url'), 'id_username' => 'user_login', 'id_password' => 'user_pass', 'id_remember' => 'rememberme', 'id_submit' => 'wp-submit', 'label_username' => __('Username'), 'label_password' => __('Password'), 'label_remember' => __('Remember Me'), 'label_log_in' => __('Log In'));
        ?>
<!--
	Create content for custom login page.
	Format the login page and provide instructions to visitor.
	Offer links to website front page and password retreival.
	Call WP funciton to display UI.
	Display lost password link.
-->
		<center><h1>Website Login Page</h1><hr>
		<h5>Enter your username and password to access <br>the administrative area of your website,<br>
		<a href="/">or click here for the website Front Page</a></h5>
		<hr>
		Use the '<strong>Lost your password?</strong>' link below <br>to have a password reset link sent to you by email.
		<br><hr><br>
		</center>
		<?php 
        wp_login_form($args);
        ?>
		<a href="<?php 
        echo wp_lostpassword_url();
        ?>
" title="Lost Password">Lost your password?</a>
		<?php 
    }
}
開發者ID:MattRy,項目名稱:loginout,代碼行數:49,代碼來源:login.php

示例14: widget

 /**
  * (non-PHPdoc)
  *
  * @see \Widgets\WidgetBase::widget()
  */
 public function widget($args, $instance)
 {
     /*
      * Put all special URLs
      */
     $instance['logoutUrl'] = wp_logout_url(home_url());
     $instance['loginUrl'] = wp_login_url(home_url());
     $instance['registrationUrl'] = wp_registration_url();
     $instance['lostPasswordUrl'] = wp_lostpassword_url();
     $instance['postsUrl'] = '/wp-admin/edit.php';
     /*
      * And call the widget func from the parent class WidgetBase.
      */
     parent::widget($args, $instance);
 }
開發者ID:chemaclass,項目名稱:knob-base,代碼行數:20,代碼來源:LoginWidget.php

示例15: mo2f_wp_authenticate_username_password

function mo2f_wp_authenticate_username_password($user, $username, $password)
{
    if (is_a($user, 'WP_User')) {
        return $user;
    }
    if (empty($username) || empty($password)) {
        $error = new WP_Error();
        if (empty($username)) {
            $error->add('empty_username', __('<strong>ERROR</strong>: The username field is empty.'));
        }
        if (empty($password)) {
            $error->add('empty_password', __('<strong>ERROR</strong>: The password field is empty.'));
        }
        return $error;
    }
    $userdata = get_user_by('login', $username);
    if (!$userdata) {
        return new WP_Error('invalid_username', sprintf(__('<strong>ERROR</strong>: Invalid username. <a href="%s" title="Password Lost and Found">Lost your password</a>?'), wp_lostpassword_url()));
    }
    if (is_multisite()) {
        // Is user marked as spam?
        if (1 == $userdata->spam) {
            return new WP_Error('invalid_username', __('<strong>ERROR</strong>: Your account has been marked as a spammer.'));
        }
        // Is a user's blog marked as spam?
        if (!is_super_admin($userdata->ID) && isset($userdata->primary_blog)) {
            $details = get_blog_details($userdata->primary_blog);
            if (is_object($details) && $details->spam == 1) {
                return new WP_Error('blog_suspended', __('Site Suspended.'));
            }
        }
    }
    $userdata = apply_filters('wp_authenticate_user', $userdata, $password);
    if (is_wp_error($userdata)) {
        return $userdata;
    }
    if (!wp_check_password($password, $userdata->user_pass, $userdata->ID)) {
        return new WP_Error('incorrect_password', sprintf(__('<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?'), $username, wp_lostpassword_url()));
    }
    $user = new WP_User($userdata->ID);
    return $user;
}
開發者ID:sekane81,項目名稱:ratoninquietoweb,代碼行數:42,代碼來源:miniorange_2_factor_common_login.php


注:本文中的wp_lostpassword_url函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。