wpmu_signup_blog
函数
wpmu_signup_blog ( $domain, $path, $title, $user, $user_email, $meta = array() )
- 参数
-
-
(string)
$domain
The requested domain.- Required: 是
-
(string)
$path
The requested path.- Required: 是
-
(string)
$title
The requested site title.- Required: 是
-
(string)
$user
The user’s requested login name.- Required: 是
-
(string)
$user_email
The user’s email address.- Required: 是
-
(array)
$meta
Optional. Signup meta data. By default, contains the requested privacy setting and lang_id.- Required: 否
- Default: array()
-
(string)
- 定义位置
-
-
wp-includes/ms-functions.php
, line 780
-
wp-includes/ms-functions.php
- 引入
- –
- 弃用
- –
Records site signup information for future activation.
function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) { global $wpdb; $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 ); /** * Filters the metadata for a site signup. * * The metadata will be serialized prior to storing it in the database. * * @since 4.8.0 * * @param array $meta Signup meta data. Default empty array. * @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 string $key The user's activation key. */ $meta = apply_filters( 'signup_site_meta', $meta, $domain, $path, $title, $user, $user_email, $key ); $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' => serialize( $meta ), ) ); /** * Fires after site signup information has been written to the database. * * @since 4.4.0 * * @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 string $key The user's activation key. * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。