delete_blog_option()
delete_blog_option( int $id, string $option )
按名称删除给定博客id的选项。防止删除受保护的WordPress选项。
Removes option by name for a given blog id. Prevents removal of protected WordPress options.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$id | (int) | 必需 | 博客ID。可以为空以引用当前博客。 |
$option | (string) | 必需 | 要删除的选项的名称。应为非SQL转义。 |
返回(Return)
(bool)如果成功删除选项,则为True。失败时为False。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
MU (3.0.0) | wp-includes/ms-blogs.php:421 | 0 | 4 |
delete_blog_option() 为WP2原创文章,链接:https://www.wp2.cn/functions/delete_blog_option/