当前位置: 首页>>代码示例>>PHP>>正文


PHP bbp_wp_login_action函数代码示例

本文整理汇总了PHP中bbp_wp_login_action函数的典型用法代码示例。如果您正苦于以下问题:PHP bbp_wp_login_action函数的具体用法?PHP bbp_wp_login_action怎么用?PHP bbp_wp_login_action使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bbp_wp_login_action函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bbp_wp_login_action

<?php

/**
 * User Login Form
 *
 * @package bbPress
 * @subpackage Theme
 */
?>

<form method="post" action="<?php 
bbp_wp_login_action(array('context' => 'login_post'));
?>
" class="bbp-login-form">
	<fieldset class="bbp-form">
		<legend><?php 
_e('Log In', 'bbpress');
?>
</legend>

		<div class="bbp-username">
			<label for="user_login"><?php 
_e('Username', 'bbpress');
?>
: </label>
			<input type="text" name="log" value="<?php 
bbp_sanitize_val('user_login', 'text');
?>
" size="20" id="user_login" tabindex="<?php 
bbp_tab_index();
?>
开发者ID:hscale,项目名称:webento,代码行数:31,代码来源:form-user-login.php

示例2: bbp_wp_login_action

<?php

/**
 * User Lost Password Form
 *
 * @package bbPress
 * @subpackage Theme
 */
?>

<form method="post" action="<?php 
bbp_wp_login_action(array('action' => 'lostpassword', 'context' => 'login_post'));
?>
" class="bbp-login-form">
	<fieldset class="bbp-form">
		<legend><?php 
_e('Lost Password', 'bbpress');
?>
</legend>

		<div class="bbp-username">
			<p>
				<label for="user_login" class="hide"><?php 
_e('Username or Email', 'bbpress');
?>
: </label>
				<input type="text" name="user_login" value="" size="20" id="user_login" tabindex="<?php 
bbp_tab_index();
?>
" />
			</p>
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:31,代码来源:form-user-lost-pass.php

示例3: widget

    /**
     * Displays the output, the login form
     *
     * @since bbPress (r2827)
     *
     * @param mixed $args Arguments
     * @param array $instance Instance
     * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
     * @uses get_template_part() To get the login/logged in form
     */
    public function widget($args = array(), $instance = array())
    {
        // Get widget settings
        $settings = $this->parse_settings($instance);
        // Typical WordPress filter
        $settings['title'] = apply_filters('widget_title', $settings['title'], $instance, $this->id_base);
        // bbPress filters
        $settings['title'] = apply_filters('bbp_login_widget_title', $settings['title'], $instance, $this->id_base);
        $settings['register'] = apply_filters('bbp_login_widget_register', $settings['register'], $instance, $this->id_base);
        $settings['lostpass'] = apply_filters('bbp_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base);
        echo $args['before_widget'];
        if (!empty($settings['title'])) {
            echo $args['before_title'] . $settings['title'] . $args['after_title'];
        }
        if (!is_user_logged_in()) {
            ?>
			<form method="post" action="<?php 
            bbp_wp_login_action(array('context' => 'login_post'));
            ?>
" class="bbp-login-form">
				<fieldset>
					<legend><?php 
            _e('Log In', 'bbpress');
            ?>
</legend>

					<div class="bbp-username form-group">
						<label for="user_login" class="sr-only"><?php 
            _e('Username', 'bbpress');
            ?>
: </label>
						<div class="input-group">
							<span class="input-group-addon">
								<span class="glyphicon ipt-icomoon-user"></span>
							</span>
							<input placeholder="<?php 
            _e('Username', 'bbpress');
            ?>
" class="form-control" type="text" name="log" value="<?php 
            bbp_sanitize_val('user_login', 'text');
            ?>
" size="20" id="user_login" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
						</div>
					</div>

					<div class="bbp-password form-group">
						<label for="user_pass" class="sr-only"><?php 
            _e('Password', 'bbpress');
            ?>
: </label>
						<div class="input-group">
							<span class="input-group-addon">
								<span class="glyphicon ipt-icomoon-console"></span>
							</span>
							<input placeholder="<?php 
            _e('Password', 'bbpress');
            ?>
" class="form-control" type="password" name="pwd" value="<?php 
            bbp_sanitize_val('user_pass', 'password');
            ?>
" size="20" id="user_pass" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
						</div>
					</div>

					<?php 
            do_action('login_form');
            ?>

					<div class="bbp-remember-me checkbox">
						<input type="checkbox" name="rememberme" value="forever" <?php 
            checked(bbp_get_sanitize_val('rememberme', 'checkbox'), true, true);
            ?>
 id="rememberme" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
						<label for="rememberme"><?php 
            _e('Remember Me', 'bbpress');
            ?>
</label>
					</div>

					<div class="bbp-submit-wrapper btn-group">
						<?php 
//.........这里部分代码省略.........
开发者ID:andychoi,项目名称:k-knowledgebase-theme-wp,代码行数:101,代码来源:class-ipt-kb-bbp-login-widget.php

示例4: widget

    /**
     * Displays the output, the login form
     *
     * @since bbPress (r2827)
     *
     * @param mixed $args Arguments
     * @param array $instance Instance
     * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
     * @uses get_template_part() To get the login/logged in form
     */
    public function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('bbp_login_widget_title', $instance['title']);
        $register = apply_filters('bbp_login_widget_register', $instance['register']);
        $lostpass = apply_filters('bbp_login_widget_lostpass', $instance['lostpass']);
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        if (!is_user_logged_in()) {
            ?>

			<form method="post" action="<?php 
            bbp_wp_login_action(array('context' => 'login_post'));
            ?>
" class="bbp-login-form">
				<fieldset>
					<legend><?php 
            _e('Log In', 'bbpress');
            ?>
</legend>

					<div class="bbp-username">
						<label for="user_login"><?php 
            _e('Username', 'bbpress');
            ?>
: </label>
						<input type="text" name="log" value="<?php 
            bbp_sanitize_val('user_login', 'text');
            ?>
" size="20" id="user_login" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
					</div>

					<div class="bbp-password">
						<label for="user_pass"><?php 
            _e('Password', 'bbpress');
            ?>
: </label>
						<input type="password" name="pwd" value="<?php 
            bbp_sanitize_val('user_pass', 'password');
            ?>
" size="20" id="user_pass" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
					</div>

					<div class="bbp-remember-me">
						<input type="checkbox" name="rememberme" value="forever" <?php 
            checked(bbp_get_sanitize_val('rememberme', 'checkbox'), true, true);
            ?>
 id="rememberme" tabindex="<?php 
            bbp_tab_index();
            ?>
" />
						<label for="rememberme"><?php 
            _e('Remember Me', 'bbpress');
            ?>
</label>
					</div>

					<div class="bbp-submit-wrapper">

						<?php 
            do_action('login_form');
            ?>

						<button type="submit" name="user-submit" id="user-submit" tabindex="<?php 
            bbp_tab_index();
            ?>
" class="button submit user-submit"><?php 
            _e('Log In', 'bbpress');
            ?>
</button>

						<?php 
            bbp_user_login_fields();
            ?>

					</div>

					<?php 
            if (!empty($register) || !empty($lostpass)) {
                ?>

						<div class="bbp-login-links">
//.........这里部分代码省略.........
开发者ID:rmccue,项目名称:bbPress,代码行数:101,代码来源:bbp-core-widgets.php

示例5: widget

    /**
     * Displays the output, the login form
     * 
     * @param mixed $args Arguments
     * @param array $instance Instance
     * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
     * @uses get_template_part() To get the login/logged in form
     */
    public function widget($args = array(), $instance = array())
    {
        // Get widget settings
        $settings = $this->parse_settings($instance);
        // Typical WordPress filter
        $settings['title'] = apply_filters('widget_title', $settings['title'], $instance, $this->id_base);
        // bbPress filters
        $settings['title'] = apply_filters('bbp_login_widget_title', $settings['title'], $instance, $this->id_base);
        $settings['register'] = apply_filters('bbp_login_widget_register', $settings['register'], $instance, $this->id_base);
        $settings['lostpass'] = apply_filters('bbp_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base);
        echo $args['before_widget'];
        if (!empty($settings['title'])) {
            echo $args['before_title'] . $settings['title'] . $args['after_title'];
        }
        if (!is_user_logged_in()) {
            ?>

			<form method="post" action="<?php 
            bbp_wp_login_action(array('context' => 'login_post'));
            ?>
" class="bbp-login-form widget-login">
				<fieldset>
				
					<legend><?php 
            _e('Log In', 'bbpress');
            ?>
</legend>

					<div class="bbp-username input-group">
						<i class="fa fa-user"></i>
						<input type="text" name="log" value="<?php 
            bbp_sanitize_val('user_login', 'text');
            ?>
" size="20" id="user_login" tabindex="<?php 
            bbp_tab_index();
            ?>
" 
							placeholder="<?php 
            echo esc_attr_x('Your Username', 'bbPress', 'bunyad-widgets');
            ?>
" />
					</div>

					<div class="bbp-password input-group">
						<i class="fa fa-lock"></i>
						<input type="password" name="pwd" value="<?php 
            bbp_sanitize_val('user_pass', 'password');
            ?>
" size="20" id="user_pass" tabindex="<?php 
            bbp_tab_index();
            ?>
" 
							placeholder="<?php 
            echo esc_attr_x('Your Password', 'bbPress', 'bunyad-widgets');
            ?>
"/>
					</div>

					<div class="bbp-submit-wrapper">

						<?php 
            if (!empty($settings['lostpass'])) {
                ?>

								<a href="<?php 
                echo esc_url($settings['lostpass']);
                ?>
" title="<?php 
                esc_attr_e('Lost password?', 'bbpress');
                ?>
" class="bbp-lostpass-link lost-pass-modal"><?php 
                _e('Lost password?', 'bbpress');
                ?>
</a>

							<?php 
            }
            ?>

						<?php 
            do_action('login_form');
            ?>

						<button type="submit" name="user-submit" id="user-submit" tabindex="<?php 
            bbp_tab_index();
            ?>
" class="button submit user-submit"><?php 
            _e('Log In', 'bbpress');
            ?>
</button>

						<?php 
//.........这里部分代码省略.........
开发者ID:silverbux,项目名称:smartmag-magazine-wordpress,代码行数:101,代码来源:widget-bbp-login.php

示例6: widget

    /**
     * Displays the output, the login form
     *
     * @since 2.0.0 bbPress (r2827)
     *
     * @param array $args Arguments
     * @param array $instance Instance
     * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
     * @uses get_template_part() To get the login/logged in form
     */
    public function widget($args = array(), $instance = array())
    {
        // Get widget settings
        $settings = $this->parse_settings($instance);
        // Typical WordPress filter
        $settings['title'] = apply_filters('widget_title', $settings['title'], $instance, $this->id_base);
        // bbPress filters
        $settings['title'] = apply_filters('bbp_login_widget_title', $settings['title'], $instance, $this->id_base);
        $settings['register'] = apply_filters('bbp_login_widget_register', $settings['register'], $instance, $this->id_base);
        $settings['lostpass'] = apply_filters('bbp_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base);
        echo $args['before_widget'];
        if (!empty($settings['title'])) {
            echo $args['before_title'] . $settings['title'] . $args['after_title'];
        }
        if (!is_user_logged_in()) {
            ?>

			<form method="post" action="<?php 
            bbp_wp_login_action(array('context' => 'login_post'));
            ?>
" class="bbp-login-form">
				<fieldset>
					<legend><?php 
            _e('Log In', 'bbpress');
            ?>
</legend>

					<div class="bbp-username">
						<label for="user_login"><?php 
            _e('Username', 'bbpress');
            ?>
: </label>
						<input type="text" name="log" value="<?php 
            bbp_sanitize_val('user_login', 'text');
            ?>
" size="20" id="user_login" />
					</div>

					<div class="bbp-password">
						<label for="user_pass"><?php 
            _e('Password', 'bbpress');
            ?>
: </label>
						<input type="password" name="pwd" value="<?php 
            bbp_sanitize_val('user_pass', 'password');
            ?>
" size="20" id="user_pass" autocomplete="off" />
					</div>

					<div class="bbp-remember-me">
						<input type="checkbox" name="rememberme" value="forever" <?php 
            checked(bbp_get_sanitize_val('rememberme', 'checkbox'), true, true);
            ?>
 id="rememberme" />
						<label for="rememberme"><?php 
            _e('Remember Me', 'bbpress');
            ?>
</label>
					</div>

					<div class="bbp-submit-wrapper">

						<?php 
            do_action('login_form');
            ?>

						<button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php 
            _e('Log In', 'bbpress');
            ?>
</button>

						<?php 
            bbp_user_login_fields();
            ?>

					</div>

					<?php 
            if (!empty($settings['register']) || !empty($settings['lostpass'])) {
                ?>

						<div class="bbp-login-links">

							<?php 
                if (!empty($settings['register'])) {
                    ?>

								<a href="<?php 
                    echo esc_url($settings['register']);
                    ?>
//.........这里部分代码省略.........
开发者ID:CompositeUK,项目名称:clone.bbPress,代码行数:101,代码来源:widgets.php

示例7: widget

        /**
         * Displays the output, the login form
         *
         * @param mixed $args Arguments
         * @param array $instance Instance
         * @uses function_exists() to check if bbpress installed
         * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
         * @uses get_template_part() To get the login/logged in form
         */
        function widget($args, $instance)
        {
            if (!function_exists('bbp_logout_link')) {
                // no bbress detected then forum login widget is not required
                return false;
            }
            extract($args);
            $title = $instance['title'];
            $css_class_logout = $instance['css_class_logout'];
            $css_class_login = $this->get_css_class_login($instance);
            echo $before_widget;
            if (!empty($title)) {
                echo $before_title . $title . $after_title;
            }
            // get curretn url to redirect back
            $redirect_to = esc_url($_SERVER["REQUEST_URI"]);
            if (!is_user_logged_in()) {
                // get login url
                ob_start();
                bbp_wp_login_action(array('context' => 'login_post'));
                $login_url = ob_get_clean();
                echo '<div class="' . $css_class_login . '">
					<a href="' . $login_url . '?redirect_to=' . $redirect_to . '" rel="nofollow">' . __('Log in', 'bbpress') . '</a>
					- or - 
					<a href="' . $login_url . '?action=register" rel="nofollow">' . __('Register', 'bbpress') . '</a>
				</div>';
            } else {
                ?>
				<div class="bbp-logged-in<?php 
                echo ' ' . $css_class_logout;
                ?>
">
					<a href="<?php 
                bbp_user_profile_url(bbp_get_current_user_id());
                ?>
" class="submit user-submit"><?php 
                echo get_avatar(bbp_get_current_user_id(), '40');
                ?>
</a>
					<h4><?php 
                bbp_user_profile_link(bbp_get_current_user_id());
                ?>
</h4>
				<?php 
                bbp_logout_link($redirect_to);
                ?>
				</div>
					<?php 
            }
            echo $after_widget;
        }
开发者ID:USSLomaPrieta,项目名称:usslomaprieta.org,代码行数:60,代码来源:bbpress-wp-tweaks.php


注:本文中的bbp_wp_login_action函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。