Events Manager - Version 3.0.7

Version Description

  • Renaming a few functions/shortcodes for consistency
  • Fixing #_LOCATIONPAGEURL issue
  • Fixed ordering issue again
  • New template tags
  • First filter
Download this release

Release Info

Developer netweblogic
Plugin Icon 128x128 Events Manager
Version 3.0.7
Comparing to
See all releases

Code changes from version 3.0.6 to 3.0.7

admin/events.php CHANGED
@@ -42,7 +42,7 @@ function dbem_events_subpanel() {
42
  <p><?php echo $EM_Event->feedback_message ?></p>
43
  </div>
44
  <?php
45
- dbem_events_table ( EM_Events::get( array('scope'=>$scope) ), "Future events" );
46
  }else{
47
  // saving unsuccessful
48
  ?>
@@ -87,7 +87,7 @@ function dbem_events_subpanel() {
87
  dbem_event_form ( $title );
88
  }else{
89
  echo "<div class='error'><p>There was an error duplicating the event. Try again maybe?</div>";
90
- dbem_events_table ( EM_Events::get(array('scope'=>$scope)), $title );
91
  }
92
  }
93
 
@@ -104,7 +104,7 @@ function dbem_events_subpanel() {
104
  $title = __ ( 'Future Events', 'dbem' );
105
  $scope = "future";
106
  }
107
- $events = EM_Events::get( array('scope'=>$scope, 'order'=>$order ) );
108
  dbem_events_table ( $events, $title );
109
  }
110
  }
42
  <p><?php echo $EM_Event->feedback_message ?></p>
43
  </div>
44
  <?php
45
+ dbem_events_table ( EM_Events::get( array('limit'=>0,'scope'=>$scope) ), "Future events" );
46
  }else{
47
  // saving unsuccessful
48
  ?>
87
  dbem_event_form ( $title );
88
  }else{
89
  echo "<div class='error'><p>There was an error duplicating the event. Try again maybe?</div>";
90
+ dbem_events_table ( EM_Events::get(array('limit'=>0,'scope'=>$scope)), $title );
91
  }
92
  }
93
 
104
  $title = __ ( 'Future Events', 'dbem' );
105
  $scope = "future";
106
  }
107
+ $events = EM_Events::get( array('scope'=>$scope, 'limit'=>0, 'order'=>$order ) );
108
  dbem_events_table ( $events, $title );
109
  }
110
  }
admin/options.php CHANGED
@@ -118,17 +118,38 @@ function dbem_options_subpanel() {
118
  <th scope="row"><?php _e('Default event list ordering','dbem'); ?></th>
119
  <td>
120
  <select name="dbem_events_default_orderby" >
121
- <?php $EM_Event = new EM_Event(); //TODO once php5 strict, this may be ok as a static call and avoid constcurting ?>
122
- <?php foreach($EM_Event->get_fields() as $value) : ?>
123
- <option value='<?php echo $value ?>' <?php echo ("$value" == get_option('dbem_events_default_orderby')) ? "selected='selected'" : ''; ?>>
 
 
 
 
 
 
 
124
  <?php echo $value; ?>
125
  </option>
126
  <?php endforeach; ?>
127
  </select>
128
  <select name="dbem_events_default_order" >
129
- <?php foreach( array(__('Ascending','dbem')=>'ASC',__('Descending','dbem')=>'DESC') as $key => $value) : ?>
130
- <option value='<?php echo $value ?>' <?php echo ("$value" == get_option('dbem_events_default_order')) ? "selected='selected'" : ''; ?>>
131
- <?php echo $key; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  </option>
133
  <?php endforeach; ?>
134
  </select>
@@ -155,7 +176,7 @@ function dbem_options_subpanel() {
155
  dbem_options_textarea ( __( 'Default single event format', 'dbem' ), 'dbem_single_event_format', __( 'The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings.', 'dbem' ) );
156
  dbem_options_input_text ( __( 'Events page title', 'dbem' ), 'dbem_events_page_title', __( 'The title on the multiple events page.', 'dbem' ) );
157
  dbem_options_input_text ( __( 'No events message', 'dbem' ), 'dbem_no_events_message', __( 'The message displayed when no events are available.', 'dbem' ) );
158
- dbem_options_input_text ( __( 'List events by date title', 'dbem' ), 'dbem_list_date_title', __( 'If viewing a page for events on a specific dates, this is the title that would show up. To insert date values, use <a href="http://www.php.net/manual/en/function.date.php">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/>', 'dbem' ) );
159
  echo $save_button;
160
  ?>
161
  </table>
@@ -184,7 +205,7 @@ function dbem_options_subpanel() {
184
  <?php
185
  dbem_options_input_text ( __( 'Single location page title format', 'dbem' ), 'dbem_location_page_title_format', __( 'The format of a single location page title.<br/>Follow the previous formatting instructions.', 'dbem' ) );
186
  dbem_options_textarea ( __( 'Default single location page format', 'dbem' ), 'dbem_single_location_format', __( 'The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location.', 'dbem' ) );
187
- dbem_options_textarea ( __( 'Default location baloon format', 'dbem' ), 'dbem_location_baloon_format', __( 'The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>.', 'dbem' ) );
188
  dbem_options_textarea ( __( 'Default location event list format', 'dbem' ), 'dbem_location_event_list_item_format', __( 'The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions', 'dbem' ) );
189
  dbem_options_textarea ( __( 'Default no events message', 'dbem' ), 'dbem_location_no_events_message', __( 'The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available.', 'dbem' ) );
190
  echo $save_button;
@@ -222,7 +243,7 @@ function dbem_options_subpanel() {
222
  </td>
223
  </tr>
224
  <?php
225
- dbem_options_textarea ( __( 'Map text format', 'dbem' ), 'dbem_map_text_format', __( 'The format the text appearing in the event page map cloud.<br/>Follow the previous formatting instructions.', 'dbem' ) );
226
  echo $save_button;
227
  ?>
228
  </table>
@@ -236,8 +257,8 @@ function dbem_options_subpanel() {
236
  <?php
237
  dbem_options_select ( __( 'Default contact person', 'dbem' ), 'dbem_default_contact_person', em_get_wp_users (), __( 'Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event', 'dbem' ) );
238
  dbem_options_radio_binary ( __( 'Enable the RSVP e-mail notifications?', 'dbem' ), 'dbem_rsvp_mail_notify_is_active', __( 'Check this option if you want to receive an email when someone books places for your events.', 'dbem' ) );
239
- dbem_options_textarea ( __( 'Contact person email format', 'dbem' ), 'dbem_contactperson_email_body', __( 'The format or the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment. <br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats.', 'dbem' ) );
240
- dbem_options_textarea ( __( 'Contact person email format', 'dbem' ), 'dbem_respondent_email_body', __( 'The format or the email which will be sent to reposdent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTEMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment.', 'dbem' ) );
241
  dbem_options_input_text ( __( 'Default notification receiver address', 'dbem' ), 'dbem_mail_receiver_address', __( "Insert the address of the receiver of your notifications", 'dbem' ) );
242
  echo $save_button;
243
  ?>
@@ -251,10 +272,10 @@ function dbem_options_subpanel() {
251
  <table class='form-table'>
252
  <?php
253
  dbem_options_input_text ( __( 'Notification sender name', 'dbem' ), 'dbem_mail_sender_name', __( "Insert the display name of the notification sender.", 'dbem' ) );
254
- dbem_options_input_text ( __( 'Notification sender address', 'dbem' ), 'dbem_mail_sender_address', __( "Insert the address of the notification sender. It must corresponds with your gmail account user", 'dbem' ) );
255
  dbem_options_input_text ( 'Mail sending port', 'dbem_rsvp_mail_port', __( "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port", 'dbem' ) );
256
  dbem_options_select ( __( 'Mail sending method', 'dbem' ), 'dbem_rsvp_mail_send_method', array ('smtp' => 'SMTP', 'mail' => __( 'PHP mail function', 'dbem' ), 'sendmail' => 'Sendmail', 'qmail' => 'Qmail' ), __( 'Select the method to send email notification.', 'dbem' ) );
257
- dbem_options_radio_binary ( __( 'Use SMTP authentication?', 'dbem' ), 'dbem_rsvp_mail_SMTPAuth', __( 'SMTP authenticatio is often needed. If you use GMail, make sure to set this parameter to Yes', 'dbem' ) );
258
  dbem_options_input_text ( 'SMTP host', 'dbem_smtp_host', __( "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'.", 'dbem' ) );
259
  dbem_options_input_text ( __( 'SMTP username', 'dbem' ), 'dbem_smtp_username', __( "Insert the username to be used to access your SMTP server.", 'dbem' ) );
260
  dbem_options_input_password ( __( 'SMTP password', 'dbem' ), "dbem_smtp_password", __( "Insert the password to be used to access your SMTP server", 'dbem' ) );
@@ -270,7 +291,7 @@ function dbem_options_subpanel() {
270
  <table class='form-table'>
271
  <?php
272
  dbem_options_input_text ( __( 'Maximum width (px)', 'dbem' ), 'dbem_image_max_width', __( 'The maximum allowed width for images uploades', 'dbem' ) );
273
- dbem_options_input_text ( __( 'Maximum height (px)', 'dbem' ), 'dbem_image_max_height', __( "The maximum allowed width for images uploaded, in pixels", 'dbem' ) );
274
  dbem_options_input_text ( __( 'Maximum size (bytes)', 'dbem' ), 'dbem_image_max_size', __( "The maximum allowed size for images uploaded, in pixels", 'dbem' ) );
275
  ?>
276
  </table>
118
  <th scope="row"><?php _e('Default event list ordering','dbem'); ?></th>
119
  <td>
120
  <select name="dbem_events_default_orderby" >
121
+ <?php
122
+ $orderby_options = apply_filters('em_settings_events_default_orderby_ddm', array(
123
+ 'start_date,start_time,name' => __('Order by start date, start time, then event name','dbem'),
124
+ 'name,start_date,start_time' => __('Order by name, start date, then start time','dbem'),
125
+ 'name,end_date,end_time' => __('Order by name, end date, then end time','dbem'),
126
+ 'end_date,end_time,name' => __('Order by end date, end time, then event name','dbem'),
127
+ ));
128
+ ?>
129
+ <?php foreach($orderby_options as $key => $value) : ?>
130
+ <option value='<?php echo $key ?>' <?php echo ($key == get_option('dbem_events_default_orderby')) ? "selected='selected'" : ''; ?>>
131
  <?php echo $value; ?>
132
  </option>
133
  <?php endforeach; ?>
134
  </select>
135
  <select name="dbem_events_default_order" >
136
+ <?php
137
+ $ascending = __('Ascending','dbem');
138
+ $descending = __('Descending','dbem');
139
+ $order_options = apply_filters('em_settings_events_default_orderby_ddm', array(
140
+ 'ASC' => __('All Ascending','dbem'),
141
+ 'DESC,ASC,ASC' => __("$descending, $ascending, $ascending",'dbem'),
142
+ 'DESC,DESC,ASC' => __("$descending, $descending, $ascending",'dbem'),
143
+ 'DESC' => __('All Descending','dbem'),
144
+ 'ASC,DESC,ASC' => __("$ascending, $descending, $ascending",'dbem'),
145
+ 'ASC,DESC,DESC' => __("$ascending, $descending, $descending",'dbem'),
146
+ 'ASC,ASC,DESC' => __("$ascending, $ascending, $descending",'dbem'),
147
+ 'DESC,ASC,DESC' => __("$descending, $ascending, $descending",'dbem'),
148
+ ));
149
+ ?>
150
+ <?php foreach( $order_options as $key => $value) : ?>
151
+ <option value='<?php echo $key ?>' <?php echo ($key == get_option('dbem_events_default_order')) ? "selected='selected'" : ''; ?>>
152
+ <?php echo $value; ?>
153
  </option>
154
  <?php endforeach; ?>
155
  </select>
176
  dbem_options_textarea ( __( 'Default single event format', 'dbem' ), 'dbem_single_event_format', __( 'The format of a single event page.<br/>Follow the previous formatting instructions. <br/>Use <code>#_MAP</code> to insert a map.<br/>Use <code>#_CONTACTNAME</code>, <code>#_CONTACTEMAIL</code>, <code>#_CONTACTPHONE</code> to insert respectively the name, e-mail address and phone number of the designated contact person. <br/>Use <code>#_ADDBOOKINGFORM</code> to insert a form to allow the user to respond to your events reserving one or more places (RSVP).<br/> Use <code>#_REMOVEBOOKINGFORM</code> to insert a form where users, inserting their name and e-mail address, can remove their bookings.', 'dbem' ) );
177
  dbem_options_input_text ( __( 'Events page title', 'dbem' ), 'dbem_events_page_title', __( 'The title on the multiple events page.', 'dbem' ) );
178
  dbem_options_input_text ( __( 'No events message', 'dbem' ), 'dbem_no_events_message', __( 'The message displayed when no events are available.', 'dbem' ) );
179
+ dbem_options_input_text ( __( 'List events by date title', 'dbem' ), 'dbem_list_date_title', __( 'If viewing a page for events on a specific date, this is the title that would show up. To insert date values, use <a href="http://www.php.net/manual/en/function.date.php">PHP time format characters</a> with a <code>#</code> symbol before them, i.e. <code>#m</code>, <code>#M</code>, <code>#j</code>, etc.<br/>', 'dbem' ) );
180
  echo $save_button;
181
  ?>
182
  </table>
205
  <?php
206
  dbem_options_input_text ( __( 'Single location page title format', 'dbem' ), 'dbem_location_page_title_format', __( 'The format of a single location page title.<br/>Follow the previous formatting instructions.', 'dbem' ) );
207
  dbem_options_textarea ( __( 'Default single location page format', 'dbem' ), 'dbem_single_location_format', __( 'The format of a single location page.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code>.<br/> Use <code>#_MAP</code> to display a map of the event location, and <code>#_IMAGE</code> to display an image of the location.<br/> Use <code>#_NEXTEVENTS</code> to insert a list of the upcoming events, <code>#_PASTEVENTS</code> for a list of past events, <code>#_ALLEVENTS</code> for a list of all events taking place in this location.', 'dbem' ) );
208
+ dbem_options_textarea ( __( 'Default location balloon format', 'dbem' ), 'dbem_location_baloon_format', __( 'The format of of the text appearing in the baloon describing the location in the map.<br/>Insert one or more of the following placeholders: <code>#_NAME</code>, <code>#_ADDRESS</code>, <code>#_TOWN</code>, <code>#_DESCRIPTION</code> or <code>#_IMAGE</code>.', 'dbem' ) );
209
  dbem_options_textarea ( __( 'Default location event list format', 'dbem' ), 'dbem_location_event_list_item_format', __( 'The format of the events the list inserted in the location page through the <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> element. <br/> Follow the events formatting instructions', 'dbem' ) );
210
  dbem_options_textarea ( __( 'Default no events message', 'dbem' ), 'dbem_location_no_events_message', __( 'The message to be displayed in the list generated by <code>#_NEXTEVENTS</code>, <code>#_PASTEVENTS</code> and <code>#_ALLEVENTS</code> when no events are available.', 'dbem' ) );
211
  echo $save_button;
243
  </td>
244
  </tr>
245
  <?php
246
+ dbem_options_textarea ( __( 'Map text format', 'dbem' ), 'dbem_map_text_format', __( 'The text format inside the map balloons.<br/>Follow the previous formatting instructions.', 'dbem' ) );
247
  echo $save_button;
248
  ?>
249
  </table>
257
  <?php
258
  dbem_options_select ( __( 'Default contact person', 'dbem' ), 'dbem_default_contact_person', em_get_wp_users (), __( 'Select the default contact person. This user will be employed whenever a contact person is not explicitly specified for an event', 'dbem' ) );
259
  dbem_options_radio_binary ( __( 'Enable the RSVP e-mail notifications?', 'dbem' ), 'dbem_rsvp_mail_notify_is_active', __( 'Check this option if you want to receive an email when someone books places for your events.', 'dbem' ) );
260
+ dbem_options_textarea ( __( 'Contact person email format', 'dbem' ), 'dbem_contactperson_email_body', __( 'The format of the email which will be sent to the contact person. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code>, <code>#_RESPEMAIL</code> and <code>#_RESPPHONE</code> to display respectively the name, e-mail, address and phone of the respondent.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment. <br/> Use <code>#_BOOKEDSEATS</code> and <code>#_AVAILABLESEATS</code> to display respectively the number of booked and available seats.', 'dbem' ) );
261
+ dbem_options_textarea ( __( 'Contact person email format', 'dbem' ), 'dbem_respondent_email_body', __( 'The format of the email which will be sent to respondent. Follow the events formatting instructions. <br/>Use <code>#_RESPNAME</code> to display the name of the respondent.<br/>Use <code>#_CONTACTNAME</code> and <code>#_CONTACTEMAIL</code> a to display respectively the name and e-mail of the contact person.<br/>Use <code>#_SPACES</code> to display the number of spaces reserved by the respondent. Use <code>#_COMMENT</code> to display the respondent\'s comment.', 'dbem' ) );
262
  dbem_options_input_text ( __( 'Default notification receiver address', 'dbem' ), 'dbem_mail_receiver_address', __( "Insert the address of the receiver of your notifications", 'dbem' ) );
263
  echo $save_button;
264
  ?>
272
  <table class='form-table'>
273
  <?php
274
  dbem_options_input_text ( __( 'Notification sender name', 'dbem' ), 'dbem_mail_sender_name', __( "Insert the display name of the notification sender.", 'dbem' ) );
275
+ dbem_options_input_text ( __( 'Notification sender address', 'dbem' ), 'dbem_mail_sender_address', __( "Insert the address of the notification sender.", 'dbem' ) );
276
  dbem_options_input_text ( 'Mail sending port', 'dbem_rsvp_mail_port', __( "The port through which you e-mail notifications will be sent. Make sure the firewall doesn't block this port", 'dbem' ) );
277
  dbem_options_select ( __( 'Mail sending method', 'dbem' ), 'dbem_rsvp_mail_send_method', array ('smtp' => 'SMTP', 'mail' => __( 'PHP mail function', 'dbem' ), 'sendmail' => 'Sendmail', 'qmail' => 'Qmail' ), __( 'Select the method to send email notification.', 'dbem' ) );
278
+ dbem_options_radio_binary ( __( 'Use SMTP authentication?', 'dbem' ), 'dbem_rsvp_mail_SMTPAuth', __( 'SMTP authentication is often needed. If you use GMail, make sure to set this parameter to Yes', 'dbem' ) );
279
  dbem_options_input_text ( 'SMTP host', 'dbem_smtp_host', __( "The SMTP host. Usually it corresponds to 'localhost'. If you use GMail, set this value to 'ssl://smtp.gmail.com:465'.", 'dbem' ) );
280
  dbem_options_input_text ( __( 'SMTP username', 'dbem' ), 'dbem_smtp_username', __( "Insert the username to be used to access your SMTP server.", 'dbem' ) );
281
  dbem_options_input_password ( __( 'SMTP password', 'dbem' ), "dbem_smtp_password", __( "Insert the password to be used to access your SMTP server", 'dbem' ) );
291
  <table class='form-table'>
292
  <?php
293
  dbem_options_input_text ( __( 'Maximum width (px)', 'dbem' ), 'dbem_image_max_width', __( 'The maximum allowed width for images uploades', 'dbem' ) );
294
+ dbem_options_input_text ( __( 'Maximum height (px)', 'dbem' ), 'dbem_image_max_height', __( "The maximum allowed height for images uploaded, in pixels", 'dbem' ) );
295
  dbem_options_input_text ( __( 'Maximum size (bytes)', 'dbem' ), 'dbem_image_max_size', __( "The maximum allowed size for images uploaded, in pixels", 'dbem' ) );
296
  ?>
297
  </table>
ajax.php CHANGED
@@ -31,7 +31,7 @@ function em_ajax_actions() {
31
 
32
  if(isset($_REQUEST['ajaxCalendar']) && $_REQUEST['ajaxCalendar']) {
33
  //FIXME if long events enabled originally, this won't show up on ajax call
34
- echo EM_Calendar::get($_REQUEST);
35
  die();
36
  }
37
  }
31
 
32
  if(isset($_REQUEST['ajaxCalendar']) && $_REQUEST['ajaxCalendar']) {
33
  //FIXME if long events enabled originally, this won't show up on ajax call
34
+ echo EM_Calendar::output($_REQUEST);
35
  die();
36
  }
37
  }
classes/calendar.php CHANGED
@@ -5,7 +5,7 @@ class EM_Calendar extends EM_Object {
5
  add_action('wp_head', array('EM_Calendar', 'insert_js'));
6
  }
7
 
8
- function get($args = array()) {
9
  $args = self::get_default_search($args);
10
  $full = $args['full']; //For ZDE, don't delete pls
11
  $month = $args['month'];
@@ -293,7 +293,7 @@ class EM_Calendar extends EM_Object {
293
  }
294
  }
295
  return '<div id="em-calendar-'.rand(100,200).'" class="em-calendar-wrapper">'.$calendar.'</div>';
296
- }
297
 
298
  /**
299
  * Echoes the calendar external JS contents directly into the head of the document
5
  add_action('wp_head', array('EM_Calendar', 'insert_js'));
6
  }
7
 
8
+ function output($args = array()) {
9
  $args = self::get_default_search($args);
10
  $full = $args['full']; //For ZDE, don't delete pls
11
  $month = $args['month'];
293
  }
294
  }
295
  return '<div id="em-calendar-'.rand(100,200).'" class="em-calendar-wrapper">'.$calendar.'</div>';
296
+ }
297
 
298
  /**
299
  * Echoes the calendar external JS contents directly into the head of the document
classes/location.php CHANGED
@@ -218,7 +218,7 @@ class EM_Location extends EM_Object {
218
  case '#_LOCATIONPAGEURL': //Depreciated
219
  $joiner = (stristr(EM_URI, "?")) ? "&amp;" : "?";
220
  $link = EM_URI.$joiner."location_id=".$this->id;
221
- $replace = ($result == '#_LOCATIONURL') ? $link : '<a href="'.$link.'">'.$this->name.'</a>';
222
  break;
223
  case '#_PASTEVENTS': //Depreciated
224
  case '#_LOCATIONPASTEVENTS':
218
  case '#_LOCATIONPAGEURL': //Depreciated
219
  $joiner = (stristr(EM_URI, "?")) ? "&amp;" : "?";
220
  $link = EM_URI.$joiner."location_id=".$this->id;
221
+ $replace = ($result == '#_LOCATIONURL' || $result == '#_LOCATIONPAGEURL') ? $link : '<a href="'.$link.'">'.$this->name.'</a>';
222
  break;
223
  case '#_PASTEVENTS': //Depreciated
224
  case '#_LOCATIONPASTEVENTS':
classes/locations.php CHANGED
@@ -45,7 +45,7 @@ class EM_Locations extends EM_Object {
45
  //Get ordering instructions
46
  $EM_Event = new EM_Event(); //blank event for below
47
  $accepted_fields = $EM_Location->get_fields(true);
48
- $accepted_fields = array_merge($accepted_fields, $EM_Event->get_fields(true));
49
  $orderby = self::build_sql_orderby($args, $accepted_fields, get_option('dbem_events_default_order'));
50
  //Now, build orderby sql
51
  $orderby_sql = ( count($orderby) > 0 ) ? 'ORDER BY '. implode(', ', $orderby) : '';
@@ -143,6 +143,7 @@ class EM_Locations extends EM_Object {
143
  $defaults = array(
144
  'eventful' => false, //Locations that have an event (scope will also play a part here
145
  'eventless' => false, //Locations WITHOUT events, eventful takes precedence
 
146
  'scope' => 'all'
147
  );
148
  $args['eventful'] = ($args['eventful'] == true);
45
  //Get ordering instructions
46
  $EM_Event = new EM_Event(); //blank event for below
47
  $accepted_fields = $EM_Location->get_fields(true);
48
+ $accepted_fields = array_merge($EM_Event->get_fields(true),$accepted_fields);
49
  $orderby = self::build_sql_orderby($args, $accepted_fields, get_option('dbem_events_default_order'));
50
  //Now, build orderby sql
51
  $orderby_sql = ( count($orderby) > 0 ) ? 'ORDER BY '. implode(', ', $orderby) : '';
143
  $defaults = array(
144
  'eventful' => false, //Locations that have an event (scope will also play a part here
145
  'eventless' => false, //Locations WITHOUT events, eventful takes precedence
146
+ 'orderby' => 'name',
147
  'scope' => 'all'
148
  );
149
  $args['eventful'] = ($args['eventful'] == true);
classes/map.php CHANGED
@@ -39,6 +39,7 @@ class EM_Map extends EM_Object {
39
  */
40
  function get_single($args) {
41
  //TODO do some validation here of defaults
 
42
  $location = $args['location'];
43
  if ( get_option('dbem_gmap_is_active') && ( is_object($location) && $location->latitude != 0 && $location->longitude != 0 ) ) {
44
  $width = (isset($args['width'])) ? $args['width']:'400';
39
  */
40
  function get_single($args) {
41
  //TODO do some validation here of defaults
42
+ //FIXME change baloon to balloon for consistent spelling
43
  $location = $args['location'];
44
  if ( get_option('dbem_gmap_is_active') && ( is_object($location) && $location->latitude != 0 && $location->longitude != 0 ) ) {
45
  $width = (isset($args['width'])) ? $args['width']:'400';
classes/object.php CHANGED
@@ -91,11 +91,15 @@ class EM_Object {
91
  $defaults['year'] = preg_match($year_regex, $defaults['year']) ? $defaults['year']:'';
92
  }
93
  //Order - it's either ASC or DESC, so let's just validate
94
- if( preg_match('/^([A-Za-z],?)+$/', $array['order']) ) {
95
- $defaults['order'] = explode(',', $array['order']);
96
  }elseif( !in_array($defaults['order'], array('ASC','DESC')) ){
97
  $defaults['order'] = $super_defaults['order'];
98
  }
 
 
 
 
99
  //TODO should we clean format of malicious code over here and run everything thorugh this?
100
  $defaults['array'] = ($defaults['array'] == true);
101
  $defaults['limit'] = (is_numeric($defaults['limit'])) ? $defaults['limit']:$super_defaults['limit'];
@@ -208,14 +212,18 @@ class EM_Object {
208
  if(is_array($args['orderby'])){
209
  //Clean orderby array so we only have accepted values
210
  foreach( $args['orderby'] as $key => $field ){
211
- if( !array_key_exists($field, $accepted_fields) ){
212
- unset($args['orderby'][$key]);
213
- }else{
214
  $orderby[] = $accepted_fields[$field];
 
 
 
 
215
  }
216
  }
217
  }elseif( $args['orderby'] != '' && array_key_exists($args['orderby'], $accepted_fields) ){
218
  $orderby[] = $accepted_fields[$args['orderby']];
 
 
219
  }
220
  //ORDER
221
  //If order is an array, we'll go through the orderby array and match the order values (in order of array) with orderby values
91
  $defaults['year'] = preg_match($year_regex, $defaults['year']) ? $defaults['year']:'';
92
  }
93
  //Order - it's either ASC or DESC, so let's just validate
94
+ if( preg_match('/,/', $defaults['order']) ) {
95
+ $defaults['order'] = explode(',', $defaults['order']);
96
  }elseif( !in_array($defaults['order'], array('ASC','DESC')) ){
97
  $defaults['order'] = $super_defaults['order'];
98
  }
99
+ //ORDER BY, split if an array
100
+ if( preg_match('/,/', $defaults['orderby']) ) {
101
+ $defaults['orderby'] = explode(',', $defaults['orderby']);
102
+ }
103
  //TODO should we clean format of malicious code over here and run everything thorugh this?
104
  $defaults['array'] = ($defaults['array'] == true);
105
  $defaults['limit'] = (is_numeric($defaults['limit'])) ? $defaults['limit']:$super_defaults['limit'];
212
  if(is_array($args['orderby'])){
213
  //Clean orderby array so we only have accepted values
214
  foreach( $args['orderby'] as $key => $field ){
215
+ if( array_key_exists($field, $accepted_fields) ){
 
 
216
  $orderby[] = $accepted_fields[$field];
217
+ }elseif( in_array($field,$accepted_fields) ){
218
+ $orderby[] = $field;
219
+ }else{
220
+ unset($args['orderby'][$key]);
221
  }
222
  }
223
  }elseif( $args['orderby'] != '' && array_key_exists($args['orderby'], $accepted_fields) ){
224
  $orderby[] = $accepted_fields[$args['orderby']];
225
+ }elseif( $args['orderby'] != '' && in_array($args['orderby'], $accepted_fields) ){
226
+ $orderby[] = $args['orderby'];
227
  }
228
  //ORDER
229
  //If order is an array, we'll go through the orderby array and match the order values (in order of array) with orderby values
events-manager.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
- Version: 3.0.6
5
- Plugin URI: http://davidebenini.it/wordpress-plugins/events-manager/
6
  Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
  Author: Davide Benini, Marcus Sykes
8
- Author URI: http://www.davidebenini.it/blog
9
  */
10
 
11
  /*
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
+ Version: 3.0.7
5
+ Plugin URI: http://wp-events-plugin.com
6
  Description: Manage events specifying precise spatial data (Location, Town, Province, etc).
7
  Author: Davide Benini, Marcus Sykes
8
+ Author URI: http://wp-events-plugin.com
9
  */
10
 
11
  /*
events.php CHANGED
@@ -35,7 +35,7 @@ function em_content($content) {
35
  // Multiple events page
36
  $scope = ($_REQUEST['scope']) ? EM_Object::sanitize($_REQUEST['scope']) : "future";
37
  if (get_option ( 'dbem_display_calendar_in_events_page' )){
38
- $content = EM_Calendar::get( array('full'=>1) );
39
  }else{
40
  $content = EM_Events::output( array( 'scope' => $scope ) );
41
  }
35
  // Multiple events page
36
  $scope = ($_REQUEST['scope']) ? EM_Object::sanitize($_REQUEST['scope']) : "future";
37
  if (get_option ( 'dbem_display_calendar_in_events_page' )){
38
+ $content = EM_Calendar::output( array('full'=>1) );
39
  }else{
40
  $content = EM_Events::output( array( 'scope' => $scope ) );
41
  }
functions.php CHANGED
@@ -5,7 +5,7 @@ function em_hello_to_new_user() {
5
  $advice = sprintf ( __ ( "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p>
6
  <p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>
7
  <p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>
8
- <p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>", 'dbem' ), $current_user->display_name, get_bloginfo ( 'url' ) . '/wp-admin/widgets.php', 'http://davidebenini.it/wordpress-plugins/events-manager#template-tags', 'http://davidebenini.it/wordpress-plugins/events-manager#shortcodes', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager-options', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager/events-manager.php&disable_hello_to_user=true' );
9
  ?>
10
  <div id="message" class="updated">
11
  <?php echo $advice; ?>
5
  $advice = sprintf ( __ ( "<p>Hey, <strong>%s</strong>, welcome to <strong>Events Manager</strong>! We hope you like it around here.</p>
6
  <p>Now it's time to insert events lists through <a href='%s' title='Widgets page'>widgets</a>, <a href='%s' title='Template tags documentation'>template tags</a> or <a href='%s' title='Shortcodes documentation'>shortcodes</a>.</p>
7
  <p>By the way, have you taken a look at the <a href='%s' title='Change settings'>Settings page</a>? That's where you customize the way events and locations are displayed.</p>
8
+ <p>What? Tired of seeing this advice? I hear you, <a href='%s' title='Don't show this advice again'>click here</a> and you won't see this again!</p>", 'dbem' ), $current_user->display_name, get_bloginfo ( 'url' ) . '/wp-admin/widgets.php', 'http://wp-events-plugin.com/documentation/template-tags/', 'http://wp-events-plugin.com/documentation/shortcodes/', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager-options', get_bloginfo ( 'url' ) . '/wp-admin/admin.php?page=events-manager/events-manager.php&disable_hello_to_user=true' );
9
  ?>
10
  <div id="message" class="updated">
11
  <?php echo $advice; ?>
install.php CHANGED
@@ -222,7 +222,7 @@ function em_add_options() {
222
  'dbem_categories_enabled'=> true,
223
  'dbem_disable_title_rewrites'=> false,
224
  'dbem_title_html' => '<h2>#_PAGETITLE</h2>',
225
- 'dbem_events_default_orderby' => 'start_date',
226
  'dbem_events_default_order' => 'ASC',
227
  'dbem_events_default_limit' => 10
228
  );
222
  'dbem_categories_enabled'=> true,
223
  'dbem_disable_title_rewrites'=> false,
224
  'dbem_title_html' => '<h2>#_PAGETITLE</h2>',
225
+ 'dbem_events_default_orderby' => 'start_date,start_time,name',
226
  'dbem_events_default_order' => 'ASC',
227
  'dbem_events_default_limit' => 10
228
  );
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Events Manager ===
2
  Contributors: nutsmuggler, netweblogic
3
- Donate link: http://davidebenini.it
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
5
  Requires at least: 2.9
6
  Tested up to: 3.0.1
7
- Stable tag: 3.0.6
8
 
9
  Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
10
 
@@ -20,7 +20,7 @@ Events manager is fully customisable; you can customise the amount of data displ
20
 
21
  Events Manager is fully localisable and already localised in Italian, Spanish, German and Swedish.
22
 
23
- For more information visit the [Documentation Page](http://davidebenini.it/wordpress-plugins/events-manager/) and [Support Forum](http://davidebenini.it/events-manager-forum/).
24
 
25
  == Installation ==
26
 
@@ -109,6 +109,13 @@ At this stage, Events Manager is only available in English and Italian. Yet, the
109
  3. The Events Manager Options page.
110
 
111
  == Change Log ==
 
 
 
 
 
 
 
112
  = 3.0.6 =
113
  * Added revised German translation
114
  * Fixed ordering issue
1
  === Events Manager ===
2
  Contributors: nutsmuggler, netweblogic
3
+ Donate link: http://wp-events-plugin.com
4
  Tags: events, manager, calendar, gigs, concert, maps, geotagging, rsvp
5
  Requires at least: 2.9
6
  Tested up to: 3.0.1
7
+ Stable tag: 3.0.7
8
 
9
  Manage events and display them in your blog. Includes recurring events, location management, calendar, Google map integration, RSVP.
10
 
20
 
21
  Events Manager is fully localisable and already localised in Italian, Spanish, German and Swedish.
22
 
23
+ For more information visit the [Documentation Page](http://wp-events-plugin.com/documentation/) and [Support Forum](http://davidebenini.it/events-manager-forum/).
24
 
25
  == Installation ==
26
 
109
  3. The Events Manager Options page.
110
 
111
  == Change Log ==
112
+ = 3.0.7 =
113
+ * Renaming a few functions/shortcodes for consistency
114
+ * Fixing #_LOCATIONPAGEURL issue
115
+ * Fixed ordering issue again
116
+ * New template tags
117
+ * First filter
118
+
119
  = 3.0.6 =
120
  * Added revised German translation
121
  * Fixed ordering issue
shortcode.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
  function em_get_calendar_shortcode($atts) {
10
  $atts = (array) $atts;
11
- return EM_Calendar::get($atts);
12
  }
13
  add_shortcode('events_calendar', 'em_get_calendar_shortcode');
14
 
@@ -77,10 +77,10 @@ add_shortcode ( 'events_link', 'em_get_link_shortcode');
77
  * Returns the uri of the events page only
78
  * @return string
79
  */
80
- function em_get_uri_shortcode(){
81
  return EM_URI;
82
  }
83
- add_shortcode ( 'events_uri', 'em_get_uri_shortcode');
84
 
85
  /**
86
  * CHANGE DOCUMENTATION! if you just want the url you should use shortcode events_rss_uri
@@ -101,7 +101,7 @@ add_shortcode ( 'events_rss_link', 'em_get_rss_link_shortcode' );
101
  * Returns the uri of the events rss page only, takes no attributes.
102
  * @return string
103
  */
104
- function em_get_rss_uri_shortcode(){
105
  return EM_RSS_URI;
106
  }
107
- add_shortcode ( 'events_rss_uri', 'em_get_rss_uri_shortcode');
8
  */
9
  function em_get_calendar_shortcode($atts) {
10
  $atts = (array) $atts;
11
+ return EM_Calendar::output($atts);
12
  }
13
  add_shortcode('events_calendar', 'em_get_calendar_shortcode');
14
 
77
  * Returns the uri of the events page only
78
  * @return string
79
  */
80
+ function em_get_url_shortcode(){
81
  return EM_URI;
82
  }
83
+ add_shortcode ( 'events_url', 'em_get_url_shortcode');
84
 
85
  /**
86
  * CHANGE DOCUMENTATION! if you just want the url you should use shortcode events_rss_uri
101
  * Returns the uri of the events rss page only, takes no attributes.
102
  * @return string
103
  */
104
+ function em_get_rss_url_shortcode(){
105
  return EM_RSS_URI;
106
  }
107
+ add_shortcode ( 'events_rss_url', 'em_get_rss_url_shortcode');
template-tags-depreciated.php CHANGED
@@ -59,7 +59,7 @@ function dbem_get_events_page($justurl = 0, $echo = 1, $text = '') {
59
  }
60
 
61
  /**
62
- * TOTALLY DEPRECIATED (NOT ALTERNATIVE TAG) - use EM_Calendar::get($args); for now (this will also change though)
63
  * @param unknown_type $args
64
  */
65
  function dbem_get_calendar($args=""){
@@ -68,9 +68,9 @@ function dbem_get_calendar($args=""){
68
  'month' => '',
69
  'echo' => 1,
70
  'long_events' => 0
71
- );
72
  $args_array = wp_parse_args( $args, $defaults );
73
- $result = EM_Calendar::get($args_array);
74
  if ( $args_array['echo'] )
75
  echo $result;
76
  else
59
  }
60
 
61
  /**
62
+ * TOTALLY DEPRECIATED (NOT ALTERNATIVE TAG) - use EM_Calendar::output($args); for now (this will also change though)
63
  * @param unknown_type $args
64
  */
65
  function dbem_get_calendar($args=""){
68
  'month' => '',
69
  'echo' => 1,
70
  'long_events' => 0
71
+ );
72
  $args_array = wp_parse_args( $args, $defaults );
73
+ $result = EM_Calendar::output($args_array);
74
  if ( $args_array['echo'] )
75
  echo $result;
76
  else
template-tags.php CHANGED
@@ -1,11 +1,69 @@
1
  <?php
2
  /*
3
  * Template Tags
4
- * These template tags were used up until EM 2.2 they have been modified to use the new OOP structure
5
- * of EM, but still provide the same values as before for backward compatability.
6
- * If you'd like to port over to the new template functions, check out the tag you want and see how we did it (or view the new docs)
7
  */
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  /**
10
  * Creates an html link to the events page.
11
  * @param string $text
@@ -16,6 +74,12 @@ function em_get_link( $text = '' ) {
16
  $text = ($text == '') ? __('Events','dbem') : $text; //In case options aren't there....
17
  return "<a href='".EM_URI."' title='$text'>$text</a>";
18
  }
 
 
 
 
 
 
19
 
20
  /**
21
  * Creates an html link to the RSS feed
@@ -26,6 +90,12 @@ function em_get_rss_link($text = "RSS") {
26
  $text = ($text == '') ? 'RSS' : $text;
27
  return "<a href='".EM_RSS_URI."'>$text</a>";
28
  }
 
 
 
 
 
 
29
 
30
  /**
31
  * Returns true if there are any events that exist in the given scope (default is future events).
@@ -45,10 +115,10 @@ function dbem_are_events_available($scope = "future"){ em_are_events_available($
45
  * @return boolean
46
  */
47
  function em_is_events_page() {
48
- $events_page_id = get_option ( 'dbem_events_page' );
49
- return is_page ( $events_page_id );
50
  }
51
- function dbem_is_events_page(){ em_is_events_page(); }
52
 
53
 
54
  /**
@@ -58,7 +128,7 @@ function dbem_is_events_page(){ em_is_events_page(); }
58
  function em_is_single_event_page() {
59
  return (em_is_events_page () && (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
60
  }
61
- function dbem_is_single_event_page(){ em_is_single_event_page(); }
62
 
63
 
64
  /**
@@ -69,7 +139,7 @@ function em_is_multiple_events_page() {
69
  //FIXME this will also show true if it's not a locations page
70
  return ( em_is_events_page () && !em_is_single_event_page() );
71
  }
72
- function dbem_is_multiple_events_page(){ em_is_multiple_events_page(); }
73
 
74
 
75
  /**
@@ -81,6 +151,6 @@ function em_is_event_rsvpable() {
81
  global $EM_Event;
82
  return ( em_is_single_event_page() && is_numeric($EM_Event->id) && $EM_Event->rsvp );
83
  }
84
- function dbem_is_event_rsvpable(){ em_is_event_rsvpable(); }
85
 
86
  ?>
1
  <?php
2
  /*
3
  * Template Tags
4
+ * If you know what you're doing, you're probably better off using the EM Objects directly.
 
 
5
  */
6
 
7
+ /**
8
+ * Returns a html list of events filtered by the array or query-string of arguments supplied.
9
+ * @param array|string $args
10
+ * @return string
11
+ */
12
+ function em_get_events( $args = array() ){
13
+ if (strpos ( $args, "=" )) {
14
+ // allows the use of arguments without breaking the legacy code
15
+ $defaults = EM_Events::get_default_search();
16
+ $args = wp_parse_args ( $args, $defaults );
17
+ }
18
+ return EM_Events::output( $args );
19
+ }
20
+ /**
21
+ * Prints out a list of events, takes same arguments as em_get_events.
22
+ * @param array|string $args
23
+ * @uses em_get_events()
24
+ */
25
+ function em_events( $args = array() ){ echo em_get_events($args); }
26
+
27
+ /**
28
+ * Returns a html list of locations filtered by the array or query-string of arguments supplied.
29
+ * @param array|string $args
30
+ * @return string
31
+ */
32
+ function em_get_locations( $args = array() ){
33
+ if (strpos ( $args, "=" )) {
34
+ // allows the use of arguments without breaking the legacy code
35
+ $defaults = EM_Locations::get_default_search();
36
+ $args = wp_parse_args ( $args, $defaults );
37
+ }
38
+ return EM_Locations::output( $args );
39
+ }
40
+ /**
41
+ * Prints out a list of locations, takes same arguments as em_get_locations.
42
+ * @param array|string $args
43
+ * @uses em_get_locations()
44
+ */
45
+ function em_locations( $args = array() ){ echo em_get_locations($args); }
46
+
47
+ /**
48
+ * Returns an html calendar of events filtered by the array or query-string of arguments supplied.
49
+ * @param array|string $args
50
+ * @return string
51
+ */
52
+ function em_get_calendar( $args = array() ){
53
+ if (strpos ( $args, "=" )) {
54
+ // allows the use of arguments without breaking the legacy code
55
+ $defaults = EM_Calendar::get_default_search();
56
+ $args = wp_parse_args ( $args, $defaults );
57
+ }
58
+ return EM_Calendar::output($args);
59
+ }
60
+ /**
61
+ * Prints out an html calendar, takes same arguments as em_get_calendar.
62
+ * @param array|string $args
63
+ * @uses em_get_calendar()
64
+ */
65
+ function em_calendar( $args = array() ){ echo em_get_calendar($args); }
66
+
67
  /**
68
  * Creates an html link to the events page.
69
  * @param string $text
74
  $text = ($text == '') ? __('Events','dbem') : $text; //In case options aren't there....
75
  return "<a href='".EM_URI."' title='$text'>$text</a>";
76
  }
77
+ /**
78
+ * Prints the result of em_get_link()
79
+ * @param string $text
80
+ * @uses em_get_link()
81
+ */
82
+ function em_link($text = ''){ echo em_get_link($text); }
83
 
84
  /**
85
  * Creates an html link to the RSS feed
90
  $text = ($text == '') ? 'RSS' : $text;
91
  return "<a href='".EM_RSS_URI."'>$text</a>";
92
  }
93
+ /**
94
+ * Prints the result of em_get_rss_link()
95
+ * @param string $text
96
+ * @uses em_get_rss_link()
97
+ */
98
+ function em_rss_link($text = "RSS"){ echo em_get_rss_link($text); }
99
 
100
  /**
101
  * Returns true if there are any events that exist in the given scope (default is future events).
115
  * @return boolean
116
  */
117
  function em_is_events_page() {
118
+ global $post;
119
+ return ($post->ID == get_option('dbem_events_page'));
120
  }
121
+ function dbem_is_events_page(){ em_is_events_page(); } //Depreciated
122
 
123
 
124
  /**
128
  function em_is_single_event_page() {
129
  return (em_is_events_page () && (isset ( $_REQUEST ['event_id'] ) && $_REQUEST ['event_id'] != ''));
130
  }
131
+ function dbem_is_single_event_page(){ em_is_single_event_page(); } //Depreciated
132
 
133
 
134
  /**
139
  //FIXME this will also show true if it's not a locations page
140
  return ( em_is_events_page () && !em_is_single_event_page() );
141
  }
142
+ function dbem_is_multiple_events_page(){ em_is_multiple_events_page(); } //Depreciated
143
 
144
 
145
  /**
151
  global $EM_Event;
152
  return ( em_is_single_event_page() && is_numeric($EM_Event->id) && $EM_Event->rsvp );
153
  }
154
+ function dbem_is_event_rsvpable(){ em_is_event_rsvpable(); } //Depreciated
155
 
156
  ?>
widgets/calendar.php CHANGED
@@ -20,7 +20,7 @@ class EM_Widget_Calendar extends WP_Widget {
20
  //Our Widget Content
21
  $instance['month'] = date("m");
22
  echo '<div id="em-calendar-'.rand(100,200).'" class="em-calendar-wrapper">';
23
- echo EM_Calendar::get($instance);
24
  echo '</div>';
25
 
26
  echo $args['after_widget'];
20
  //Our Widget Content
21
  $instance['month'] = date("m");
22
  echo '<div id="em-calendar-'.rand(100,200).'" class="em-calendar-wrapper">';
23
+ echo EM_Calendar::output($instance);
24
  echo '</div>';
25
 
26
  echo $args['after_widget'];