本文整理汇总了PHP中wp_get_password_hint函数的典型用法代码示例。如果您正苦于以下问题:PHP wp_get_password_hint函数的具体用法?PHP wp_get_password_hint怎么用?PHP wp_get_password_hint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_get_password_hint函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _e
_e('Strength indicator');
?>
</div>
</div>
</div>
<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
echo wp_get_password_hint();
?>
</p>
<br class="clear" />
<?php
/**
* Fires following the 'Strength indicator' meter in the user password reset form.
*
* @since 3.9.0
*
* @param WP_User $user User object of the user whose password is being reset.
*/
do_action('resetpass_form', $user);
?>
<input type="hidden" name="rp_key" value="<?php
开发者ID:neruub,项目名称:shop_sda,代码行数:31,代码来源:wp-login.php
示例2: display_setup_form
/**
* Display installer setup form.
*
* @since 2.8.0
*/
function display_setup_form($error = null)
{
global $wpdb;
$sql = $wpdb->prepare("SHOW TABLES LIKE %s", $wpdb->esc_like($wpdb->users));
$user_table = $wpdb->get_var($sql) != null;
// Ensure that Blogs appear in search engines by default.
$blog_public = 1;
if (isset($_POST['weblog_title'])) {
$blog_public = isset($_POST['blog_public']);
}
$weblog_title = isset($_POST['weblog_title']) ? trim(wp_unslash($_POST['weblog_title'])) : '';
$user_name = isset($_POST['user_name']) ? trim(wp_unslash($_POST['user_name'])) : '';
$admin_email = isset($_POST['admin_email']) ? trim(wp_unslash($_POST['admin_email'])) : '';
if (!is_null($error)) {
?>
<p class="message"><?php
echo $error;
?>
</p>
<?php
}
?>
<form id="setup" method="post" action="install.php?step=2" novalidate="novalidate">
<table class="form-table">
<tr>
<th scope="row"><label for="weblog_title"><?php
_e('Site Title');
?>
</label></th>
<td><input name="weblog_title" type="text" id="weblog_title" size="25" value="<?php
echo esc_attr($weblog_title);
?>
" /></td>
</tr>
<tr>
<th scope="row"><label for="user_login"><?php
_e('Tên đăng nhập');
?>
</label></th>
<td>
<?php
if ($user_table) {
_e('User(s) already exists.');
echo '<input name="user_name" type="hidden" value="admin" />';
} else {
?>
<input name="user_name" type="text" id="user_login" size="25" value="<?php
echo esc_attr(sanitize_user($user_name, true));
?>
" />
<p><?php
_e('Usernames can have only alphanumeric characters, spaces, underscores, hyphens, periods, and the @ symbol.');
?>
</p>
<?php
}
?>
</td>
</tr>
<?php
if (!$user_table) {
?>
<tr>
<th scope="row">
<label for="pass1"><?php
_e('Password, twice');
?>
</label>
<p><?php
_e('A password will be automatically generated for you if you leave this blank.');
?>
</p>
</th>
<td>
<input name="admin_password" type="password" id="pass1" size="25" value="" />
<p><input name="admin_password2" type="password" id="pass2" size="25" value="" /></p>
<div id="pass-strength-result"><?php
_e('Strength indicator');
?>
</div>
<p><?php
echo wp_get_password_hint();
?>
</p>
</td>
</tr>
<?php
}
?>
<tr>
<th scope="row"><label for="admin_email"><?php
_e('Your E-mail');
?>
</label></th>
<td><input name="admin_email" type="email" id="admin_email" size="25" value="<?php
//.........这里部分代码省略.........
开发者ID:se7ven214,项目名称:Kungfuphp.local,代码行数:101,代码来源:install.php
示例3: display_user_page
//.........这里部分代码省略.........
<input type="text" name="sr-wp-plugin-umm-forward-address" id="sr-wp-plugin-umm-forward-address" class="regular-text" value="<?php
echo $currentUser['mailbox_forward_address'];
?>
"/><br />
<?php
_e("You may enter multiple email addresses by separating them with a comma", $this->pluginTextDomain);
?>
</fieldset>
</td>
</tr>
<tr id="password" class="sr-wp-plugin-umm-password-wrap">
<th><label for="sr-wp-plugin-umm-password"><?php
_e("Change Mailbox password", $this->pluginTextDomain);
?>
</label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround (otherwise Chrome disrespects autocomplete="off" on following field) -->
<input type="password" name="sr-wp-plugin-umm-password" id="sr-wp-plugin-umm-password" class="regular-text" size="16" value="" autocomplete="off" /><br />
<?php
/* To do: Javscript for password strength should reset to "Password strength" when field is emptied */
?>
<div id="pass-strength-result" style="display:block; clear:both;"><?php
_e("Password strength", $this->pluginTextDomain);
?>
</div><div style="display:block; margin: 13px 5px 5px 1px; padding: 3px 5px;"><?php
echo __("Random password proposal:", $this->pluginTextDomain) . " " . wp_generate_password(8, false);
?>
</div>
<p class="description" style="clear:both;"><?php
_e('If you would like to change the password type a new one. Otherwise leave this blank.');
?>
</p>
<p class="description indicator-hint"><?php
echo wp_get_password_hint();
?>
</p>
</td>
</tr>
</table>
<div class="submit">
<input type="submit" class="button button-primary" name="sr-wp-plugin-umm-update" value="<?php
_e('Update', 'sr-wp-plugin-umm');
?>
" />
</div>
</form>
<hr />
<h3><?php
_e("Configuration data for your email software", $this->pluginTextDomain);
?>
</h3>
<table>
<tr><th scope="row"><?php
_e("Username/Email", $this->pluginTextDomain);
?>
</th><td><?php
echo $mailbox;
?>
</td></tr>
<tr><th scope="row"><?php
_e("Password", $this->pluginTextDomain);
?>
</th><td><?php
echo empty($this->passtmp) ? __("Please change above, if unknown.", $this->pluginTextDomain) : $this->passtmp;
?>
</td></tr>
开发者ID:sruf,项目名称:sr-wp-plugin-umm,代码行数:67,代码来源:sr-wp-plugin-umm.php
示例4: reset_form
/**
* Returns HTML partial that contains password-reset form.
* Based on WordPress core code from wp-login.php
*
* @since 1.0.0
*
* @return string
*/
private function reset_form()
{
static $Reset_Result = null;
if (null === $Reset_Result) {
lib3()->array->equip_get('login', 'key');
lib3()->array->equip_post('pass1', 'pass2');
$rp_login = wp_unslash($_GET['login']);
$rp_key = wp_unslash($_GET['key']);
$err_msg = new WP_Error();
$fatal_error = false;
lib3()->array->strip_slashes($_POST, 'pass1', 'pass2');
$pass1 = $_POST['pass1'];
$pass2 = $_POST['pass2'];
// Get the user object and validate the key.
if ($rp_login && $rp_key) {
$user = check_password_reset_key($rp_key, $rp_login);
} else {
$user = false;
}
if (!$user || is_wp_error($user)) {
// If the user was not found then show an error message.
if ($user && 'expired_key' == $user->get_error_code()) {
$fatal_error = true;
$err_msg->add('password_expired_key', __('Sorry, this reset-key is not valid anymore. Please request a new reset email and try again.', 'membership2'));
} else {
$fatal_error = true;
$err_msg->add('password_invalid_key', __('Sorry, we did not find a valid reset-key. Please request a new reset email and try again.', 'membership2'));
}
} else {
// If the user provided a new password, then check it now.
if ($pass1 && $pass1 != $pass2) {
$pass1 = false;
$err_msg->add('password_reset_mismatch', __('The passwords do not match, try again.', 'membership2'));
}
}
if ($fatal_error && count($err_msg->errors)) {
$url = esc_url_raw(add_query_arg(array('show' => 'lostpass'), remove_query_arg(array('action', 'key', 'login'))));
$Reset_Result = sprintf('[ms-note type="warning"]%s[/ms-note]<a href="%s">%s</a>', $err_msg->get_error_message(), $url, __('Request a new password-reset key', 'membership2'));
} elseif ($pass1) {
// This action is documented in wp-login.php
do_action('validate_password_reset', $err_msg, $user);
reset_password($user, $_POST['pass1']);
// All done! Show success message and link to login form
$url = esc_url_raw(remove_query_arg(array('action', 'key', 'login')));
$Reset_Result = sprintf('[ms-note type="info"]%s[/ms-note]<a href="%s">%s</a>', __('Your Password has been reset.', 'membership2'), $url, __('Login with your new password', 'membership2'));
} else {
// This action is documented in wp-login.php
do_action('validate_password_reset', $err_msg, $user);
wp_enqueue_script('utils');
wp_enqueue_script('user-profile');
ob_start();
if (count($err_msg->errors)) {
printf('[ms-note type="warning"]%s[/ms-note]', implode('<br>', $err_msg->get_error_messages()));
}
?>
<form name="resetpassform" id="resetpassform"
action="" method="post" autocomplete="off" class="ms-form">
<input type="hidden" id="user_login"
value="<?php
echo esc_attr($rp_login);
?>
" autocomplete="off"/>
<p class="user-pass1-wrap">
<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
echo wp_get_password_hint();
?>
//.........这里部分代码省略.........
开发者ID:jayjo,项目名称:topdraw,代码行数:101,代码来源:class-ms-view-shortcode-login.php
示例5: _e
<tr id="password" class="user-pass1-wrap">
<th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
<td>
<input class="hidden" value=" " /><!-- #24364 workaround -->
<input type="password" name="pass1" id="pass1" class="regular-text" size="16" value="" autocomplete="off" />
<p class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.' ); ?></p>
</td>
</tr>
<tr class="user-pass2-wrap">
<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
<td>
<input name="pass2" type="password" id="pass2" class="regular-text" size="16" value="" autocomplete="off" />
<p class="description"><?php _e( 'Type your new password again.' ); ?></p>
<br />
<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
</td>
</tr>
<?php endif; ?>
<?php
if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?>
<tr class="user-sessions-wrap hide-if-no-js">
<th> </th>
<td aria-live="assertive">
<div class="destroy-sessions"><button type="button" disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div>
<p class="description">
<?php _e( 'You are only logged in at this location.' ); ?>
</p>
</td>
</tr>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:user-edit.php
注:本文中的wp_get_password_hint函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论