首页 WordPress函数大全 insert_blog()

insert_blog()

2020-05-02 / 2254阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

Warning: This function has been deprecated. Use wp_insert_site() instead.

insert_blog( string $domain, string $path, int $site_id )

Store basic site info in the blogs table.

描述

This function creates a row in the wp_blogs table and returns the new blog’s ID. It is the first step in creating a new blog.

See also See also

  • wp_insert_site()

Top ↑

参数

$domain

(string)
(Required)
The domain of the new site.

$path

(string)
(Required)
The path of the new site.

$site_id

(int)
(Required)
Unless you're running a multi-network install, be sure to set this value to 1.

返回

(int|false) The ID of the new row

大家谈论
    我的见解