From 08ffc54083fe353bed4daf244a449a5dcf33ab9a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 13 Jan 2025 22:22:25 +0000 Subject: [PATCH] Docs: Correct `@return` value for `update_attached_file()`. Follow-up to [4612], [21967], [24490], [47611], [48214]. Props arnoutblueshell, karthickmurugan, SergeyBiryukov. Fixes #62803. Built from https://develop.svn.wordpress.org/trunk@59602 git-svn-id: http://core.svn.wordpress.org/trunk@58987 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 8cb7287289..98b9092f16 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -852,13 +852,15 @@ function get_attached_file( $attachment_id, $unfiltered = false ) { * Updates attachment file path based on attachment ID. * * Used to update the file path of the attachment, which uses post meta name - * '_wp_attached_file' to store the path of the attachment. + * `_wp_attached_file` to store the path of the attachment. * * @since 2.1.0 * * @param int $attachment_id Attachment ID. * @param string $file File path for the attachment. - * @return bool True on success, false on failure. + * @return int|bool Meta ID if the `_wp_attached_file` key didn't exist for the attachment. + * True on successful update, false on failure or if the `$file` value passed + * to the function is the same as the one that is already in the database. */ function update_attached_file( $attachment_id, $file ) { if ( ! get_post( $attachment_id ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index d3354d2de2..c5a48a1581 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-alpha-59600'; +$wp_version = '6.8-alpha-59602'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.