WordPress开发者和主题制作者的搜索引擎



update_meta ›

Since1.2.0
已弃用n/a
update_meta ( $meta_id, $meta_key, $meta_value )
参数: (3)
  • (int) $meta_id
    Required: Yes
  • (string) $meta_key Expect Slashed
    Required: Yes
  • (string) $meta_value Expect Slashed
    Required: Yes
返回:
  • (bool)
定义在:
文档:

Update post meta data by meta ID.



源码

function update_meta( $meta_id, $meta_key, $meta_value ) {
	$meta_key   = wp_unslash( $meta_key );
	$meta_value = wp_unslash( $meta_value );

	return update_metadata_by_mid( 'post', $meta_id, $meta_value, $meta_key );
}