diff --git a/src/wp-admin/includes/image.php b/src/wp-admin/includes/image.php
index 951f51fc60..d26b7d37fd 100644
|
a
|
b
|
function file_is_displayable_image( $path ) { |
| 728 | 728 | * |
| 729 | 729 | * @since 2.9.0 |
| 730 | 730 | * |
| 731 | | * @param string $attachment_id Attachment ID. |
| | 731 | * @param int $attachment_id Attachment ID. |
| 732 | 732 | * @param string $mime_type Image mime type. |
| 733 | | * @param string $size Optional. Image size, defaults to 'full'. |
| | 733 | * @param string|array $size Optional. Image size, defaults to 'full'. |
| 734 | 734 | * @return resource|false The resulting image resource on success, false on failure. |
| 735 | 735 | */ |
| 736 | 736 | function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { |
| … |
… |
function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { |
| 760 | 760 | * @since 2.9.0 |
| 761 | 761 | * |
| 762 | 762 | * @param resource $image Current image. |
| 763 | | * @param string $attachment_id Attachment ID. |
| 764 | | * @param string $size Image size. |
| | 763 | * @param int $attachment_id Attachment ID. |
| | 764 | * @param string|array $size Image size. |
| 765 | 765 | */ |
| 766 | 766 | $image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size ); |
| 767 | 767 | if ( function_exists( 'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) { |
| … |
… |
function load_image_to_edit( $attachment_id, $mime_type, $size = 'full' ) { |
| 781 | 781 | * @since 3.4.0 |
| 782 | 782 | * @access private |
| 783 | 783 | * |
| 784 | | * @param string $attachment_id Attachment ID. |
| 785 | | * @param string $size Optional. Image size, defaults to 'full'. |
| 786 | | * @return string|false File path or url on success, false on failure. |
| | 784 | * @param int $attachment_id Attachment ID. |
| | 785 | * @param string|array $size Optional. Image size, defaults to 'full'. |
| | 786 | * @return string|bool File path or url on success, false on failure. |
| 787 | 787 | */ |
| 788 | 788 | function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { |
| 789 | 789 | $filepath = get_attached_file( $attachment_id ); |
| … |
… |
function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { |
| 803 | 803 | * @since 3.1.0 |
| 804 | 804 | * |
| 805 | 805 | * @param string $path Path to the current image. |
| 806 | | * @param string $attachment_id Attachment ID. |
| 807 | | * @param string $size Size of the image. |
| | 806 | * @param int $attachment_id Attachment ID. |
| | 807 | * @param string|array $size Size of the image. |
| 808 | 808 | */ |
| 809 | 809 | $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); |
| 810 | 810 | } |
| … |
… |
function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { |
| 818 | 818 | * @since 3.1.0 |
| 819 | 819 | * |
| 820 | 820 | * @param string $image_url Current image URL. |
| 821 | | * @param string $attachment_id Attachment ID. |
| 822 | | * @param string $size Size of the image. |
| | 821 | * @param int $attachment_id Attachment ID. |
| | 822 | * @param string|array $size Size of the image. |
| 823 | 823 | */ |
| 824 | 824 | $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); |
| 825 | 825 | } |
| … |
… |
function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { |
| 830 | 830 | * @since 2.9.0 |
| 831 | 831 | * |
| 832 | 832 | * @param string|bool $filepath File path or URL to current image, or false. |
| 833 | | * @param string $attachment_id Attachment ID. |
| 834 | | * @param string $size Size of the image. |
| | 833 | * @param int $attachment_id Attachment ID. |
| | 834 | * @param string|array $size Size of the image. |
| 835 | 835 | */ |
| 836 | 836 | return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size ); |
| 837 | 837 | } |
diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
index 30fadcbeb4..d2fff51f7c 100644
|
a
|
b
|
function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image |
| 1332 | 1332 | absint( $image[2] ), |
| 1333 | 1333 | ); |
| 1334 | 1334 | |
| | 1335 | /** |
| | 1336 | * Filters the current image sizes. |
| | 1337 | * |
| | 1338 | * @since 5.2 |
| | 1339 | * |
| | 1340 | * @param array $size_array Image height and width. |
| | 1341 | * @param string $image_src Image src. |
| | 1342 | * @param array|bool $image_meta Attachment meta field. False on failure.. |
| | 1343 | * @param int $attachment_id Attachment ID. |
| | 1344 | */ |
| 1335 | 1345 | return wp_calculate_image_sizes( $size_array, $image_src, $image_meta, $attachment_id ); |
| 1336 | 1346 | } |
| 1337 | 1347 | |
| … |
… |
function next_image_link( $size = 'thumbnail', $text = false ) { |
| 2913 | 2923 | * |
| 2914 | 2924 | * @since 2.5.0 |
| 2915 | 2925 | * |
| 2916 | | * @param bool $prev Optional. Whether to display the next (false) or previous (true) link. Default true. |
| 2917 | | * @param string|array $size Optional. Image size. Accepts any valid image size, or an array of width and height |
| 2918 | | * values in pixels (in that order). Default 'thumbnail'. |
| 2919 | | * @param bool $text Optional. Link text. Default false. |
| | 2926 | * @param bool $prev Optional. Whether to display the next (false) or previous (true) link. Default true. |
| | 2927 | * @param string|array $size Optional. Image size. Accepts any valid image size, or an array of width and |
| | 2928 | * height values in pixels (in that order). Default 'thumbnail'. |
| | 2929 | * @param bool $text Optional. Link text. Default false. |
| 2920 | 2930 | */ |
| 2921 | 2931 | function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) { |
| 2922 | 2932 | $post = get_post(); |
| … |
… |
function adjacent_image_link( $prev = true, $size = 'thumbnail', $text = false ) |
| 2963 | 2973 | * |
| 2964 | 2974 | * @param string $output Adjacent image HTML markup. |
| 2965 | 2975 | * @param int $attachment_id Attachment ID |
| 2966 | | * @param string $size Image size. |
| | 2976 | * @param string|array $size Image size. |
| 2967 | 2977 | * @param string $text Link text. |
| 2968 | 2978 | */ |
| 2969 | 2979 | echo apply_filters( "{$adjacent}_image_link", $output, $attachment_id, $size, $text ); |
diff --git a/src/wp-includes/post-thumbnail-template.php b/src/wp-includes/post-thumbnail-template.php
index 3293a98d77..09ac59d42c 100644
|
a
|
b
|
function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = |
| 159 | 159 | * @since 2.9.0 |
| 160 | 160 | * |
| 161 | 161 | * @param int $post_id The post ID. |
| 162 | | * @param string $post_thumbnail_id The post thumbnail ID. |
| | 162 | * @param int $post_thumbnail_id The post thumbnail ID. |
| 163 | 163 | * @param string|array $size The post thumbnail size. Image size or array of width |
| 164 | 164 | * and height values (in that order). Default 'post-thumbnail'. |
| 165 | 165 | */ |
| … |
… |
function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = |
| 175 | 175 | * @since 2.9.0 |
| 176 | 176 | * |
| 177 | 177 | * @param int $post_id The post ID. |
| 178 | | * @param string $post_thumbnail_id The post thumbnail ID. |
| | 178 | * @param int $post_thumbnail_id The post thumbnail ID. |
| 179 | 179 | * @param string|array $size The post thumbnail size. Image size or array of width |
| 180 | 180 | * and height values (in that order). Default 'post-thumbnail'. |
| 181 | 181 | */ |
| … |
… |
function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = |
| 191 | 191 | * |
| 192 | 192 | * @param string $html The post thumbnail HTML. |
| 193 | 193 | * @param int $post_id The post ID. |
| 194 | | * @param string $post_thumbnail_id The post thumbnail ID. |
| | 194 | * @param int $post_thumbnail_id The post thumbnail ID. |
| 195 | 195 | * @param string|array $size The post thumbnail size. Image size or array of width and height |
| 196 | 196 | * values (in that order). Default 'post-thumbnail'. |
| 197 | 197 | * @param string $attr Query string of attributes. |