2020-05-02 / 3558阅 / 悠然
为给定的博客ID添加新选项。
您不需要序列化值。如果该值需要序列化,则在将其插入数据库之前将对其进行序列化。请记住,资源不能序列化或作为选项添加。
您可以创建不带值的选项,然后在以后更新值。现有选项将不会更新,并且会执行检查以确保您没有添加受保护的WordPress选项。注意不要将选项命名为>
(int)
(Required)
A blog ID. Can be null to refer to the current blog.
(string)
(Required)
Name of option to add. Expected to not be SQL-escaped.
(mixed)
(Optional)
Option value, can be anything. Expected to not be SQL-escaped.
(bool) False if option was not added and true if option was added.