Timeline Express - Version 1.1.3.1

Version Description

  • December 10th, 2014 =
  • Enhancement: Added new filter timeline-express-read-more-class which allows users to add custom classes to the 'Read More' button
  • Enhancement: Wrapped 'Read More' in gettext filter, to allow for text to be altered
Download this release

Release Info

Developer eherman24
Plugin Icon 128x128 Timeline Express
Version 1.1.3.1
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.3.1

classes/class.timeline-express.php CHANGED
@@ -752,7 +752,8 @@ if(!class_exists("timelineExpressBase"))
752
  while( $announcement_query->have_posts() ) {
753
  $announcement_query->the_post();
754
  global $post;
755
- $announcement_image = esc_url( get_post_meta( $post->ID , 'announcement_image' , true ) );
 
756
  ?>
757
  <div class="cd-timeline-block">
758
  <!-- icon -->
@@ -804,7 +805,7 @@ if(!class_exists("timelineExpressBase"))
804
  } else {
805
  $elipses = __( '...' , 'timeline-express' );
806
  // $read_more_button = '<a href="' . get_the_permalink() . '" class="cd-read-more btn btn-primary">Read more</a>';
807
- $read_more_button = '<a href="' . get_the_permalink() . '" class="cd-read-more btn btn-primary">Read more</a>';
808
  }
809
  ?>
810
  <span class="the-excerpt"><?php echo apply_filters( 'the_content' , $this->te_wp_trim_words_retain_formatting( get_the_content() , $trim_array[$random_trim] , $elipses ) ); ?></span>
@@ -816,7 +817,7 @@ if(!class_exists("timelineExpressBase"))
816
  $read_more_button = '';
817
  } else {
818
  $elipses = __( '...' , 'timeline-express' );
819
- $read_more_button = '<a href="' . get_the_permalink() . '" class="cd-read-more btn btn-primary">Read more</a>';
820
  }
821
  ?>
822
  <span class="the-excerpt"><?php echo apply_filters( 'the_content' , $this->te_wp_trim_words_retain_formatting( get_the_content() , $trim_length , $elipses ) ); ?></span>
752
  while( $announcement_query->have_posts() ) {
753
  $announcement_query->the_post();
754
  global $post;
755
+ $announcement_image = esc_url( get_post_meta( $post->ID , 'announcement_image' , true ) );
756
+ $button_classes = 'cd-read-more btn btn-primary ';
757
  ?>
758
  <div class="cd-timeline-block">
759
  <!-- icon -->
805
  } else {
806
  $elipses = __( '...' , 'timeline-express' );
807
  // $read_more_button = '<a href="' . get_the_permalink() . '" class="cd-read-more btn btn-primary">Read more</a>';
808
+ $read_more_button = '<a href="' . get_the_permalink() . '" class="' . apply_filters( "timeline-express-read-more-class" , $button_classes ) . '">' . __( 'Read more' , 'timeline-express' ) . '</a>';
809
  }
810
  ?>
811
  <span class="the-excerpt"><?php echo apply_filters( 'the_content' , $this->te_wp_trim_words_retain_formatting( get_the_content() , $trim_array[$random_trim] , $elipses ) ); ?></span>
817
  $read_more_button = '';
818
  } else {
819
  $elipses = __( '...' , 'timeline-express' );
820
+ $read_more_button = '<a href="' . get_the_permalink() . '" class="' . apply_filters( "timeline-express-read-more-class" , $button_classes ) . '">' . __( 'Read more' , 'timeline-express' ) . '</a>';
821
  }
822
  ?>
823
  <span class="the-excerpt"><?php echo apply_filters( 'the_content' , $this->te_wp_trim_words_retain_formatting( get_the_content() , $trim_length , $elipses ) ); ?></span>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.evan-herman.com/contact/?contact-reason=I%20want%20to%20
4
  Tags: vertical, timeline, animated, css3, animations, evan, herman, evan herman, easy, time, line, font awesome, font, awesome, announcements, notifications, simple, events, calendar, scroll, triggered, scrolling, animated, fade, in, fade in
5
  Requires at least: 3.9
6
  Tested up to: 4.0.1
7
- Stable tag: 1.1.3
8
  License: GPLv2 or later
9
 
10
  Timeline express allows you to create a beautiful vertical animated and responsive timeline of posts , without writing a single line of code. Sweet!
@@ -44,6 +44,47 @@ Timeline express comes ready for translation. I would love to get things transla
44
 
45
  **Hooks + Filters**
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  **Setup a custom date format for front end display (New v1.0.9)**
48
 
49
  New in version 1.0.9 is the localization of dates on the front end. The date format is now controlled by your date settings inside of 'General > Settings'.
@@ -186,6 +227,10 @@ Have an idea for a future release feature? I love hearing about new ideas! You c
186
 
187
  == Changelog ==
188
 
 
 
 
 
189
  = 1.1.3 - December 6th, 2014 =
190
  * Fixed: Weird query issue with timeline announcements not displaying at proper times
191
  * Fixed: Styling issue with announcement date picker calendar arrow
@@ -248,6 +293,9 @@ Have an idea for a future release feature? I love hearing about new ideas! You c
248
  * Initial Release to the WordPress repository
249
 
250
  == Upgrade Notice ==
 
 
 
251
 
252
  = 1.1.3 - December 6th, 2014
253
  * Fixed: Weird query issue with timeline announcements not displaying at proper times
4
  Tags: vertical, timeline, animated, css3, animations, evan, herman, evan herman, easy, time, line, font awesome, font, awesome, announcements, notifications, simple, events, calendar, scroll, triggered, scrolling, animated, fade, in, fade in
5
  Requires at least: 3.9
6
  Tested up to: 4.0.1
7
+ Stable tag: 1.1.3.1
8
  License: GPLv2 or later
9
 
10
  Timeline express allows you to create a beautiful vertical animated and responsive timeline of posts , without writing a single line of code. Sweet!
44
 
45
  **Hooks + Filters**
46
 
47
+ **Alter the 'Read More' button text (New v1.1.3.1)**
48
+
49
+ Users can now alter the 'Read More' button text using the provided gettext filter and the 'timeline-express' text domain.
50
+
51
+ Example:
52
+ <code>
53
+ // alter 'Read more' to say 'View Announcement'
54
+ function timeline_express_change_readmore_text( $translated_text, $untranslated_text, $domain ) {
55
+ switch( $untranslated_text ) {
56
+ case 'Read more':
57
+ $translated_text = __( 'View Announcement','timeline-express' );
58
+ break;
59
+ }
60
+ return $translated_text;
61
+ }
62
+ add_filter('gettext', 'timeline_express_change_readmore_text', 20, 3);
63
+ </code>
64
+
65
+ This example would alter 'Read more' to say 'View Announcement'.
66
+
67
+ **Add custom classes to the 'Read More' button (New v1.1.3.1)**
68
+
69
+ Users can now add custom classes to the 'Read More' announcement button. This allows for greater control in fitting the Timeline into your currently active theme.
70
+
71
+ Parameters :
72
+
73
+ $button_classes = default button classes assigned to the 'Read More' button
74
+
75
+ Example:
76
+ <code>
77
+ // add a custom class to the timeline express readmore link
78
+ function timeline_express_custom_readmore_class( $button_classes ) {
79
+ return $button_classes . 'custom-class-name';
80
+ }
81
+ add_filter( 'timeline-express-read-more-class' , 'timeline_express_custom_readmore_class' );
82
+ </code>
83
+
84
+ This example would print the following 'Read More' button HTML onto the page :
85
+
86
+ `<a href="http://site.com/link-to-announcement" class="cd-read-more btn btn-primary custom-class-name">Read more</a>`
87
+
88
  **Setup a custom date format for front end display (New v1.0.9)**
89
 
90
  New in version 1.0.9 is the localization of dates on the front end. The date format is now controlled by your date settings inside of 'General > Settings'.
227
 
228
  == Changelog ==
229
 
230
+ = 1.1.3.1 - December 10th, 2014 =
231
+ * Enhancement: Added new filter `timeline-express-read-more-class` which allows users to add custom classes to the 'Read More' button
232
+ * Enhancement: Wrapped 'Read More' in gettext filter, to allow for text to be altered
233
+
234
  = 1.1.3 - December 6th, 2014 =
235
  * Fixed: Weird query issue with timeline announcements not displaying at proper times
236
  * Fixed: Styling issue with announcement date picker calendar arrow
293
  * Initial Release to the WordPress repository
294
 
295
  == Upgrade Notice ==
296
+ = 1.1.3.1 - December 10th, 2014 =
297
+ * Enhancement: Added new filter `timeline-express-read-more-class` which allows users to add custom classes to the 'Read More' button
298
+ * Enhancement: Wrapped 'Read More' in gettext filter, to allow for text to be altered
299
 
300
  = 1.1.3 - December 6th, 2014
301
  * Fixed: Weird query issue with timeline announcements not displaying at proper times
timeline-express.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Timeline Express
5
  Plugin URI: http://www.evan-herman.com
6
  Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.
7
- Version: 1.1.3
8
  Author: Evan Herman
9
  Author URI: http://www.evan-herman.com
10
  License: GPL2
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  #_________________________________________________ CONSTANTS
29
 
30
  /** Configuration **/
31
- if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.3');
32
  if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ ));
33
  if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/'));
34
  if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));
4
  Plugin Name: Timeline Express
5
  Plugin URI: http://www.evan-herman.com
6
  Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code.
7
+ Version: 1.1.3.1
8
  Author: Evan Herman
9
  Author URI: http://www.evan-herman.com
10
  License: GPL2
28
  #_________________________________________________ CONSTANTS
29
 
30
  /** Configuration **/
31
+ if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.3.1');
32
  if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ ));
33
  if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/'));
34
  if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));