From 04f3b40c098ff0c4c6ff2f0c74c846e95084737b Mon Sep 17 00:00:00 2001 From: Jeroen Schmit Date: Fri, 29 May 2015 23:53:56 +0200 Subject: [PATCH] Ready for v0.11. --- functions/wpt_frontend.php | 11 +++++++---- functions/wpt_setup.php | 25 +++++++++++++++++++++++++ readme.txt | 10 ++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/functions/wpt_frontend.php b/functions/wpt_frontend.php index 93e995f4..9aadb4d9 100644 --- a/functions/wpt_frontend.php +++ b/functions/wpt_frontend.php @@ -83,11 +83,14 @@ function pre_get_posts($query) { } /** - * the_content function. + * Adds events listing to the content of a productio page. * - * @since 0.11 - * @param string $content - * @return void + * @since ? + * @since 0.11 Event are now only added to the main post content. + * As explained by Pippin: + * https://pippinsplugins.com/playing-nice-with-the-content-filter/ + * @param string $content + * @return void */ public function the_content($content) { global $wp_theatre; diff --git a/functions/wpt_setup.php b/functions/wpt_setup.php index d1ac6397..d96c890c 100644 --- a/functions/wpt_setup.php +++ b/functions/wpt_setup.php @@ -166,14 +166,39 @@ public function register_post_types() { } + /** + * Sanitizes the event_date meta value. + * + * Makes sure the event_date is always stored as 'Y-m-d H:i'. + * + * @since 0.11 + * @param string $value The event_date value. + * @return string The sanitized event_date. + */ public function sanitize_event_date( $value ) { return date( 'Y-m-d H:i', strtotime($value) ); } + /** + * Sanitizes the enddate meta value. + * + * Makes sure the enddate is always stored as 'Y-m-d H:i'. + * + * @since 0.11 + * @param string $value The enddate value. + * @return string The sanitized enddate. + */ public function sanitize_enddate( $value ) { return date( 'Y-m-d H:i', strtotime($value) ); } + /** + * Sanitizes the event_tickets_price value. + * + * @since 0.11 + * @param string $value The event_tickets_price value. + * @return string The sanitized event_tickets_price. + */ public function sanitize_event_tickets_price( $value) { $price_parts = explode( '|', $value ); diff --git a/readme.txt b/readme.txt index 0d865b86..aad8cabe 100644 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,13 @@ The new feature may be added directly to the Theater plugin or as an extension s == Changelog == += 0.11 = + +Release Date: May 30th, 2015 + +* Enhancements + * A brand new event editor. See the [release notes](http://www.slimndap.com/theater-for-wordpress-0-11-a-new-event-editor/) for all the info. + = 0.10 = Release Date: December 29th, 2014 @@ -226,6 +233,9 @@ Release Date: December 29th, 2014 == Upgrade Notice == += 0.11 = +* Fix: Importer now only stores fields for event when the fields are explicitly set. + = 0.10.16 = * Fix: The 'date' filter for template placeholders wasn't handling timezones correctly.