WordPress.org

Plugin Directory

Changeset 399221


Ignore:
Timestamp:
06/20/11 15:01:00 (3 years ago)
Author:
mfields
Message:

Return data for fullsize images.

Location:
taxonomy-images/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • taxonomy-images/trunk/public-filters.php

    r391118 r399221  
    499499 * @param     mixed          Default value for apply_filters() to return. Unused. 
    500500 * @param     array          Named Arguments. 
    501  * @return    array          Image data. See WordPress core image_get_intermediate_size(). 
     501 * @return    array          Image data: url, width and height. 
    502502 * 
    503503 * @access    private        Use the 'taxonomy-images-queried-term-image-data' filter. 
    504504 * @since     0.7 
     505 * @alter     0.7.2 
    505506 */ 
    506507function taxonomy_images_plugin_get_queried_term_image_data( $default, $args = array() ) { 
     
    520521    } 
    521522 
    522     $data = image_get_intermediate_size( $ID, $args['image_size'] ); 
    523     if ( is_array( $data ) ) { 
     523    $data = array(); 
     524 
     525    if ( in_array( $args['image_size'], array( 'full', 'fullsize' ) ) ) { 
     526        $src = wp_get_attachment_image_src( $ID, 'full' ); 
     527 
     528        if ( isset( $src[0] ) ) { 
     529            $data['url'] = $src[0]; 
     530        } 
     531        if ( isset( $src[1] ) ) { 
     532            $data['width'] = $src[1]; 
     533        } 
     534        if ( isset( $src[2] ) ) { 
     535            $data['height'] = $src[2]; 
     536        } 
     537    } 
     538    else { 
     539        $data = image_get_intermediate_size( $ID, $args['image_size'] ); 
     540    } 
     541 
     542    if ( ! empty( $data ) ) { 
    524543        return $data; 
    525544    } 
  • taxonomy-images/trunk/readme.md

    r396372 r399221  
    208208--------- 
    209209 
     210__0.7.2__ 
     211 
     212* Return data for fulsize images in archive views. [See this thread](http://wordpress.org/support/topic/image-size-full). 
     213 
    210214__0.7.1__ 
    211215 
  • taxonomy-images/trunk/readme.txt

    r396372 r399221  
    211211==Changelog== 
    212212 
     213= 0.7.2 = 
     214* Return data for fulsize images in archive views. [See this thread](http://wordpress.org/support/topic/image-size-full). 
     215 
    213216= 0.7.1 = 
    214217* Remove unused link code which is throwing an error when no taxonomies support images. 
  • taxonomy-images/trunk/taxonomy-images.php

    r396372 r399221  
    44Plugin URI:           http://wordpress.mfields.org/plugins/taxonomy-images/ 
    55Description:          Associate images from your media library to categories, tags and custom taxonomies. 
    6 Version:              0.7.1 
     6Version:              0.7.2 
    77Author:               Michael Fields 
    88Author URI:           http://wordpress.mfields.org/ 
     
    3636 * @access    private 
    3737 * @since     0.7 
     38 * @alter     0.7.2 
    3839 */ 
    3940function taxonomy_image_plugin_version() { 
    40     return '0.7'; 
     41    return '0.7.2'; 
    4142} 
    4243 
Note: See TracChangeset for help on using the changeset viewer.