Plugin Directory

Changeset 606324


Ignore:
Timestamp:
10/01/2012 01:06:54 AM (13 years ago)
Author:
hobbsh
Message:

1.6.1 Changes

Location:
wordpress-posts-timeline/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wordpress-posts-timeline/trunk/inc/timeline_options.php

    r579979 r606324  
    22/* CURRENT OPTIONS:
    33
    4 plugin version 1.6
     4plugin version 1.6.1
    55
    66timeline_post_category - select post category from current category dropdown
     
    3535        $date_formats = array(
    3636            'March 10, 2012' => 'F j, Y',
    37             '03.10.2012' => 'm.d.y',
     37            '03.10.2012' => 'm.j.y',
    3838            '2012' => 'Y',
    39             'March, 2012' => 'F, Y'
     39            'March, 2012' => 'F, Y',
     40            '20 March, 2012' => 'j F, Y'
    4041        );
    4142       
     
    8485            'input_type' => 'text'
    8586            ),
     87        'show_titles' => array (
     88            'name' => 'timeline_show_titles',
     89            'default' => 'no',
     90            'desc' => 'Do you want to show the post title?',
     91            'input_type' => 'dropdown',
     92            'data' => array( //manual dropdown options
     93                'yes' => 'yes',
     94                'no' => 'no')
     95                ),
    8696        'date_format' => array (
    8797            'name' => 'timeline_date_format' ,
     
    94104            'name' => 'timeline_text_length' ,
    95105            'default' => 10,
    96             'desc' => 'How many words do you want to show for each post?',
     106            'desc' => 'How many words do you want to show for each post? (Use "-1" for full length)',
    97107            'input_type' => 'text',
    98108            ),
  • wordpress-posts-timeline/trunk/readme.txt

    r579979 r606324  
    11=== WordPress Posts Timeline ===
    22Contributors: hobbsh
    3 Donate Link: http://www.hackbits.com/
     3Donate Link: http://www.wyliehobbs.com/
    44Tags: posts timeline, css timeline, vertical timeline, timeline
    55Requires at least: 3.1
    66Tested up to: 3.4.1
    7 Stable tag: 1.6
     7Stable tag: 1.6.1
    88License: GPLv2
    99
  • wordpress-posts-timeline/trunk/wordpress-posts-timeline.php

    r579979 r606324  
    55    Description: Outputs WordPress posts in a vertical timeline
    66    Author: Wylie Hobbs
    7     Version: 1.6
    8     Author URI: http:/hackbits.com/demos/wordpress-posts-timeline
     7    Version: 1.6.1
     8    Author URI: http://wyliehobbs.com/demos/wordpress-posts-timeline
    99    Text Domain: wordpress-posts-timeline
    1010    Domain Path: /lang
    1111 */
    1212 
    13 /*  Copyright 2012  Wylie Hobbs  (email : wylie@hackbits.com)
     13/*  Copyright 2012  Wylie Hobbs  (email : workwith@wyliehobbs.com)
    1414
    1515    This program is free software; you can redistribute it and/or modify
     
    2828
    2929define('WPTIMELINE_UNIQUE', 'wptimeline');
    30 define('WPTIMELINE_VERSION', 1.6);
     30define('WPTIMELINE_VERSION', 1.61);
    3131
    3232
     
    6767   
    6868        $posts = get_posts( $post_args );
    69         echo '<div id="timeline">';
    70         echo '<ul>';
     69        $out .= '<div id="timeline">';
     70        $out .=  '<ul>';
    7171        foreach ( $posts as $post ) : setup_postdata($post);
    7272
    73             echo '<li><div>';
     73            $out .= '<li><div>';
    7474                if( get_option('timeline_post_link') == 'yes'){
    75                     echo '<a href="' . get_permalink($post->ID) . '" title="'.$post->title.'">';
    76                     echo '<h3 class="timeline-date">';
    77                     echo get_the_time(get_option('timeline_date_format'), $post->ID);
    78                     echo '</h3></a>';
     75                    $out .=  '<a href="' . get_permalink($post->ID) . '" title="'.$post->title.'">';
     76                    $out .=  '<h3 class="timeline-date">';
     77                    $out .=  get_the_time(get_option('timeline_date_format'), $post->ID);
     78                    if( get_option('timeline_show_titles') == 'yes'){
     79                        $out .=  " ".get_the_title($post->ID)." ";
     80                    }
     81                    $out .=  '</h3></a>';
    7982                }
    8083                else{
    81                     echo '<h3 class="timeline-date">';
    82                     echo get_the_time(get_option('timeline_date_format'), $post->ID);
    83                     echo '</h3>';
     84                    $out .=  '<h3 class="timeline-date">';
     85                    $out .=  get_the_time(get_option('timeline_date_format'), $post->ID);
     86                    if( get_option('timeline_show_titles') == 'yes'){
     87                        $out .=  " ".get_the_title($post->ID)." ";
     88                    }
     89                    $out .=  '</h3>';
    8490                }
    8591                if ( get_option('timeline_include_images') == 'yes' ){
    8692                    if ( featured_image() == true && has_post_thumbnail( $post->ID ) ){
    87                         echo '<span class="timeline-image">' . get_the_post_thumbnail( $post->ID, 'timeline-thumb' ) . '</span>';
     93                        $out .= '<span class="timeline-image">' . get_the_post_thumbnail( $post->ID, 'timeline-thumb' ) . '</span>';
    8894                    }
    8995                }
    90                 echo '<span class="timeline-text">'.timeline_text(get_option('timeline_text_length')).'</span>';
    91                 echo '</div></li>';
     96                $out .= '<span class="timeline-text">'.timeline_text(get_option('timeline_text_length')).'</span>';
     97                $out .= '</div></li>';
    9298
    9399        endforeach;
    94100
    95         echo '</ul>';
    96         echo '</div> <!-- #timeline -->';
     101        $out .= '</ul>';
     102        $out .= '</div> <!-- #timeline -->';
    97103        wp_reset_postdata();
     104        return $out;
    98105}
    99106
     
    102109    $str = get_the_content('', true, '');
    103110    $str = strip_tags($str);
    104     if(stripos($str," ")){
     111    if(stripos($str," ") && $limit>=0){
    105112    $ex_str = explode(" ",$str);
    106113        if(count($ex_str)>$limit){
    107114            for($i=0;$i<$limit;$i++){
    108             $str_s.=$ex_str[$i]." ";
     115                $str_s.=$ex_str[$i]." ";
    109116            }
    110         return $str_s;
     117            $str_s.="...";
     118            return $str_s;
    111119        }else{
    112         return $str;
     120            return $str;
    113121        }
    114122    }else{
Note: See TracChangeset for help on using the changeset viewer.