get_attached_file

get_attached_file

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('get_attached_file') is found 1 times:

  • /wp-includes/post.php line 848
    844
    845
    846
    847
    848
    849
    850
    851
    852
    853
    854
         *
         * @param string|false $file          The file path to where the attached file should be, false otherwise.
         * @param int          $attachment_id Attachment ID.
         */
        return apply_filters( 'get_attached_file', $file, $attachment_id );
    }
     
    /**
     * Updates attachment file path based on attachment ID.
     *
     * Used to update the file path of the attachment, which uses post meta name

See this hook used in plugins: