wpmu_signup_blog()提示用户注册成功(多站点)

目录

描述

Record site signup information for future activation.

wpmu_signup_blog() 描述

用法

<?php wpmu_signup_blog($domain$path$title$user$user_email$meta ); ?>

wpmu_signup_blog() 用法

参数

$domain

(string) (必填) The requested domain

默认值: None

$path

(string) (必填) The requested path

默认值: None

$title

(string) (必填) The requested site title

默认值: None

$user

(string) (必填) The user's requested login name

默认值: None

$user_email

(string) (必填) The user's email address

默认值: None

$meta

(array) (必填) By default, contains the requested privacy setting and lang_id.

默认值: None

wpmu_signup_blog() 参数

示例

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

wpmu_signup_blog() 示例

历史

添加于 版本: MU

wpmu_signup_blog() 历史

源文件

wpmu_signup_blog() 函数的代码位于 wp-includes/ms-functions.php

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */
/**
 * Record site signup information for future activation.
 *
 * @since MU
 *
 * @global wpdb $wpdb
 *
 * @param string $domain     The requested domain.
 * @param string $path       The requested path.
 * @param string $title      The requested site title.
 * @param string $user       The user's requested login name.
 * @param string $user_email The user's email address.
 * @param array  $meta       By default, contains the requested privacy setting and lang_id.
 */
function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() )  {
	global $wpdb;

	$key = substr( md5( time() . rand() . $domain ), 0, 16 );
	$meta = serialize($meta);

	$wpdb->insert( $wpdb->signups, array(
		'domain' => $domain,
		'path' => $path,
		'title' => $title,
		'user_login' => $user,
		'user_email' => $user_email,
		'registered' => current_time('mysql', true),
		'activation_key' => $key,
		'meta' => $meta
	) );

	wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta);
}

wpmu_signup_blog() 源文件

相关