Changeset 49021
- Timestamp:
- 09/20/2020 04:21:42 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image.php
r49020 r49021 918 918 * @since 2.9.0 919 919 * 920 * @param int $attachment_id Attachment ID. 921 * @param string $mime_type Image mime type. 922 * @param string $size Optional. Image size. Default 'full'. 920 * @param int $attachment_id Attachment ID. 921 * @param string $mime_type Image mime type. 922 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 923 * of width and height values in pixels (in that order). Default 'full'. 923 924 * @return resource|GdImage|false The resulting image resource or GdImage instance on success, 924 925 * false on failure. … … 953 954 * @param resource|GdImage $image Current image. 954 955 * @param int $attachment_id Attachment ID. 955 * @param string $size Image size. 956 * @param string|int[] $size Requested image size. Can be any registered image size name, or 957 * an array of width and height values in pixels (in that order). 956 958 */ 957 959 $image = apply_filters( 'load_image_to_edit', $image, $attachment_id, $size ); … … 975 977 * @access private 976 978 * 977 * @param int $attachment_id Attachment ID. 978 * @param string $size Optional. Image size. Default 'full'. 979 * @return string|false File path or url on success, false on failure. 979 * @param int $attachment_id Attachment ID. 980 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 981 * of width and height values in pixels (in that order). Default 'full'. 982 * @return string|false File path or URL on success, false on failure. 980 983 */ 981 984 function _load_image_to_edit_path( $attachment_id, $size = 'full' ) { … … 996 999 * @since 3.1.0 997 1000 * 998 * @param string $path Path to the current image. 999 * @param int $attachment_id Attachment ID. 1000 * @param string $size Size of the image. 1001 * @param string $path Path to the current image. 1002 * @param int $attachment_id Attachment ID. 1003 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1004 * an array of width and height values in pixels (in that order). 1001 1005 */ 1002 1006 $filepath = apply_filters( 'load_image_to_edit_filesystempath', $filepath, $attachment_id, $size ); … … 1011 1015 * @since 3.1.0 1012 1016 * 1013 * @param string $image_url Current image URL. 1014 * @param int $attachment_id Attachment ID. 1015 * @param string $size Size of the image. 1017 * @param string $image_url Current image URL. 1018 * @param int $attachment_id Attachment ID. 1019 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1020 * an array of width and height values in pixels (in that order). 1016 1021 */ 1017 1022 $filepath = apply_filters( 'load_image_to_edit_attachmenturl', wp_get_attachment_url( $attachment_id ), $attachment_id, $size ); … … 1023 1028 * @since 2.9.0 1024 1029 * 1025 * @param string|bool $filepath File path or URL to current image, or false. 1026 * @param int $attachment_id Attachment ID. 1027 * @param string $size Size of the image. 1030 * @param string|bool $filepath File path or URL to current image, or false. 1031 * @param int $attachment_id Attachment ID. 1032 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1033 * an array of width and height values in pixels (in that order). 1028 1034 */ 1029 1035 return apply_filters( 'load_image_to_edit_path', $filepath, $attachment_id, $size ); -
trunk/src/wp-admin/includes/media.php
r49020 r49021 126 126 * @param string $url Optional. Image src URL. Default empty. 127 127 * @param bool|string $rel Optional. Value for rel attribute or whether to add a default value. Default false. 128 * @param string| array $size Optional. Image size. Accepts any valid image size, or an array of width129 * and height values in pixels (in that order). Default 'medium'.128 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 129 * width and height values in pixels (in that order). Default 'medium'. 130 130 * @param string $alt Optional. Image alt attribute. Default empty. 131 131 * @return string The HTML output to insert into the editor. … … 161 161 * @param string $align The image alignment. 162 162 * @param string $url The image source URL. 163 * @param string| array $size Size of image. Image size or array of width and height values164 * (in that order). Default 'medium'.163 * @param string|int[] $size Requested image size. Can be any registered image size name, or 164 * an array of width and height values in pixels (in that order). 165 165 * @param string $alt The image alternative, or alt, text. 166 166 * @param string $rel The image rel attribute. -
trunk/src/wp-admin/includes/post.php
r48782 r49021 1537 1537 * Note: When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' 1538 1538 * image size is registered, which differs from the 'thumbnail' image size 1539 * managed via the Settings > Media screen. See the `$size` parameter description 1540 * for more information on default values. 1539 * managed via the Settings > Media screen. 1541 1540 * 1542 1541 * @since 4.4.0 1543 1542 * 1544 * @param string|array $size Post thumbnail image size to display in the meta box. Accepts any valid 1545 * image size, or an array of width and height values in pixels (in that order). 1546 * If the 'post-thumbnail' size is set, default is 'post-thumbnail'. Otherwise, 1547 * default is an array with 266 as both the height and width values. 1543 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1544 * an array of width and height values in pixels (in that order). 1548 1545 * @param int $thumbnail_id Post thumbnail attachment ID. 1549 1546 * @param WP_Post $post The post object associated with the thumbnail. -
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 */ -
trunk/src/wp-includes/post-template.php
r49020 r49021 1597 1597 * 1598 1598 * @param int|WP_Post $id Optional. Post ID or post object. 1599 * @param string|array $size Optional. Image size. Accepts any valid image size, or an array 1600 * of width and height values in pixels (in that order). 1601 * Default 'thumbnail'. 1599 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array 1600 * of width and height values in pixels (in that order). Default 'thumbnail'. 1602 1601 * @param bool $permalink Optional. Whether to add permalink to image. Default false. 1603 1602 * @param bool $icon Optional. Whether the attachment is an icon. Default false. … … 1643 1642 * @param string $link_html The page link HTML output. 1644 1643 * @param int $id Post ID. 1645 * @param string| array $size Size of the image. Image size or array of width and height values (in that order).1646 * Default 'thumbnail'.1644 * @param string|int[] $size Requested image size. Can be any registered image size name, or 1645 * an array of width and height values in pixels (in that order). 1647 1646 * @param bool $permalink Whether to add permalink to image. Default false. 1648 1647 * @param bool $icon Whether to include an icon. -
trunk/src/wp-includes/post-thumbnail-template.php
r49016 r49021 75 75 * @see get_the_post_thumbnail() 76 76 * 77 * @param string|array $size Optional. Image size to use. Accepts any valid image size, or 78 * an array of width and height values in pixels (in that order). 79 * Default 'post-thumbnail'. 77 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 78 * width and height values in pixels (in that order). Default 'post-thumbnail'. 80 79 * @param string|array $attr Optional. Query string or array of attributes. Default empty. 81 80 */ … … 132 131 * 133 132 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. 134 * @param string|array $size Optional. Image size to use. Accepts any valid image size, or 135 * an array of width and height values in pixels (in that order). 136 * Default 'post-thumbnail'. 133 * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of 134 * width and height values in pixels (in that order). Default 'post-thumbnail'. 137 135 * @param string|array $attr Optional. Query string or array of attributes. Default empty. 138 136 * @return string The post thumbnail image tag. … … 153 151 * @since 4.9.0 Added the `$post_id` parameter. 154 152 * 155 * @param string| array $size The post thumbnail size. Image size or array of width and height156 * values (in that order). Default 'post-thumbnail'.153 * @param string|int[] $size Requested image size. Can be any registered image size name, or 154 * an array of width and height values in pixels (in that order). 157 155 * @param int $post_id The post ID. 158 156 */ … … 170 168 * @param int $post_id The post ID. 171 169 * @param int $post_thumbnail_id The post thumbnail ID. 172 * @param string| array $size The post thumbnail size. Image size or array of width173 * an d height values (in that order). Default 'post-thumbnail'.170 * @param string|int[] $size Requested image size. Can be any registered image size name, or 171 * an array of width and height values in pixels (in that order). 174 172 */ 175 173 do_action( 'begin_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size ); … … 188 186 * @param int $post_id The post ID. 189 187 * @param int $post_thumbnail_id The post thumbnail ID. 190 * @param string| array $size The post thumbnail size. Image size or array of width191 * an d height values (in that order). Default 'post-thumbnail'.188 * @param string|int[] $size Requested image size. Can be any registered image size name, or 189 * an array of width and height values in pixels (in that order). 192 190 */ 193 191 do_action( 'end_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size ); … … 205 203 * @param int $post_id The post ID. 206 204 * @param int $post_thumbnail_id The post thumbnail ID. 207 * @param string| array $size The post thumbnail size. Image size or array of width and height208 * values (in that order). Default 'post-thumbnail'.205 * @param string|int[] $size Requested image size. Can be any registered image size name, or 206 * an array of width and height values in pixels (in that order). 209 207 * @param string $attr Query string of attributes. 210 208 */
Note: See TracChangeset
for help on using the changeset viewer.