• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bbp_sanitize_val函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: bbp_sanitize_val

			<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'));
?>
 id="rememberme" tabindex="<?php 
bbp_tab_index();
?>
" />
开发者ID:hscale,项目名称:webento,代码行数:31,代码来源:form-user-login.php


示例2: bbp_sanitize_val

			<input type="text" name="user_login" value="<?php 
bbp_sanitize_val('user_login');
?>
" size="20" id="user_login" tabindex="<?php 
bbp_tab_index();
?>
" />
		</div>

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

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

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

			<button type="submit" tabindex="<?php 
bbp_tab_index();
开发者ID:roycocup,项目名称:enclothed,代码行数:31,代码来源:form-user-register.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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bbp_search_url函数代码示例发布时间:2022-05-24
下一篇:
PHP bbp_reset_query_name函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap