Changeset 49021 for trunk/src/wp-includes/media.php
- Timestamp:
- 09/20/2020 04:21:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r49020 r49021 47 47 * @param int $width Width of the image in pixels. 48 48 * @param int $height Height of the image in pixels. 49 * @param string|array $size Optional. Image size. Accepts any valid image size, or an array 50 * of width and height values in pixels (in that order). 51 * Default 'medium'. 49 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 50 * of width and height values in pixels (in that order). Default 'medium'. 52 51 * @param string $context Optional. Could be 'display' (like in a theme) or 'edit' 53 52 * (like inserting into an editor). Default null. … … 126 125 * @type int $1 The maximum height in pixels. 127 126 * } 128 * @param string|array $size Size of what the result image should be. 129 * @param string $context The context the image is being resized for. 130 * Possible values are 'display' (like in a theme) 131 * or 'edit' (like inserting into an editor). 127 * @param string|int[] $size Requested image size. Can be any registered image size name, or 128 * an array of width and height values in pixels (in that order). 129 * @param string $context The context the image is being resized for. 130 * Possible values are 'display' (like in a theme) 131 * or 'edit' (like inserting into an editor). 132 132 */ 133 133 list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size, $context ); … … 178 178 * 179 179 * @param int $id Attachment ID for image. 180 * @param string|int[] $size Optional. Image size to scale to. Accepts any valid image size name, 181 * or an array of width and height values in pixels (in that order). 182 * Default 'medium'. 180 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 181 * of width and height values in pixels (in that order). Default 'medium'. 183 182 * @return array|false { 184 183 * Array of image data, or boolean false if no image is available. … … 203 202 * @param bool|array $downsize Whether to short-circuit the image downsize. 204 203 * @param int $id Attachment ID for image. 205 * @param array|string $size Requested size of image. Image size name, or array of width206 * an d height values (in that order).204 * @param string|int[] $size Requested image size. Can be any registered image size name, or 205 * an array of width and height values in pixels (in that order). 207 206 */ 208 207 $out = apply_filters( 'image_downsize', false, $id, $size ); … … 368 367 * @param string $title Image description for the title attribute. 369 368 * @param string $align Part of the class name for aligning the image. 370 * @param string|array $size Optional. Registered image size to retrieve a tag for. Accepts any 371 * valid image size, or an array of width and height values in pixels 372 * (in that order). Default 'medium'. 369 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 370 * width and height values in pixels (in that order). Default 'medium'. 373 371 * @return string HTML IMG element for given image attachment 374 372 */ … … 390 388 * @param int $id Attachment ID. 391 389 * @param string $align Part of the class name for aligning the image. 392 * @param string| array $size Size of image. Image size or array of width and height values (in that order).393 * Default 'medium'.390 * @param string|int[] $size Requested image size. Can be any registered image size name, or 391 * an array of width and height values in pixels (in that order). 394 392 */ 395 393 $class = apply_filters( 'get_image_tag_class', $class, $id, $align, $size ); … … 407 405 * @param string $title Image description for the title attribute. 408 406 * @param string $align Part of the class name for aligning the image. 409 * @param string| array $size Size of image. Image size or array of width and height values (in that order).410 * Default 'medium'.407 * @param string|int[] $size Requested image size. Can be any registered image size name, or 408 * an array of width and height values in pixels (in that order). 411 409 */ 412 410 return apply_filters( 'get_image_tag', $html, $id, $alt, $title, $align, $size ); … … 745 743 * 746 744 * @param int $post_id Attachment ID. 747 * @param array|string $size Optional. Image size. Accepts any valid image size, or an array 748 * of width and height values in pixels (in that order). 749 * Default 'thumbnail'. 745 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 746 * of width and height values in pixels (in that order). Default 'thumbnail'. 750 747 * @return array|false { 751 748 * Array of file relative path, width, and height on success. Additionally includes absolute … … 845 842 * @param array $data Array of file relative path, width, and height on success. May also include 846 843 * file absolute path and URL. 847 * @param int $post_id The post_id of the image attachment848 * @param string| array $size Registered image size or flat array of initially-requested height and width849 * dimensions (in that order).844 * @param int $post_id The ID of the image attachment. 845 * @param string|int[] $size Requested image size. Can be any registered image size name, or 846 * an array of width and height values in pixels (in that order). 850 847 */ 851 848 return apply_filters( 'image_get_intermediate_size', $data, $post_id, $size ); … … 939 936 * 940 937 * @param int $attachment_id Image attachment ID. 941 * @param string|int[] $size Optional. Image size. Accepts any valid image size name, or an array of width942 * and height values in pixels (in that order). Default 'thumbnail'.938 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 939 * width and height values in pixels (in that order). Default 'thumbnail'. 943 940 * @param bool $icon Optional. Whether the image should fall back to a mime type icon. Default false. 944 941 * @return array|false { … … 987 984 * } 988 985 * @param int $attachment_id Image attachment ID. 989 * @param string|int[] $size Requested size of image. Image size name, or array of width990 * an d height values (in that order).986 * @param string|int[] $size Requested image size. Can be any registered image size name, or 987 * an array of width and height values in pixels (in that order). 991 988 * @param bool $icon Whether the image should be treated as an icon. 992 989 */ … … 1007 1004 * 1008 1005 * @param int $attachment_id Image attachment ID. 1009 * @param string| array $size Optional. Image size. Accepts any valid image size, or an array of width1010 * and height values in pixels (in that order). Default 'thumbnail'.1006 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 1007 * of width and height values in pixels (in that order). Default 'thumbnail'. 1011 1008 * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. 1012 1009 * @param string|array $attr { … … 1087 1084 * See wp_get_attachment_image(). 1088 1085 * @param WP_Post $attachment Image attachment post. 1089 * @param string| array $size Requested size. Image size or array of width and height values1090 * (in that order). Default 'thumbnail'.1086 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1087 * an array of width and height values in pixels (in that order). 1091 1088 */ 1092 1089 $attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment, $size ); … … 1111 1108 * 1112 1109 * @param int $attachment_id Image attachment ID. 1113 * @param string| array $size Optional. Image size to retrieve. Accepts any valid image size, or an array1114 * ofwidth and height values in pixels (in that order). Default 'thumbnail'.1110 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 1111 * width and height values in pixels (in that order). Default 'thumbnail'. 1115 1112 * @param bool $icon Optional. Whether the image should be treated as an icon. Default false. 1116 1113 * @return string|false Attachment URL or false if no image is available. … … 1187 1184 * 1188 1185 * @param int $attachment_id Image attachment ID. 1189 * @param array|string $size Optional. Image size. Accepts any valid image size, or an array of1186 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 1190 1187 * width and height values in pixels (in that order). Default 'medium'. 1191 1188 * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. … … 1428 1425 * 1429 1426 * @param int $attachment_id Image attachment ID. 1430 * @param array|string $size Optional. Image size. Accepts any valid image size, or an array of width1431 * and height values in pixels (in that order). Default 'medium'.1427 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 1428 * width and height values in pixels (in that order). Default 'medium'. 1432 1429 * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. 1433 1430 * Default null. … … 1459 1456 * @since 4.4.0 1460 1457 * 1461 * @param array|string $size Image size to retrieve. Accepts any valid image size, or an array1462 * of width and height values in pixels (in that order). Default 'medium'.1458 * @param string|int[] $size Image size. Accepts any registered image size name, or an array of 1459 * width and height values in pixels (in that order). 1463 1460 * @param string $image_src Optional. The URL to the image file. Default null. 1464 1461 * @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'. … … 1499 1496 * 1500 1497 * @param string $sizes A source size value for use in a 'sizes' attribute. 1501 * @param array|string $size Requested size. Image size or array of width and height values1502 * in pixels (in that order).1498 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1499 * an array of width and height values in pixels (in that order). 1503 1500 * @param string|null $image_src The URL to the image file or null. 1504 1501 * @param array|null $image_meta The image meta data as returned by wp_get_attachment_metadata() or null. … … 2155 2152 * Default 'dd', or 'figcaption' when the theme registers HTML5 gallery support. 2156 2153 * @type int $columns Number of columns of images to display. Default 3. 2157 * @type string| array $size Size of the images to display. Accepts any valid image size, or an array of width2158 * and height values in pixels (in that order). Default 'thumbnail'.2154 * @type string|int[] $size Size of the images to display. Accepts any registered image size name, or an array 2155 * of width and height values in pixels (in that order). Default 'thumbnail'. 2159 2156 * @type string $ids A comma-separated list of IDs of attachments to display. Default empty. 2160 2157 * @type string $include A comma-separated list of IDs of attachments to include. Default empty. … … 3283 3280 * @see adjacent_image_link() 3284 3281 * 3285 * @param string|array $size Optional. Image size. Accepts any valid image size, an array of width and 3286 * height values in pixels (in that order), 0, or 'none'. 0 or 'none' will 3287 * default to 'post_title' or `$text`. Default 'thumbnail'. 3282 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 3283 * of width and height values in pixels (in that order). Default 'thumbnail'. 3288 3284 * @param string $text Optional. Link text. Default false. 3289 3285 */ … … 3299 3295 * @see adjacent_image_link() 3300 3296 * 3301 * @param string|array $size Optional. Image size. Accepts any valid image size, an array of width and 3302 * height values in pixels (in that order), 0, or 'none'. 0 or 'none' will 3303 * default to 'post_title' or `$text`. Default 'thumbnail'. 3297 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 3298 * of width and height values in pixels (in that order). Default 'thumbnail'. 3304 3299 * @param string $text Optional. Link text. Default false. 3305 3300 */ … … 3316 3311 * 3317 3312 * @param bool $prev Optional. Whether to display the next (false) or previous (true) link. Default true. 3318 * @param string| array $size Optional. Image size. Accepts any valid image size, or an array of width and height3319 * values in pixels (in that order). Default 'thumbnail'.3313 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 3314 * of width and height values in pixels (in that order). Default 'thumbnail'. 3320 3315 * @param bool $text Optional. Link text. Default false. 3321 3316 */ … … 3365 3360 * @param string $output Adjacent image HTML markup. 3366 3361 * @param int $attachment_id Attachment ID 3367 * @param string $size Image size. 3362 * @param string|int[] $size Requested image size. Can be any registered image size name, or 3363 * an array of width and height values in pixels (in that order). 3368 3364 * @param string $text Link text. 3369 3365 */
Note: See TracChangeset
for help on using the changeset viewer.