show_blog_form
函数
show_blog_form ( $blogname = '', $blog_title = '', $errors = '' )
- 参数
-
-
(string)
$blogname
The new site name.- Required: 否
- Default: (empty)
-
(string)
$blog_title
The new site title.- 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 110
-
wp-signup.php
- 引入
- –
- 弃用
- –
Generates and displays the Sign-up and Create Site forms.
function show_blog_form( $blogname = '', $blog_title = '', $errors = '' ) {
if ( ! is_wp_error( $errors ) ) {
$errors = new WP_Error();
}
$current_network = get_network();
// Blog name.
if ( ! is_subdomain_install() ) {
echo '';
} else {
echo '';
}
$errmsg_blogname = $errors->get_error_message( 'blogname' );
$errmsg_blogname_aria = '';
if ( $errmsg_blogname ) {
$errmsg_blogname_aria = 'wp-signup-blogname-error ';
echo '' . $errmsg_blogname . '
';
}
if ( ! is_subdomain_install() ) {
echo '
' . $current_network->domain . $current_network->path . '';
} else {
$site_domain = preg_replace( '|^www.|', '', $current_network->domain );
echo '
.' . esc_html( $site_domain ) . '
';
}
if ( ! is_user_logged_in() ) {
if ( ! is_subdomain_install() ) {
$site = $current_network->domain . $current_network->path . __( 'sitename' );
} else {
$site = __( 'domain' ) . '.' . $site_domain . $current_network->path;
}
printf(
'(%s) %s
',
/* translators: %s: Site address. */
sprintf( __( 'Your address will be %s.' ), $site ),
__( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' )
);
}
// Site Title.
?>
get_error_message( 'blog_title' );
$errmsg_blog_title_aria = '';
if ( $errmsg_blog_title ) {
$errmsg_blog_title_aria = ' aria-describedby="wp-signup-blog-title-error"';
echo '' . $errmsg_blog_title . '
';
}
echo '';
?>
'WPLANG',
'id' => 'site-language',
'selected' => $lang,
'languages' => $languages,
'show_available_translations' => false,
)
);
?>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。


