Changeset 30646
- Timestamp:
- 11/30/2014 10:05:26 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r30639 r30646 12 12 * This is so that the image is a better fit for the editor and theme. 13 13 * 14 * The $sizeparameter accepts either an array or a string. The supported string14 * The `$size` parameter accepts either an array or a string. The supported string 15 15 * values are 'thumb' or 'thumbnail' for the given thumbnail size or defaults at 16 16 * 128 width and 96 height in pixels. Also supported for the string value is … … 19 19 * not set. 20 20 * 21 * Finally, there is a filter named 'editor_max_image_size', that will be called22 * on the calculated array for width and height, respectively. The second21 * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be 22 * called on the calculated array for width and height, respectively. The second 23 23 * parameter will be the value that was in the $size parameter. The returned 24 24 * type for the hook is an array with the width as the first element and the … … 27 27 * @since 2.5.0 28 28 * 29 * @param int $width Width of the image 30 * @param int $height Height of the image 31 * @param string|array $size Size of what the result image should be. 32 * @param context Could be 'display' (like in a theme) or 'edit' (like inserting into an editor) 29 * @param int $width Width of the image in pixels. 30 * @param int $height Height of the image in pixels. 31 * @param string|array $size Optional. Size or array of sizes of what the result image 32 * should be. Accepts any valid image size name. Default 'medium'. 33 * @param string $context Optional. Could be 'display' (like in a theme) or 'edit' 34 * (like inserting into an editor). Default null. 33 35 * @return array Width and height of what the result image should resize to. 34 36 */ 35 function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {37 function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) { 36 38 global $content_width, $_wp_additional_image_sizes; 37 39
Note: See TracChangeset
for help on using the changeset viewer.