Updates post meta data by meta ID.
Parameters
$meta_id
intrequired- Meta ID.
$meta_key
stringrequired- Meta key. Expect slashed.
$meta_value
stringrequired- Meta value. Expect slashed.
Source
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 );
}
Changelog
Version | Description |
---|---|
1.2.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.