signup_another_blog
函数
signup_another_blog ( $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 332
-
wp-signup.php
- 引入
- –
- 弃用
- –
Shows a form for returning users to sign up for another site.
function signup_another_blog( $blogname = '', $blog_title = '', $errors = '' ) { $current_user = wp_get_current_user(); if ( ! is_wp_error( $errors ) ) { $errors = new WP_Error(); } $signup_defaults = array( 'blogname' => $blogname, 'blog_title' => $blog_title, 'errors' => $errors, ); /** * Filters the default site sign-up variables. * * @since 3.0.0 * * @param array $signup_defaults { * An array of default site sign-up variables. * * @type string $blogname The site blogname. * @type string $blog_title The site title. * @type WP_Error $errors A WP_Error object possibly containing 'blogname' or 'blog_title' errors. * } */ $filtered_results = apply_filters( 'signup_another_blog_init', $signup_defaults ); $blogname = $filtered_results['blogname']; $blog_title = $filtered_results['blog_title']; $errors = $filtered_results['errors']; /* translators: %s: Network title. */ echo '' . sprintf( __( 'Get another %s site in seconds' ), get_network()->site_name ) . '
'; if ( $errors->has_errors() ) { echo '' . __( 'There was a problem, please correct the form below and try again.' ) . '
'; } ?>add another site to your account. There is no limit to the number of sites you can have, so create to your heart’s content, but write responsibly!' ), $current_user->display_name ); ?>
ID ); if ( ! empty( $blogs ) ) { ?>
- userblog_id );
- ‘ . $home_url . ‘
echo ‘
‘;
}
?>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。