Uses
Uses | Description |
---|---|
wp-includes/formatting.php: wp_unslash() | Remove slashes from a string or array of strings. |
wp-includes/meta.php: update_metadata_by_mid() | Updates metadata by meta ID. |
Update post meta data by meta ID.
(int) (Required)
(string) (Required) Expect Slashed
(string) (Required) Expect Slashed
(bool)
File: wp-admin/includes/post.php
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 ); }
Version | Description |
---|---|
1.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_meta