为帖子注册一个元密钥。
register_post_meta(string $post_type,string $meta_key,array $args)
参数(Parameters)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| $post_type | (string) | 必需 | 要为其注册元密钥的Post类型。传递一个空字符串以在所有现有post类型中注册元键。 |
| $meta_key | (string) | 必需 | 要注册的元密钥。 |
| $args | (array) | 必需 | 用于在注册时描述元密钥的数据。有关受支持参数的列表,请参见register_meta()。 |
返回(Return)
(bool)如果元密钥注册成功,则为True;否则为false。
| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 4.9.8 | wp-includes/post.php:2177 | 0 | 1 function |





















