Skip to content

Commit 1f9d279

Browse files
committed
Media: Fix the documented return type of the wp_update_attachment_metadata() function.
Props justlevine See #63268 git-svn-id: https://develop.svn.wordpress.org/trunk@60300 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c86d940 commit 1f9d279

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-includes/post.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6877,7 +6877,9 @@ function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
68776877
*
68786878
* @param int $attachment_id Attachment post ID.
68796879
* @param array $data Attachment meta data.
6880-
* @return int|false False if $post is invalid.
6880+
* @return int|bool Whether the metadata was successfully updated.
6881+
* True on success, the Meta ID if the key didn't exist.
6882+
* False if $post is invalid, on failure, or if $data is the same as the existing metadata.
68816883
*/
68826884
function wp_update_attachment_metadata( $attachment_id, $data ) {
68836885
$attachment_id = (int) $attachment_id;

0 commit comments

Comments
 (0)