Correct return values for update_metadata() and related functions.

fixes #21864.
Built from https://develop.svn.wordpress.org/trunk@27191


git-svn-id: http://core.svn.wordpress.org/trunk@27050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2014-02-18 21:36:14 +00:00
parent d7db798635
commit ab8847316c
4 changed files with 5 additions and 5 deletions

View File

@@ -1789,7 +1789,7 @@ function get_post_meta($post_id, $key = '', $single = false) {
* @param string $meta_key Metadata key.
* @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
* @param mixed $prev_value Optional. Previous value to check before removing.
* @return bool True on success, false on failure.
* @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
*/
function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') {
// make sure meta is added to the post, not a revision