show_user_form
函数
show_user_form ( $user_name = '', $user_email = '', $errors = '' )
- 参数
-
-
(string)
$user_name
The entered username.- Required: 否
- Default: (empty)
-
(string)
$user_email
The entered email address.- Required: 否
- Default: (empty)
-
(WP_Error|string)
$errors
A WP_Error object containing existing errors. Defaults to empty string.- Required: 否
- Default: (empty)
-
(string)
- 定义位置
-
-
wp-signup.php
, line 265
-
wp-signup.php
- 引入
- –
- 弃用
- –
Displays the fields for the new user account registration form.
function show_user_form( $user_name = '', $user_email = '', $errors = '' ) {
if ( ! is_wp_error( $errors ) ) {
$errors = new WP_Error();
}
// Username.
echo '';
$errmsg_username = $errors->get_error_message( 'user_name' );
$errmsg_username_aria = '';
if ( $errmsg_username ) {
$errmsg_username_aria = 'wp-signup-username-error ';
echo '' . $errmsg_username . '
';
}
?>
' . __( 'Email Address:' ) . '';
$errmsg_email = $errors->get_error_message( 'user_email' );
$errmsg_email_aria = '';
if ( $errmsg_email ) {
$errmsg_email_aria = 'wp-signup-email-error ';
echo '' . $errmsg_email . '
';
}
?>
get_error_message( 'generic' );
if ( $errmsg_generic ) {
echo '' . $errmsg_generic . '
';
}
/**
* Fires at the end of the new user account registration form.
*
* @since 3.0.0
*
* @param WP_Error $errors A WP_Error object containing 'user_name' or 'user_email' errors.
*/
do_action( 'signup_extra_fields', $errors );
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。


