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 .= '';
}
- $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';
+ }
+ ?>
+
-