Changeset 337894
- Timestamp:
- 01/27/2011 04:27:19 PM (15 years ago)
- Location:
- custom-image-sizes
- Files:
-
- 2 edited
-
tags/1.0/readme.txt (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-image-sizes/tags/1.0/readme.txt
r216483 r337894 1 1 === Custom Image Sizes === 2 2 Contributors: filosofo 3 Donate link: http:// ilfilosofo.com/blog/wordpress-plugins/filosofo-custom-image-sizes/3 Donate link: http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/ 4 4 Tags: image, images, thumbnail, thumbnails, crop, cropping 5 5 Requires at least: 2.9 6 Tested up to: 2.9.26 Tested up to: 3.1 7 7 Stable tag: 1.0 8 8 … … 15 15 * lets you specify custom sizes with a size parameter of <code>'[width]x[height]'</code>.</li> 16 16 17 Read more at the [Custom Image Sizes](http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/) page. 18 17 19 == Installation == 18 20 … … 20 22 1. Activate the plugin through the 'Plugins' menu in WordPress 21 23 24 == Usage == 25 26 = The typical WordPress way = 27 28 * Put `add_image_size( 'my_custom_thumbnail_name', 220, 130, true );` in your theme’s functions.php file. 29 * Add the code to display that attachment’s thumbnail where you want it to appear: `echo wp_get_attachment_image($attachment_id, 'my_custom_thumbnail_name');` 30 * Unlike WordPress by itself, Custom Image Sizes will generate the thumbnail for an image, even if the image was uploaded before this `add_image_size()` was set. 31 32 = A more direct Custom Image Sizes way = 33 34 * Call `wp_get_attachment_image_src()` or `wp_get_attachment_image()` with the desired thumbnail `'[width]x[height]'` dimensions, like so: 35 36 ` 37 echo wp_get_attachment_image($attachment_id, '220x80'); 38 39 /** 40 * The above prints markup like 41 * <img width="220" height="80" title="" alt="" 42 * class="attachment-220x80" src="http://www.example.com/path-to-file/something-220x80.jpg" /> 43 */ 44 ` -
custom-image-sizes/trunk/readme.txt
r216483 r337894 1 1 === Custom Image Sizes === 2 2 Contributors: filosofo 3 Donate link: http:// ilfilosofo.com/blog/wordpress-plugins/filosofo-custom-image-sizes/3 Donate link: http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/ 4 4 Tags: image, images, thumbnail, thumbnails, crop, cropping 5 5 Requires at least: 2.9 6 Tested up to: 2.9.26 Tested up to: 3.1 7 7 Stable tag: 1.0 8 8 … … 15 15 * lets you specify custom sizes with a size parameter of <code>'[width]x[height]'</code>.</li> 16 16 17 Read more at the [Custom Image Sizes](http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/) page. 18 17 19 == Installation == 18 20 … … 20 22 1. Activate the plugin through the 'Plugins' menu in WordPress 21 23 24 == Usage == 25 26 = The typical WordPress way = 27 28 * Put `add_image_size( 'my_custom_thumbnail_name', 220, 130, true );` in your theme’s functions.php file. 29 * Add the code to display that attachment’s thumbnail where you want it to appear: `echo wp_get_attachment_image($attachment_id, 'my_custom_thumbnail_name');` 30 * Unlike WordPress by itself, Custom Image Sizes will generate the thumbnail for an image, even if the image was uploaded before this `add_image_size()` was set. 31 32 = A more direct Custom Image Sizes way = 33 34 * Call `wp_get_attachment_image_src()` or `wp_get_attachment_image()` with the desired thumbnail `'[width]x[height]'` dimensions, like so: 35 36 ` 37 echo wp_get_attachment_image($attachment_id, '220x80'); 38 39 /** 40 * The above prints markup like 41 * <img width="220" height="80" title="" alt="" 42 * class="attachment-220x80" src="http://www.example.com/path-to-file/something-220x80.jpg" /> 43 */ 44 `
Note: See TracChangeset
for help on using the changeset viewer.