Plugin Directory

Changeset 337894


Ignore:
Timestamp:
01/27/2011 04:27:19 PM (15 years ago)
Author:
filosofo
Message:

update the readme with better examples and max wp version

Location:
custom-image-sizes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-image-sizes/tags/1.0/readme.txt

    r216483 r337894  
    11=== Custom Image Sizes ===
    22Contributors: filosofo
    3 Donate link: http://ilfilosofo.com/blog/wordpress-plugins/filosofo-custom-image-sizes/
     3Donate link: http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/
    44Tags: image, images, thumbnail, thumbnails, crop, cropping
    55Requires at least: 2.9
    6 Tested up to: 2.9.2
     6Tested up to: 3.1
    77Stable tag: 1.0
    88
     
    1515* lets you specify custom sizes with a size parameter of <code>'[width]x[height]'</code>.</li>
    1616
     17Read more at the [Custom Image Sizes](http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/) page.
     18
    1719== Installation ==
    1820
     
    20221. Activate the plugin through the 'Plugins' menu in WordPress
    2123
     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  
    11=== Custom Image Sizes ===
    22Contributors: filosofo
    3 Donate link: http://ilfilosofo.com/blog/wordpress-plugins/filosofo-custom-image-sizes/
     3Donate link: http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/
    44Tags: image, images, thumbnail, thumbnails, crop, cropping
    55Requires at least: 2.9
    6 Tested up to: 2.9.2
     6Tested up to: 3.1
    77Stable tag: 1.0
    88
     
    1515* lets you specify custom sizes with a size parameter of <code>'[width]x[height]'</code>.</li>
    1616
     17Read more at the [Custom Image Sizes](http://austinmatzko.com/wordpress-plugins/filosofo-custom-image-sizes/) page.
     18
    1719== Installation ==
    1820
     
    20221. Activate the plugin through the 'Plugins' menu in WordPress
    2123
     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.