Make WordPress Core

Changeset 59602


Ignore:
Timestamp:
01/13/2025 10:20:03 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct @return value for update_attached_file().

Follow-up to [4612], [21967], [24490], [47611], [48214].

Props arnoutblueshell, karthickmurugan, SergeyBiryukov.
Fixes #62803.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59599 r59602  
    853853 *
    854854 * Used to update the file path of the attachment, which uses post meta name
    855  * '_wp_attached_file' to store the path of the attachment.
     855 * `_wp_attached_file` to store the path of the attachment.
    856856 *
    857857 * @since 2.1.0
     
    859859 * @param int    $attachment_id Attachment ID.
    860860 * @param string $file          File path for the attachment.
    861  * @return bool True on success, false on failure.
     861 * @return int|bool Meta ID if the `_wp_attached_file` key didn't exist for the attachment.
     862 *                  True on successful update, false on failure or if the `$file` value passed
     863 *                  to the function is the same as the one that is already in the database.
    862864 */
    863865function update_attached_file( $attachment_id, $file ) {
Note: See TracChangeset for help on using the changeset viewer.