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)
定义位置
  • wp-signup.php
    , line 332
引入
弃用

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 );
    echo ‘
  • ‘ . $home_url . ‘
  • ‘;
    }
    ?>