From ab25da99a0c0227564b859a6e367c1e03d3279af Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 20 Sep 2020 14:03:17 +0000 Subject: [PATCH] Media: Correct some types for attachment ID parameters passed to functions and filters. See #47364, #50768 git-svn-id: https://develop.svn.wordpress.org/trunk@49017 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/image.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php index e719b63428..d0e714f573 100644 --- a/src/wp-admin/includes/image.php +++ b/src/wp-admin/includes/image.php @@ -917,7 +917,7 @@ function file_is_displayable_image( $path ) { * * @since 2.9.0 * - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $mime_type Image mime type. * @param string $size Optional. Image size. Default 'full'. * @return resource|GdImage|false The resulting image resource or GdImage instance on success, @@ -951,7 +951,7 @@ function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { * @since 2.9.0 * * @param resource|GdImage $image Current image. - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $size Image size. */ $image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size ); @@ -974,7 +974,7 @@ function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { * @since 3.4.0 * @access private * - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $size Optional. Image size. Default 'full'. * @return string|false File path or url on success, false on failure. */ @@ -996,7 +996,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { * @since 3.1.0 * * @param string $path Path to the current image. - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $size Size of the image. */ $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); @@ -1011,7 +1011,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { * @since 3.1.0 * * @param string $image_url Current image URL. - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $size Size of the image. */ $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); @@ -1023,7 +1023,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { * @since 2.9.0 * * @param string|bool $filepath File path or URL to current image, or false. - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @param string $size Size of the image. */ return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size ); @@ -1035,7 +1035,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { * @since 3.4.0 * @access private * - * @param string $attachment_id Attachment ID. + * @param int $attachment_id Attachment ID. * @return string|false New file path on success, false on failure. */ function _copy_image_file( $attachment_id ) {