Plugin Directory

Changeset 682308


Ignore:
Timestamp:
03/15/2013 12:27:22 PM (13 years ago)
Author:
iluminatus
Message:

Minor bug fixes and auto excerpt improvements

Location:
single-latest-posts-lite/trunk
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • single-latest-posts-lite/trunk/core/classes/single-latest-posts-widget.php

    r674772 r682308  
    22/*
    33 * Single Latest Posts Lite Widget
    4  * Version 1.2.2
     4 * Version 1.2.4
    55 * Author L'Elite
    66 * Author URI http://laelite.info/
  • single-latest-posts-lite/trunk/readme.txt

    r680662 r682308  
    55Requires at least: 3.0
    66Tested up to: 3.5.1
    7 Stable tag: 1.2.3
     7Stable tag: 1.2.4
    88
    99This plugin allows you to pull all the recent posts from your WordPress blog and display them the way you want
     
    7676== Changelog ==
    7777
     78= 1.2.4 =
     79* Improvement: now when using auto_excerpt=true, excerpts will be generated only for posts without one.
     80* Bug fix: excerpts were cropped exceeding the value specified through the excerpt_length parameter.
     81* Bug fix: parameters containing uppercase values were being ignored.
     82
    7883= 1.2.3 =
    7984* Added support for translated date formats.
  • single-latest-posts-lite/trunk/single-latest-posts-config.php

    r680662 r682308  
    22/*
    33 * Single Latest Posts Lite Configuration
    4  * Version: 1.2.3
     4 * Version: 1.2.4
    55 * Author: L'Elite
    66 * Author URI: http://laelite.info/
     
    2121define( 'SLPosts_Root', $slp_root, true );
    2222// Current Version
    23 define( 'SLPosts_Version', '1.2.3', true );
     23define( 'SLPosts_Version', '1.2.4', true );
    2424// Classes
    2525require_once dirname( __FILE__ ) . '/core/classes/single-latest-posts-widget.php';
  • single-latest-posts-lite/trunk/single-latest-posts.php

    r680662 r682308  
    44Plugin URI: http://wordpress.org/extend/plugins/single-latest-posts-lite/
    55Description: Display the latest posts available in your WordPress blog using functions, shortcodes or widgets.
    6 Version: 1.2.3
     6Version: 1.2.4
    77Author: L'Elite
    88Author URI: http://laelite.info/
     
    101101    foreach($settings as $parameter => $value) {
    102102        if( !is_array( $value ) ) {
    103             // Strip everything
    104             $settings[$parameter] = strip_tags($value);
     103            if( !is_numeric($value)
     104                && $parameter != 'title'
     105                && $parameter != 'instance'
     106                && $parameter != 'thumbnail_class'
     107                && $parameter != 'css_style'
     108                && $parameter != 'wrapper_list_css'
     109                && $parameter != 'wrapper_block_css' ) {
     110                // Strip & lowercase everything
     111                $settings[$parameter] = trim( strip_tags( strtolower( $value ) ) );
     112            } else {
     113                // Strip everything
     114                $settings[$parameter] = strip_tags($value);
     115            }
    105116        }
    106117    }
     
    334345                    // Extract excerpt from content
    335346                    } else {
    336                         // Get the excerpt
    337                         echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     347                        // If post has excerpt then print that
     348                        if( !empty( $field->post_excerpt ) ) {
     349                            echo slp_custom_excerpt( $excerpt_length, $field->post_excerpt, $all_permalinks[$field->guid],$excerpt_trail );
     350                        // Otherwise, create one from content
     351                        } else {
     352                            // Get the excerpt
     353                            echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     354                        }
    338355                    }
    339356                    // Close excerpt wrapper
     
    416433                    // Extract excerpt from content
    417434                    } else {
    418                         // Get the excerpt
    419                         echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     435                        // If post has excerpt then print that
     436                        if( !empty( $field->post_excerpt ) ) {
     437                            echo slp_custom_excerpt( $excerpt_length, $field->post_excerpt, $all_permalinks[$field->guid],$excerpt_trail );
     438                        // Otherwise, create one from content
     439                        } else {
     440                            // Get the excerpt
     441                            echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     442                        }
    420443                    }
    421444                    // Close excerpt wrapper
     
    583606                    // Extract excerpt from content
    584607                    } else {
    585                         // Get the excerpt
    586                         echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     608                        // If post has excerpt then print that
     609                        if( !empty( $field->post_excerpt ) ) {
     610                            echo slp_custom_excerpt( $excerpt_length, $field->post_excerpt, $all_permalinks[$field->guid],$excerpt_trail );
     611                        // Otherwise, create one from content
     612                        } else {
     613                            // Get the excerpt
     614                            echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     615                        }
    587616                    }
    588617                    // Close excerpt wrapper
     
    666695                    // Extract excerpt from content
    667696                    } else {
    668                         // Get the excerpt
    669                         echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     697                        // If post has excerpt then print that
     698                        if( !empty( $field->post_excerpt ) ) {
     699                            echo slp_custom_excerpt( $excerpt_length, $field->post_excerpt, $all_permalinks[$field->guid],$excerpt_trail );
     700                        // Otherwise, create one from content
     701                        } else {
     702                            // Get the excerpt
     703                            echo slp_custom_excerpt($excerpt_length, $field->post_content, $all_permalinks[$field->guid],$excerpt_trail);
     704                        }
    670705                    }
    671706                    // Close excerpt wrapper
     
    789824    // Get the words
    790825    $words = explode(' ', $content, $count + 1);
    791     // Pop everything
    792     array_pop($words);
     826    // Check if the content exceeds the number of words specified
     827    if( count($words) > $count ) {
     828        // Pop off the rest
     829        array_pop($words);
     830    }
    793831    // Add trailing dots
    794832    array_push($words, '...');
Note: See TracChangeset for help on using the changeset viewer.