From 32d33fb6130ad664854af7a2ec19487d3ea9b62a Mon Sep 17 00:00:00 2001 From: Evan Herman Date: Sat, 30 Jan 2016 11:26:58 -0500 Subject: [PATCH] roll out updates --- README.md | 14 +++++++++++- classes/class.timeline-express.php | 36 +++++++++++++++++++++--------- readme.txt | 23 +++++++++++++++---- timeline-express.php | 4 ++-- 4 files changed, 59 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 565d0fe..7f0c3af 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Timeline Express v1.1.7.2 +Timeline Express v1.1.7.7 ================ Timeline express allows you to create a vertical animated and responsive timeline of posts , without writing a single line of code. Sweet! @@ -289,6 +289,18 @@ Have an idea for a future release feature? I love hearing about new ideas! You c ### Changelog +###### 1.1.7.7 - January 30th, 2016 +* Wrapped single announcement template date in `timeline_express_custom_date_format` filter to allow users to alter that, as well as the date in the timeline. + +###### 1.1.7.6 - October 2nd, 2015 +* Fixed issue with timeline icons not saving properly, and returning empty on the front end. + +###### 1.1.7.5 - September 28th, 2015 +* Fixed incorrect name for default icon dropdown. + +###### 1.1.7.4 - September 18th, 2015 +* Fixed adding custom fields and using an image as an icon (https://gist.github.com/EvanHerman/6bbc8de82f34b4cb3c5c#comments) + ###### 1.1.7.3 - July 15th, 2015 * Remove duplicate date picker fields on announcements diff --git a/classes/class.timeline-express.php b/classes/class.timeline-express.php index f3a4be4..23003bf 100644 --- a/classes/class.timeline-express.php +++ b/classes/class.timeline-express.php @@ -237,9 +237,9 @@ function cmb2_render_callback_te_bootstrap_dropdown( $field, $escaped_value, $ob * save our custom date time stamp * since @v1.1.5 */ - function cmb2_validate_te_bootstrap_dropdown_callback( $override_value, $new ) { - if( isset( $new ) && $new != '' ){ - return 'fa-'.trim($new); + function cmb2_validate_te_bootstrap_dropdown_callback( $override_value, $value ) { + if( isset( $value ) && $value != '' ){ + return 'fa-'.trim($value); } return '-1'; } @@ -589,11 +589,15 @@ public function cmb_timeline_announcement_metaboxes() { $custom_fields = apply_filters( 'timeline_express_custom_fields', $custom_field ); $i = 0; // first, check if any custom fields are defined... - if( !empty( $custom_fields ) ) { + if( ! empty( $custom_fields ) ) { foreach( $custom_fields as $user_defined_field ) { - if( $custom_fields[$i]['name'] != '' ) { - $field_array[] = $custom_fields[$i]; - } + // Email text field + $announcement_metabox->add_field( array( + 'name' => $custom_fields[$i]['name'], + 'desc' => $custom_fields[$i]['desc'], + 'id' => $custom_fields[$i]['id'], + 'type' => $custom_fields[$i]['type'], + ) ); $i++; } } @@ -829,14 +833,14 @@ function timeline_express_single_page_filter_the_content( $content ) { $announcement_header_image = wp_get_attachment_image_src( $announcement_image_id[0] , 'timeline-express-announcement-header'); $custom_content .= '' . get_the_title( $post->ID ) . ''; } - $custom_content .= '' . __( 'Announcement Date' , 'timeline-express' ) . ' : ' . date( 'M j , Y' , $announcement_date ) . ''; + $custom_content .= '' . __( 'Announcement Date' , 'timeline-express' ) . ' : ' . date_i18n( apply_filters( 'timeline_express_custom_date_format' , get_option( 'date_format' ) ) , $announcement_date ) . ''; $custom_content .= $content; if ( $referer != '' ) { $custom_content .= ' ' . __( 'Back' , 'timeline-express' ) . ''; } return $custom_content; } else { - $custom_content = '' . __( 'Announcement Date' , 'timeline-express' ) . ' : ' . date( 'M j , Y' , $announcement_date ) . ''; + $custom_content = '' . __( 'Announcement Date' , 'timeline-express' ) . ' : ' . date_i18n( apply_filters( 'timeline_express_custom_date_format' , get_option( 'date_format' ) ) , $announcement_date ) . ''; $custom_content .= $content; if ( $referer != '' ) { $custom_content .= ' ' . __( 'Back' , 'timeline-express' ) . ''; @@ -1339,9 +1343,19 @@ public function timeline_express_build_bootstrap_dropdown( $field, $meta ) { .dropdown-toggle { background: transparent !important; border: 1px solid rgb(201, 201, 201) !important; } .dropdown-toggle .caret { border-top-color: #333 !important; } .ui-datepicker-prev:hover, .ui-datepicker-next:hover { cursor: pointer; } - + + + args['id'] ) ) { + $field_name = $field->args['id']; + } else { + $field_name = 'default-announcement-icon'; + } + ?> + - While the plugins I develop are free, maintaining and supporting them is hard work. If you find this plugin useful, or it helps in anyway, please consider making a donation for its continued development. +This plugin was originally inspired by the great folks at CodyHouse.io. + == Installation == 1. Download the plugin .zip file @@ -81,7 +83,7 @@ Looking for some advancedd documentation? Check out the View the Timeline Express Demo @@ -339,6 +341,18 @@ add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_templa == Changelog == += 1.1.7.7 - January 30th, 2016 = +* Wrapped single announcement template date in `timeline_express_custom_date_format` filter to allow users to alter that, as well as the date in the timeline. + += 1.1.7.6 - October 2nd, 2015 = +* Fixed issue with timeline icons not saving properly, and returning empty on the front end. + += 1.1.7.5 - September 28th, 2015 = +* Fixed incorrect name for default icon dropdown. + += 1.1.7.4 - September 18th, 2015 = +* Fixed adding custom fields and using an image as an icon (https://gist.github.com/EvanHerman/6bbc8de82f34b4cb3c5c#comments) + = 1.1.7.3 - July 15th, 2015 = * Remove duplicate date picker fields on announcements @@ -509,4 +523,5 @@ add_filter( 'timeline_express_custom_template' , 'custom_timeline_express_templa == Upgrade Notice == -* Remove duplicate date picker fields on announcements \ No newline at end of file += 1.1.7.7 - January 30th, 2016 = +* Wrapped single announcement template date in `timeline_express_custom_date_format` filter to allow users to alter that, as well as the date in the timeline. \ No newline at end of file diff --git a/timeline-express.php b/timeline-express.php index 14ca21b..2dfc4f1 100644 --- a/timeline-express.php +++ b/timeline-express.php @@ -4,7 +4,7 @@ Plugin Name: Timeline Express Plugin URI: http://www.evan-herman.com Description: Create a beautiful vertical, CSS3 animated and responsive timeline in minutes flat without writing code. -Version: 1.1.7.3 +Version: 1.1.7.7 Author: Evan Herman Author URI: http://www.evan-herman.com License: GPL2 @@ -28,7 +28,7 @@ #_________________________________________________ CONSTANTS /** Configuration **/ -if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.7.3'); +if(!defined('TIMELINE_EXPRESS_VERSION_CURRENT')) define('TIMELINE_EXPRESS_VERSION_CURRENT', '1.1.7.7'); if(!defined('TIMELINE_EXPRESS_PATH')) define('TIMELINE_EXPRESS_PATH', plugin_dir_path( __FILE__ )); if(!defined('TIMELINE_EXPRESS_URL')) define('TIMELINE_EXPRESS_URL', plugins_url('timeline-express/')); if(!defined('TIMELINE_EXPRESS_URL_WP')) define('TIMELINE_EXPRESS_URL_WP', get_bloginfo('url'));