WordPress.org

Plugin Directory

Changeset 596056


Ignore:
Timestamp:
09/07/12 19:01:42 (20 months ago)
Author:
trepmal
Message:

release 1.1.2

Location:
mini-loops/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mini-loops/trunk/helpers.php

    r538426 r596056  
    108108 
    109109    if ( $current_category && is_category() ) { 
    110         $categories = get_query_var( 'cat' ); 
     110        $categories = get_query_var( 'cat' ); 
    111111    } 
    112112 
    113113    if ( $current_single_category && is_single() ) { 
    114         $categories = get_the_category(); 
    115         $categories = $categories[0]->term_id; 
     114        $categories = get_the_category(); 
     115        $categories = $categories[0]->term_id; 
    116116    } 
    117117 
    118118    if ( $current_author && is_author() ) { 
    119         $post_author = get_query_var( 'author' ); 
     119        $post_author = get_query_var( 'author' ); 
    120120    } elseif ( $current_author && is_single() ) { 
    121         $post_author = get_the_author_meta('ID'); 
     121        $post_author = get_the_author_meta('ID'); 
    122122    } 
    123123 
     
    138138        'post__not_in' => $exclude, 
    139139    ); 
    140      
     140 
    141141    if ( in_array( $order_by, array( 'meta_value', 'meta_value_num' ) ) && ! empty( $order_meta_key ) ) { 
    142142        $query['meta_key'] = $order_meta_key; 
    143143    } 
    144      
     144 
    145145    $query = apply_filters( 'miniloops_query', $query ); 
    146146 
     
    168168 
    169169    if ( $miniloop->have_posts() ) : $miniloop->the_post(); 
    170     //begin building the list 
    171     $postlist = ''; 
    172     $before_items = do_shortcode( miniloops_shortcoder( stripslashes( $before_items ) ) ); 
    173     $before_items = apply_filters( 'miniloops_before_items_format', $before_items, $query ); 
    174     $postlist .= $before_items; 
    175  
    176     $miniloop->rewind_posts(); 
    177     while ( $miniloop->have_posts() ) : $miniloop->the_post(); 
    178  
    179         $post_format = function_exists('get_post_format') ? get_post_format( get_the_ID() ) : 'standard'; 
    180  
    181         $item_format_to_use = apply_filters( 'miniloops_item_format', $item_format, $post_format ); 
    182  
    183         $item_format_to_use = miniloops_shortcoder( $item_format_to_use ); 
    184         $postlist .= str_replace( '%%%%%', '', do_shortcode( $item_format_to_use ) ); 
    185  
    186     endwhile; 
     170        //begin building the list 
     171        $postlist = ''; 
     172 
     173        $before_items = do_shortcode( miniloops_shortcoder( stripslashes( $before_items ) ) ); 
     174        $before_items = apply_filters( 'miniloops_before_items_format', $before_items, $query ); 
     175        $postlist .= $before_items; 
     176 
     177        $miniloop->rewind_posts(); 
     178        while ( $miniloop->have_posts() ) : $miniloop->the_post(); 
     179 
     180            $post_format = function_exists('get_post_format') ? get_post_format( get_the_ID() ) : 'standard'; 
     181 
     182            $item_format_to_use = apply_filters( 'miniloops_item_format', $item_format, $post_format ); 
     183 
     184            $item_format_to_use = miniloops_shortcoder( $item_format_to_use ); 
     185            $postlist .= str_replace( '%%%%%', '', do_shortcode( $item_format_to_use ) ); 
     186 
     187        endwhile; 
     188 
     189        $after_items = do_shortcode( miniloops_shortcoder( stripslashes( $after_items ) ) ); 
     190        $after_items = apply_filters( 'miniloops_after_items_format', $after_items, $query ); 
     191        $postlist .= $after_items; 
     192 
    187193    endif; 
    188194 
    189195    wp_reset_query(); 
    190  
    191     $after_items = do_shortcode( miniloops_shortcoder( stripslashes( $after_items ) ) ); 
    192     $after_items = apply_filters( 'miniloops_after_items_format', $after_items, $query ); 
    193     $postlist .= $after_items; 
    194196 
    195197    return $postlist; 
     
    231233    if ( strpos( $content, '[ml_format' ) !== false ) 
    232234        $atts['item_format'] = do_shortcode( $content ); 
    233     elseif ( ! empty( $content) )  
     235    elseif ( ! empty( $content) ) 
    234236        $atts['item_format'] = $content; 
    235237    $args = shortcode_atts( get_miniloops_defaults(), $atts ); 
     
    264266    if ($length) 
    265267        $title = substr( $title, 0, $length ); 
    266      
     268 
    267269    $title = $before . $title . $after; 
    268      
     270 
    269271    if ( $link ) { 
    270272        $link = get_permalink(); 
    271273        $title = "<a href='$link'>$title</a>"; 
    272274    } 
    273      
     275 
    274276    return $title; 
    275277} 
     
    286288    if ($length) 
    287289        $link = substr( $link, 0, $length ); 
    288      
     290 
    289291    $link = $before . $link . $after; 
    290292 
     
    692694    $upl = wp_upload_dir(); 
    693695    $new = image_resize( $file, $width, $height, true, "ml-{$width}x{$height}" ); 
    694     if ( is_wp_error( $new ) )  
     696    if ( is_wp_error( $new ) ) 
    695697        //if the image could not be resized, return the original url 
    696698        return str_replace( $upl['basedir'], $upl['baseurl'], $file ); 
  • mini-loops/trunk/mini-loops.php

    r556723 r596056  
    44Plugin URI: http://trepmal.com/plugins/mini-loops/ 
    55Description: Query posts and display them where you want 
    6 Version: 1.1.1 
     6Version: 1.1.2 
    77Author: Kailey Lampert 
    88Author URI: http://kaileylampert.com 
  • mini-loops/trunk/readme.txt

    r556719 r596056  
    55Requires at least: 3.1 
    66Tested up to: 3.4 
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88 
    99Get recent posts, posts from categories, and more. Display as widget or with shortcodes and template tags. 
     
    293293== Upgrade Notice == 
    294294 
     295= 1.1.2 =  
     296Fix: imbalanced tags if zero posts match query 
     297 
    295298= 1.1 =  
    296299New: Lots! See the changelog for details. 
     
    317320 
    318321== Changelog == 
     322 
     323= Version 1.1.2 = 
     324* Fix: imbalanced tags if zero posts match query 
    319325 
    320326= Version 1.1 = 
Note: See TracChangeset for help on using the changeset viewer.