Version Description
(2014-02-10) = * fixed css file inclusion for shortcodes with parameters * fixed css file inclusion for shortcodes outside post content (e.g. theme template)
Download this release
Release Info
Developer | mibuthu |
Plugin | Event List |
Version | 0.6.4 |
Comparing to | |
See all releases |
Code changes from version 0.6.3 to 0.6.4
- event-list.php +20 -8
- readme.txt +5 -1
event-list.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Event List
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/event-list/
|
5 |
Description: Manage your events and show them in a list view on your site.
|
6 |
-
Version: 0.6.
|
7 |
Author: Michael Burtscher
|
8 |
Author URI: http://wordpress.org/extend/plugins/event-list/
|
9 |
License: GPLv2
|
@@ -38,13 +38,15 @@ require_once(EL_PATH.'includes/options.php');
|
|
38 |
// MAIN PLUGIN CLASS
|
39 |
class Event_List {
|
40 |
private $shortcode;
|
|
|
41 |
|
42 |
/**
|
43 |
* Constructor:
|
44 |
* Initializes the plugin.
|
45 |
*/
|
46 |
public function __construct() {
|
47 |
-
$this->shortcode =
|
|
|
48 |
|
49 |
// ALWAYS:
|
50 |
// Register shortcodes
|
@@ -72,10 +74,15 @@ class Event_List {
|
|
72 |
}
|
73 |
} // end constructor
|
74 |
|
75 |
-
public function shortcode_event_list(
|
76 |
-
if(
|
77 |
-
require_once(
|
78 |
$this->shortcode = SC_Event_List::get_instance();
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
return $this->shortcode->show_html( $atts );
|
81 |
}
|
@@ -88,11 +95,16 @@ class Event_List {
|
|
88 |
|
89 |
public function print_styles() {
|
90 |
global $post;
|
91 |
-
if(is_active_widget(null, null, 'event_list_widget') || strstr($post->post_content, '[event-list
|
92 |
-
|
93 |
-
wp_enqueue_style( 'event-list');
|
94 |
}
|
95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
} // end class linkview
|
97 |
|
98 |
|
3 |
Plugin Name: Event List
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/event-list/
|
5 |
Description: Manage your events and show them in a list view on your site.
|
6 |
+
Version: 0.6.4
|
7 |
Author: Michael Burtscher
|
8 |
Author URI: http://wordpress.org/extend/plugins/event-list/
|
9 |
License: GPLv2
|
38 |
// MAIN PLUGIN CLASS
|
39 |
class Event_List {
|
40 |
private $shortcode;
|
41 |
+
private $styles_loaded;
|
42 |
|
43 |
/**
|
44 |
* Constructor:
|
45 |
* Initializes the plugin.
|
46 |
*/
|
47 |
public function __construct() {
|
48 |
+
$this->shortcode = null;
|
49 |
+
$this->styles_loaded = false;
|
50 |
|
51 |
// ALWAYS:
|
52 |
// Register shortcodes
|
74 |
}
|
75 |
} // end constructor
|
76 |
|
77 |
+
public function shortcode_event_list($atts) {
|
78 |
+
if(null == $this->shortcode) {
|
79 |
+
require_once(EL_PATH.'includes/sc_event-list.php');
|
80 |
$this->shortcode = SC_Event_List::get_instance();
|
81 |
+
if(!$this->styles_loaded) {
|
82 |
+
// normally styles are loaded with wp_print_styles action in head
|
83 |
+
// but if the shortcode is not in post content (e.g. included in a theme) it must be loaded here
|
84 |
+
$this->enqueue_styles();
|
85 |
+
}
|
86 |
}
|
87 |
return $this->shortcode->show_html( $atts );
|
88 |
}
|
95 |
|
96 |
public function print_styles() {
|
97 |
global $post;
|
98 |
+
if(is_active_widget(null, null, 'event_list_widget') || strstr($post->post_content, '[event-list')) {
|
99 |
+
$this->enqueue_styles();
|
|
|
100 |
}
|
101 |
}
|
102 |
+
|
103 |
+
public function enqueue_styles() {
|
104 |
+
wp_register_style('event-list', EL_URL.'includes/css/event-list.css');
|
105 |
+
wp_enqueue_style( 'event-list');
|
106 |
+
$this->styles_loaded = true;
|
107 |
+
}
|
108 |
} // end class linkview
|
109 |
|
110 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 0.6.
|
8 |
Plugin URI: http://wordpress.org/extend/plugins/event-list
|
9 |
Licence: GPLv2
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -71,6 +71,10 @@ Another possibility would be to call the wordpress function "do_shortcode()".
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
74 |
= 0.6.3 (2014-02-09) =
|
75 |
* added options to allow html tags in event time and location
|
76 |
* fixed date check for PHP version 5.2
|
4 |
Tags: event, events, list, listview, calendar, schedule, shortcode, page, category, categories, filter, admin, attribute, widget, sidebar, feed, rss
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 0.6.4
|
8 |
Plugin URI: http://wordpress.org/extend/plugins/event-list
|
9 |
Licence: GPLv2
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 0.6.4 (2014-02-10) =
|
75 |
+
* fixed css file inclusion for shortcodes with parameters
|
76 |
+
* fixed css file inclusion for shortcodes outside post content (e.g. theme template)
|
77 |
+
|
78 |
= 0.6.3 (2014-02-09) =
|
79 |
* added options to allow html tags in event time and location
|
80 |
* fixed date check for PHP version 5.2
|