diff --git a/functions/wpt_frontend.php b/functions/wpt_frontend.php index 99b3370d..dbc5533d 100644 --- a/functions/wpt_frontend.php +++ b/functions/wpt_frontend.php @@ -136,7 +136,7 @@ function wpt_events($atts, $content=null) { 'upcoming' => 'true', 'past' => false, 'paginateby'=>array(), - 'category'=> false, // deprecated since v0.8.4. + 'category'=> false, // deprecated since v0.9. 'cat'=>false, 'category_name'=>false, 'category__and'=>false, @@ -198,7 +198,7 @@ function wpt_events($atts, $content=null) { } /** - * Deprecated since v0.8.4. + * Deprecated since v0.9. * Use `cat`, `category_name`, `category__and`, `category__in` or `category__not_in` instead. */ @@ -280,7 +280,7 @@ function wpt_productions($atts, $content=null) { } /** - * Deprecated since v0.8.4. + * Deprecated since v0.9. * Use `cat`, `category_name`, `category__and`, `category__in` or `category__not_in` instead. */ diff --git a/readme.txt b/readme.txt index 46b7a7a7..8134c691 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: slimndap Tags: theatre, stage, venue, events, shows, concerts, tickets, ticketing, sports, performances, calendar, workshops, theater, cinema Requires at least: 3.8 -Tested up to: 3.9 +Tested up to: 4.0 Stable tag: trunk License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -76,6 +76,21 @@ The new feature may be added directly to the Theater plugin or as an extension s == Changelog == += 0.9 = +* Added support for start and end dates in `[wpt_events]` shortcode. You can throw anything at it that strtotime understands! Some examples: + * `[wpt_events start="now"]` + * `[wpt_events start="today"]` + * `[wpt_events start="2014-09-02"]` + * `[wpt_events end="now"]` + * `[wpt_events start="2014-09-01" end="2014-10-01"]` + * `[wpt_events start="now" end="+1 week"]` + * `[wpt_events start="next Monday" end="next Monday +1 week"]` +* Removed WordPress SEO by Yoast meta box from event admin screens. + + += 0.8.3 = +* Bugfixes. + = 0.8.2 = * New date filter for template placeholder: `{{datetime|date('D j')}}`. Thank you [Epco](http://wordpress.org/support/profile/epco)! * Show all events for today or tomorrow: `[wpt_events day="today"]` and `[wpt_events day="tomorrow"]`. Thank you [mychelemy](https://github.com/mychelemy)! diff --git a/tests/test_theatre.php b/tests/test_theatre.php index 923a24e0..f0578c96 100755 --- a/tests/test_theatre.php +++ b/tests/test_theatre.php @@ -286,6 +286,35 @@ function test_shortcode_wpt_events_filter_season() { } function test_shortcode_wpt_events_filter_category() { + + // test with cat + $result = do_shortcode('[wpt_events cat="'.$this->category_film.','.$this->category_muziek.'"]'); + $this->assertEquals(3, substr_count($result, '"wp_theatre_event"'), $result); + + $result = do_shortcode('[wpt_events cat="-'.$this->category_film.','.$this->category_muziek.'"]'); + $this->assertEquals(1, substr_count($result, '"wp_theatre_event"'), $result); + + // test with category_name + $this->assertEquals(3, substr_count(do_shortcode('[wpt_events category_name="muziek"]'), '"wp_theatre_event"')); + + $result = do_shortcode('[wpt_events category_name="muziek,film"]'); + $this->assertEquals(3, substr_count($result, '"wp_theatre_event"'), $result); + + // test with an excluded category__in + $this->assertEquals(2, substr_count(do_shortcode('[wpt_events category__in="'.$this->category_film.'"]'), '"wp_theatre_event"')); + + // test with category__not_in + // should list events from all productions except 1. + $this->assertEquals(2, substr_count(do_shortcode('[wpt_events category__not_in="'.$this->category_film.'"]'), '"wp_theatre_event"')); + + // test with category__and_in + $this->assertEquals(2, substr_count(do_shortcode('[wpt_events category__and="'.$this->category_film.','.$this->category_muziek.'"]'), '"wp_theatre_event"')); + + + + } + + function test_shortcode_wpt_events_filter_category_deprecated() { $this->assertEquals(3, substr_count(do_shortcode('[wpt_events category="muziek"]'), '"wp_theatre_event"')); } diff --git a/theater.php b/theater.php index 5bfa6c7c..06fa5a1d 100644 --- a/theater.php +++ b/theater.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/plugins/theatre/ Description: Turn your Wordpress website into a theater website. Author: Jeroen Schmit, Slim & Dapper -Version: 0.8.3 +Version: 0.9 Author URI: http://slimndap.com/ Text Domain: wp_theatre Domain Path: /lang @@ -25,7 +25,7 @@ * echo $wp_theatre->events->html_listing($args); // a list of all upcoming events, paginated by month */ -$wpt_version = '0.8.3'; +$wpt_version = '0.9'; class WP_Theatre { function __construct() {