2020-05-02 / 3117阅 / 悠然
注册一个元密钥。
建议为对象类型和对象子类型的特定组合注册元密钥。如果忽略传递对象子类型,则将为整个对象类型注册元密钥,但是如果存在相同对象类型和子类型的同名更具体的元密钥,则可以部分覆盖元密钥。
如果对象类型不支持任何子类型,例如用户或注释,则通常应在不传递子类型的情况下调用此函数。
(string)
(Required)
Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user', or any other object type with an associated meta table.
(string)
(Required)
Meta key to register.
(array)
(Required)
Data used to describe the meta key when registered.
Default value: null
(bool) True if the meta key was successfully registered in the global array, false if not. Registering a meta key with distinct sanitize and auth callbacks will fire those callbacks, but will not add to the global registry.