Make WordPress Core

Ticket #51780: 51780.filter.patch

File 51780.filter.patch, 1.8 KB (added by joedolson, 13 months ago)

Passes $size to filter

  • src/wp-includes/post.php

     
    754754         * Filters the attached file based on the given ID.
    755755         *
    756756         * @since 2.1.0
     757         * @since 6.2.0 The `$size` parameter was added.
    757758         *
    758759         * @param string|false $file          The file path to where the attached file should be, false otherwise.
    759760         * @param int          $attachment_id Attachment ID.
     761         * @param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array
     762         *                                    of width and height values in pixels (in that order). Default empty string.
    760763         */
    761         return apply_filters( 'get_attached_file', $file, $attachment_id );
     764        return apply_filters( 'get_attached_file', $file, $attachment_id, $size );
    762765}
    763766
    764767/**