Events Manager - Version 6.0.1

Version Description

  • breaking changes to templates for those upgrading from 6.0, included warning/nudge for users upgrading from 6.0
  • added more fine-grained settings to the Settings > Styling Options section allowing to disable styling elements throughout the plugin
  • fixed modal transition CSS issues
  • added advanced mode enabling users to directly use some, all or none our plugin template files for formats rather than the settings page
  • improved reset option for all overridable placeholder formats in settings allowing for users to reload default formats into individual text boxes
  • added ability to override plugin template files via wp-content/plugin-templates/events-manager/
  • added styling options to allow the use of theme font family, width, height and weight
  • maded default styling options to use theme properties when upgrading from EM < v6.0.1
Download this release

Release Info

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

Code changes from version 6.0.0.1 to 6.0.1

Files changed (32) hide show
  1. admin/em-options.php +20 -0
  2. admin/settings/tabs/formats.php +304 -79
  3. admin/settings/tabs/general.php +21 -5
  4. em-functions.php +26 -9
  5. em-install.php +56 -43
  6. events-manager.php +153 -10
  7. includes/css/events-manager-admin.css +32 -8
  8. includes/css/events-manager-admin.css.map +1 -1
  9. includes/css/events-manager-admin.min.css +1 -1
  10. includes/css/events-manager-admin.scss +42 -8
  11. includes/js/admin-settings.js +35 -0
  12. includes/js/admin-settings.min.js +1 -1
  13. readme.txt +8 -2
  14. templates/formats/category_event_list_item_footer_format.php +1 -0
  15. templates/formats/category_event_list_item_format.php +1 -0
  16. templates/formats/category_event_list_item_header_format.php +1 -0
  17. templates/formats/event_excerpt_alt_format.php +1 -0
  18. templates/formats/event_excerpt_format.php +1 -0
  19. templates/formats/location_baloon_format.php +1 -0
  20. templates/formats/location_event_list_item_footer_format.php +1 -0
  21. templates/formats/location_event_list_item_format.php +1 -0
  22. templates/formats/location_event_list_item_header_format.php +1 -0
  23. templates/formats/location_excerpt_alt_format.php +1 -0
  24. templates/formats/location_excerpt_format.php +1 -0
  25. templates/formats/map_text_format.php +1 -0
  26. templates/formats/no_tags_message.php +2 -0
  27. templates/formats/single_location_format.php +1 -1
  28. templates/formats/tag_event_list_item_footer_format.php +1 -0
  29. templates/formats/tag_event_list_item_format.php +1 -0
  30. templates/formats/tag_event_list_item_header_format.php +1 -0
  31. templates/formats/tags_list_item_format_header.php +0 -0
  32. v6-migrate.php +24 -34
admin/em-options.php CHANGED
@@ -8,6 +8,8 @@ function em_options_save(){
8
  */
9
  if( current_user_can('manage_options') && !empty($_POST['em-submitted']) && check_admin_referer('events-manager-options','_wpnonce') ){
10
  //Build the array of options here
 
 
11
  foreach ($_POST as $postKey => $postValue){
12
  if( $postKey != 'dbem_data' && substr($postKey, 0, 5) == 'dbem_' ){
13
  //TODO some more validation/reporting
@@ -42,6 +44,24 @@ function em_options_save(){
42
  }
43
  }
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  //set capabilities
46
  if( !empty($_POST['em_capabilities']) && is_array($_POST['em_capabilities']) && (!is_multisite() || is_multisite() && em_wp_is_super_admin()) ){
47
  global $em_capabilities_array, $wp_roles;
8
  */
9
  if( current_user_can('manage_options') && !empty($_POST['em-submitted']) && check_admin_referer('events-manager-options','_wpnonce') ){
10
  //Build the array of options here
11
+ EM_Formats::remove_filters(true); // just in case
12
+
13
  foreach ($_POST as $postKey => $postValue){
14
  if( $postKey != 'dbem_data' && substr($postKey, 0, 5) == 'dbem_' ){
15
  //TODO some more validation/reporting
44
  }
45
  }
46
  }
47
+
48
+ // check formatting mode and optimize autoloading of formats from wp_options, first we make it all auto-loadable
49
+ global $wpdb;
50
+ $formats_to_autoload = EM_Formats::get_default_formats( true );
51
+ array_walk($formats_to_autoload, 'sanitize_key');
52
+ $wpdb->query("UPDATE {$wpdb->options} SET autoload='yes' WHERE option_name IN ('". implode("','", $formats_to_autoload) ."')");
53
+ if( get_option('dbem_advanced_formatting') < 2 ){
54
+ // now we make only the ones that we're loading from files directly non-autoloadable
55
+ $formats_to_not_autoload = EM_Formats::get_default_formats();
56
+ array_walk($formats_to_not_autoload, 'sanitize_key');
57
+ $wpdb->query("UPDATE {$wpdb->options} SET autoload='no' WHERE option_name IN ('". implode("','", $formats_to_not_autoload) ."')");
58
+ }// if set to 2 then we're just autoloading everything anyway
59
+ if( get_option('dbem_advanced_formatting') == 1 ){
60
+ $wpdb->query("UPDATE {$wpdb->options} SET autoload='yes' WHERE option_name='dbem_advanced_formatting_modes'");
61
+ }else{
62
+ $wpdb->query("UPDATE {$wpdb->options} SET autoload='no' WHERE option_name='dbem_advanced_formatting_modes'");
63
+ }
64
+
65
  //set capabilities
66
  if( !empty($_POST['em_capabilities']) && is_array($_POST['em_capabilities']) && (!is_multisite() || is_multisite() && em_wp_is_super_admin()) ){
67
  global $em_capabilities_array, $wp_roles;
admin/settings/tabs/formats.php CHANGED
@@ -1,6 +1,61 @@
1
  <?php if( !function_exists('current_user_can') || !current_user_can('manage_options') ) return; ?>
2
  <!-- FORMAT OPTIONS -->
3
- <div class="em-menu-formats em-menu-group" <?php if( !defined('EM_SETTINGS_TABS') || !EM_SETTINGS_TABS) : ?>style="display:none;"<?php endif; ?>>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  <div class="postbox " id="em-opt-events-formats" >
5
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Events', 'events-manager'); ?> </span></h3>
6
  <div class="inside">
@@ -14,33 +69,72 @@
14
  em_options_select(__('Events page grouping','events-manager'), 'dbem_event_list_groupby', $grouby_modes, __('If you choose a group by mode, your events page will display events in groups of your chosen time range.','events-manager'));
15
  em_options_input_text(__('Events page grouping header','events-manager'), 'dbem_event_list_groupby_header_format', __('Choose how to format your group headings.','events-manager').' '. sprintf(__('#s will be replaced by the date format below', 'events-manager'), 'http://codex.wordpress.org/Formatting_Date_and_Time'));
16
  em_options_input_text(__('Events page grouping date format','events-manager'), 'dbem_event_list_groupby_format', __('Choose how to format your group heading dates. Leave blank for default.','events-manager').' '. sprintf(__('Date and Time formats follow the <a href="%s">WordPress time formatting conventions</a>', 'events-manager'), 'http://codex.wordpress.org/Formatting_Date_and_Time'));
17
- em_options_textarea ( __( 'Default event list format header', 'events-manager'), 'dbem_event_list_item_format_header', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager'), true );
18
- em_options_textarea ( __( 'Default event list format', 'events-manager'), 'dbem_event_list_item_format', __( 'The format of any events in a list.', 'events-manager').$events_placeholder_tip, true );
19
- em_options_textarea ( __( 'Default event list format footer', 'events-manager'), 'dbem_event_list_item_format_footer', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager'), true );
20
- em_options_input_text ( __( 'No events message', 'events-manager'), 'dbem_no_events_message', __( 'The message displayed when no events are available.', 'events-manager') );
21
  em_options_input_text ( __( 'List events by date title', 'events-manager'), '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/>', 'events-manager') );
22
- ?>
23
- <tr class="em-header">
24
- <td colspan="2">
25
- <h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Event','events-manager')); ?></h4>
26
- <em><?php echo sprintf(__('These formats can be used on %s pages or on other areas of your site displaying an %s.','events-manager'),__('event','events-manager'),__('event','events-manager'));?></em>
27
- </tr>
28
- <?php
29
  if( EM_MS_GLOBAL && !get_option('dbem_ms_global_events_links') ){
30
- em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('event','events-manager')), 'dbem_event_page_title_format', sprintf(__( 'The format of a single %s page title.', 'events-manager'),__('event','events-manager')).' '.__( 'This is only used when showing events from other blogs.', 'events-manager').$events_placeholder_tip );
31
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('event','events-manager')), 'dbem_single_event_format', sprintf(__( 'The format used to display %s content on single pages or elsewhere on your site.', 'events-manager'),__('event','events-manager')).$events_placeholder_tip, true);
33
  ?>
34
- <tr class="em-header">
35
- <td colspan="2">
36
- <h4><?php echo sprintf(__('%s Excerpts','events-manager'),__('Event','events-manager')); ?></h4>
37
- <em><?php echo sprintf(__('These formats can be used when WordPress automatically displays %s excerpts on your site and %s is enabled in your %s settings tab.','events-manager'),__('event','events-manager'),'<strong>'.__( 'Override Excerpts with Formats?', 'events-manager').'</strong>','<a href="#formats" class="nav-tab-link" rel="#em-menu-pages">'.__('Pages','events-manager').' &gt; '.sprintf(__('%s List/Archives','events-manager'),__('Event','events-manager')).'</a>');?></em>
38
- </td>
39
- </tr>
40
- <?php
41
- em_options_textarea ( sprintf(__('%s excerpt', 'events-manager'),__('Event','events-manager')), 'dbem_event_excerpt_format', __( 'Used if an excerpt has been defined.', 'events-manager').$events_placeholder_tip );
42
- em_options_textarea ( sprintf(__('%s excerpt fallback', 'events-manager'),__('Event','events-manager')), 'dbem_event_excerpt_alt_format', __( 'Used if an excerpt has not been defined.', 'events-manager').$events_placeholder_tip );
43
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  echo $save_button;
45
  ?>
46
  </table>
@@ -182,10 +276,23 @@
182
  <?php
183
  em_options_select( __( 'Event Preview Mode', 'events-manager'), 'dbem_calendar_preview_mode', array('tooltips' => esc_html__('Tooltip', 'events-manager'), 'modal' => esc_html__('Modal Popup', 'events-manager'), 'none' => esc_html__('No Preview', 'events-manager')), __( 'Choose how to show a information about an event when clicking or hovering over a single event on the calendar.','events-manager') );
184
  em_options_select( __( 'Date Preview Mode', 'events-manager'), 'dbem_calendar_preview_mode_date', array('modal' => esc_html__('Modal Popup', 'events-manager'), 'none' => esc_html__('Direct Link', 'events-manager')), __( 'Choose whether to show a preview of the upcoming events for the date clicked on, or directly link to the calendar day.','events-manager') );
185
- em_options_textarea ( __( 'Event Modal Preview', 'events-manager'), 'dbem_calendar_preview_modal_event_format', sprintf(esc_html__( 'Used to show a single event when preview mode is set to %s.', 'events-manager'), '<code>'.esc_html__('Modal Popup', 'events-manager').'</code>'), true );
186
- em_options_textarea ( __( 'Date Events Modal Preview', 'events-manager'), 'dbem_calendar_preview_tooltip_event_format', sprintf(esc_html__( 'Used to format each event in a list when previewing a single date.', 'events-manager'), '<code>'.esc_html__('Tooltip', 'events-manager').'</code>'), true );
187
- em_options_textarea ( __( 'Event Modal Preview', 'events-manager'), 'dbem_calendar_preview_modal_date_format', sprintf(esc_html__( 'Used to show a single event when preview mode is set to %s.', 'events-manager'), '<code>'.esc_html__('Modal Popup', 'events-manager').'</code>'), true );
 
 
 
 
 
 
 
 
 
 
188
  ?>
 
 
 
189
  <tr class="em-header"><td colspan="2"><h4><?php _e('Full-Size Calendar','events-manager'); ?></h4></td></tr>
190
  <?php
191
  $large_tip = sprintf(esc_html__('This setting will be applied if you choose to specifically show a size %s calendar.', 'events-manager'), esc_html__('large', 'events-manager'));
@@ -239,7 +346,7 @@
239
  <em><?php _e('When Events Manager displays lists of events the default behavior is ordering by start date in ascending order. To change this, modify the values above.','events-manager'); ?></em>
240
  </td>
241
  </tr>
242
- <?php
243
  em_options_input_text ( __( 'Calendar events/day limit', 'events-manager'), 'dbem_display_calendar_events_limit', __( 'Limits the number of events on each calendar day. Leave blank for no limit.', 'events-manager') );
244
  em_options_input_text ( __( 'More Events message', 'events-manager'), 'dbem_display_calendar_events_limit_msg', __( 'Text with link to calendar day page with all events for that day if there are more events than the limit above, leave blank for no link as the day number is also a link.', 'events-manager') );
245
  ?>
@@ -261,41 +368,80 @@
261
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Locations', 'events-manager'); ?> </span></h3>
262
  <div class="inside">
263
  <table class="form-table">
264
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Locations','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
265
  <?php
266
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('locations','events-manager')), true );
267
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('locations','events-manager')).$locations_placeholder_tip, true );
268
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('locations','events-manager')), true );
269
- em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Locations','events-manager')), 'dbem_no_locations_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('locations','events-manager')) );
270
  ?>
271
- <tr class="em-header">
272
- <td colspan="2">
273
- <h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Location','events-manager')); ?></h4>
274
- <em><?php echo sprintf(__('These formats can be used on %s pages or on other areas of your site displaying an %s.','events-manager'),__('location','events-manager'),__('location','events-manager'));?></em>
275
- </tr>
276
- <?php
 
 
 
 
 
 
 
 
 
277
  if( EM_MS_GLOBAL && get_option('dbem_ms_global_location_links') ){
278
  em_options_input_text (sprintf( __( 'Single %s title format', 'events-manager'),__('location','events-manager')), 'dbem_location_page_title_format', sprintf(__( 'The format of a single %s page title.', 'events-manager'),__('location','events-manager')).$locations_placeholder_tip );
279
  }
280
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('location','events-manager')), 'dbem_single_location_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('location','events-manager')).$locations_placeholder_tip, true );
281
  ?>
282
- <tr class="em-header">
283
- <td colspan="2">
284
- <h4><?php echo sprintf(__('%s Excerpts','events-manager'),__('Location','events-manager')); ?></h4>
285
- <em><?php echo sprintf(__('These formats can be used when WordPress automatically displays %s excerpts on your site and %s is enabled in your %s settings tab.','events-manager'),__('location','events-manager'),'<strong>'.__( 'Override Excerpts with Formats?', 'events-manager').'</strong>','<a href="#formats" class="nav-tab-link" rel="#em-menu-pages">'.__('Pages','events-manager').' &gt; '.sprintf(__('%s List/Archives','events-manager'),__('Location','events-manager')).'</a>');?></em>
286
- </td>
287
- </tr>
288
- <?php
289
- em_options_textarea ( sprintf(__('%s excerpt', 'events-manager'),__('Location','events-manager')), 'dbem_location_excerpt_format', __( 'Used if an excerpt has been defined.', 'events-manager').$locations_placeholder_tip );
290
- em_options_textarea ( sprintf(__('%s excerpt fallback', 'events-manager'),__('Location','events-manager')), 'dbem_location_excerpt_alt_format', __( 'Used if an excerpt has not been defined.', 'events-manager').$locations_placeholder_tip );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  ?>
292
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
 
 
 
 
 
293
  <?php
294
- em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_location_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager') );
295
- em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_location_event_list_item_format', sprintf(__( 'The format of the events the list inserted in the location page through the %s element.', 'events-manager').$events_placeholder_tip, '<code>#_LOCATIONNEXTEVENTS</code>, <code>#_LOCATIONPASTEVENTS</code>, <code>#_LOCATIONALLEVENTS</code>') );
296
- em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_location_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager') );
297
- em_options_textarea ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_location_no_events_message', sprintf(__( 'The message to be displayed in the list generated by %s when no events are available.', 'events-manager'), '<code>#_LOCATIONNEXTEVENTS</code>, <code>#_LOCATIONPASTEVENTS</code>, <code>#_LOCATIONALLEVENTS</code>') );
298
  ?>
 
 
 
299
  <tr class="em-header"><td colspan="2">
300
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
301
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_LOCATIONNEXTEVENT</code>'); ?></p>
@@ -318,25 +464,60 @@
318
  <?php
319
  em_options_input_text(sprintf(esc_html__('Default %s color','events-manager'), esc_html__('category','events-manager')), 'dbem_category_default_color', sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>'));
320
  ?>
321
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Categories','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
322
  <?php
323
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('categories','events-manager')), true );
324
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('categories','events-manager')).$categories_placeholder_tip, true );
325
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('categories','events-manager')), true );
326
- em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Categories','events-manager')), 'dbem_no_categories_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('categories','events-manager')) );
327
  ?>
328
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Category','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
329
  <?php
330
- em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('category','events-manager')), 'dbem_category_page_title_format', __( 'The format of a single category page title.', 'events-manager').$categories_placeholder_tip );
331
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('category','events-manager')), 'dbem_category_page_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('category','events-manager')).$categories_placeholder_tip, true );
332
  ?>
333
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  <?php
335
- em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_category_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager') );
336
- em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_category_event_list_item_format', sprintf(__( 'The format of the events the list inserted in the category page through the %s element.', 'events-manager').$events_placeholder_tip, '<code>#_CATEGORYPASTEVENTS</code>, <code>#_CATEGORYNEXTEVENTS</code>, <code>#_CATEGORYALLEVENTS</code>') );
337
- em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_category_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager') );
338
- em_options_textarea ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_category_no_events_message', sprintf(__( 'The message to be displayed in the list generated by %s when no events are available.', 'events-manager'), '<code>#_CATEGORYPASTEVENTS</code>, <code>#_CATEGORYNEXTEVENTS</code>, <code>#_CATEGORYALLEVENTS</code>') );
339
  ?>
 
 
 
340
  <tr class="em-header"><td colspan="2">
341
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
342
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_CATEGORYNEXTEVENT</code>'); ?></p>
@@ -359,25 +540,58 @@
359
  <?php
360
  em_options_input_text(sprintf(esc_html__('Default %s color','events-manager'), esc_html__('tag','events-manager')), 'dbem_tag_default_color', sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>'));
361
  ?>
362
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Tags','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
363
  <?php
364
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('tags','events-manager')), true );
365
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('tags','events-manager')).$categories_placeholder_tip, true);
366
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('tags','events-manager')), true );
367
- em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Tags','events-manager')), 'dbem_no_tags_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('tags','events-manager')) );
368
  ?>
369
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Tag','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
370
  <?php
371
- em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('tag','events-manager')), 'dbem_tag_page_title_format', __( 'The format of a single tag page title.', 'events-manager').$categories_placeholder_tip );
372
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('tag','events-manager')), 'dbem_tag_page_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('tag','events-manager')).$categories_placeholder_tip, true );
373
  ?>
374
- <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  <?php
376
- em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_tag_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager') );
377
- em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_tag_event_list_item_format', __( 'The format of the events the list inserted in the tag page through the <code>#_TAGNEXTEVENTS</code>, <code>#_TAGNEXTEVENTS</code> and <code>#_TAGALLEVENTS</code> element.', 'events-manager').$categories_placeholder_tip );
378
- em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_tag_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager') );
379
- em_options_textarea ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_tag_no_events_message', __( 'The message to be displayed in the list generated by <code>#_TAGNEXTEVENTS</code>, <code>#_TAGNEXTEVENTS</code> and <code>#_TAGALLEVENTS</code> when no events are available.', 'events-manager') );
380
  ?>
 
 
 
381
  <tr class="em-header"><td colspan="2">
382
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
383
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_TAGNEXTEVENT</code>'); ?></p>
@@ -463,19 +677,30 @@
463
  <?php em_options_input_text(__('Default map width','events-manager'), 'dbem_map_default_width', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?>
464
  <?php em_options_input_text(__('Default map height','events-manager'), 'dbem_map_default_height', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?>
465
  </tr>
466
- <tr class="em-header"><td colspan="2">
467
- <h4><?php _e('Global Map Format','events-manager'); ?></h4>
468
- <p><?php echo sprintf(__('If you use the %s <a href="%s">shortcode</a>, you can display a map of all your locations and events, the settings below will be used.','events-manager'), '<code>[locations_map]</code>','http://wp-events-plugin.com/documentation/shortcodes/'); ?></p>
469
- </td></tr>
470
- <?php
471
- em_options_textarea ( __( 'Location balloon format', 'events-manager'), 'dbem_map_text_format', __( 'The format of the text appearing in the balloon describing the location.', 'events-manager').' '.__( 'Event.', 'events-manager').$locations_placeholder_tip );
472
- ?>
473
- <tr class="em-header"><td colspan="2">
474
- <h4><?php _e('Single Location/Event Map Format','events-manager'); ?></h4>
475
- <p><?php echo sprintf(_e('If you use the <code>#_LOCATIONMAP</code> <a href="%s">placeholder</a> when displaying individual event and location information, the settings below will be used.','events-manager'), '<code>[locations_map]</code>','http://wp-events-plugin.com/documentation/placeholders/'); ?></p>
476
- </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
477
  <?php
478
- em_options_textarea ( __( 'Location balloon format', 'events-manager'), 'dbem_location_baloon_format', __( 'The format of the text appearing in the balloon describing the location.', 'events-manager').$events_placeholder_tip );
479
  echo $save_button;
480
  ?>
481
  </table>
1
  <?php if( !function_exists('current_user_can') || !current_user_can('manage_options') ) return; ?>
2
  <!-- FORMAT OPTIONS -->
3
+ <div class="em-menu-formats em-menu-group" <?php if( !defined('EM_SETTINGS_TABS') || !EM_SETTINGS_TABS) : ?>style="display:none;"<?php endif; ?>>
4
+
5
+ <?php
6
+ $current_status = absint(get_option('dbem_advanced_formatting'));
7
+ $disabled_text = __('Disabled', 'events-manager');
8
+ $enabled_text = __('Enabled', 'events-manager');
9
+ $current_text = $current_status ? '<span class="status enabled">('. $enabled_text .')</span>' : '<span class="status disabled">('.$disabled_text.')</span>';
10
+ ?>
11
+ <div class="postbox em-postbox-notice em-postbox-notice-info" id="em-opt-advanced-formatting" data-enabled-text="(<?php echo esc_attr($enabled_text); ?>)" data-disabled-text="(<?php echo esc_attr($disabled_text); ?>)">
12
+ <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Advanced Mode', 'events-manager'); ?> <?php echo $current_text ?></span></h3>
13
+ <div class="inside">
14
+ <input type="hidden" name="dbem_advanced_formatting" id="em-advanced-formatting" value="<?php echo $current_status; ?>">
15
+ <div>
16
+ <?php
17
+ $advanced_mode = esc_html__('Advanced Mode', 'events-manager');
18
+ $advanced_mode_super = esc_html__('Super Advanced Mode', 'events-manager');
19
+ $disable_text = sprintf(esc_html__('Disable %s', 'events-manager'), $advanced_mode);
20
+ $enable_text = sprintf(esc_html__('Enable %s', 'events-manager'), $advanced_mode);
21
+ ?>
22
+ <p>
23
+ <a href="#" class="em-af-toggle button-primary show-0" data-set-status="1"><?php echo $enable_text; ?></a>
24
+ <a href="#" class="em-af-toggle button-secondary show-1 show-2" data-set-status="0"><?php echo $disable_text; ?></a>
25
+ </p>
26
+ <?php
27
+ $disable_text = sprintf(esc_html__('Disable %s', 'events-manager'), $advanced_mode_super);
28
+ $enable_text = sprintf(esc_html__('Enable %s', 'events-manager'), $advanced_mode_super);
29
+ $current_text = $current_status ? $disable_text : $enable_text;
30
+ ?>
31
+ <a href="#" class="em-af-toggle button-secondary show-2" data-set-status="1"><?php echo $disable_text; ?></a>
32
+ <a href="#" class="em-af-toggle button-primary show-1 show-0" data-set-status="2"><?php echo $enable_text; ?></a>
33
+ </div>
34
+ <div>
35
+ <?php
36
+ $am = '<code>'. $advanced_mode .'</code>';
37
+ $sam = '<code>'.$advanced_mode_super.'</code>';
38
+ ?>
39
+ <p class="em-af-status" data-status="<?php echo $current_status; ?>">
40
+ <span class="em-af-status-0"><?php echo sprintf( esc_html__('You have currently disabled %s', 'events-manager'), $am ); ?></span>
41
+ <span class="em-af-status-1"><?php echo sprintf( esc_html__('You have currently enabled %s', 'events-manager'), $am ); ?></span>
42
+ <span class="em-af-status-2"><?php echo sprintf( esc_html__('You have currently enabled %s', 'events-manager'), $sam ); ?></span>
43
+ <span class="em-af-status-save"><?php esc_html_e('Save your settings for this to take effect!', 'events-manager'); ?></span>
44
+ </p>
45
+ <p>
46
+ <?php echo sprintf(esc_html__("%s allows you to modify some or all of the formats used by Events Manager to generate your content. You can choose to override default formats and customize them to your needs. You do not lose your previously defined custom formats should you enable/disable %s or choose to not override a certain set of formats, they'll appear again once you enable %s again for that content.", 'events-manager'), $am, $am, $am); ?>
47
+ </p>
48
+ <p>
49
+ <?php echo sprintf(esc_html__("%s overrides all formatting choices, which will be be taken from the settings defined on this page. If you want to override only certain formatting, choose the %s instead.", 'events-manager'), $sam, $am); ?>
50
+ </p>
51
+ <p>
52
+ <?php esc_html_e('Clicking these buttons will not have any effect until you save your settings!', 'events-manager'); ?>
53
+ </p>
54
+ </div>
55
+
56
+ </div>
57
+ </div>
58
+
59
  <div class="postbox " id="em-opt-events-formats" >
60
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Events', 'events-manager'); ?> </span></h3>
61
  <div class="inside">
69
  em_options_select(__('Events page grouping','events-manager'), 'dbem_event_list_groupby', $grouby_modes, __('If you choose a group by mode, your events page will display events in groups of your chosen time range.','events-manager'));
70
  em_options_input_text(__('Events page grouping header','events-manager'), 'dbem_event_list_groupby_header_format', __('Choose how to format your group headings.','events-manager').' '. sprintf(__('#s will be replaced by the date format below', 'events-manager'), 'http://codex.wordpress.org/Formatting_Date_and_Time'));
71
  em_options_input_text(__('Events page grouping date format','events-manager'), 'dbem_event_list_groupby_format', __('Choose how to format your group heading dates. Leave blank for default.','events-manager').' '. sprintf(__('Date and Time formats follow the <a href="%s">WordPress time formatting conventions</a>', 'events-manager'), 'http://codex.wordpress.org/Formatting_Date_and_Time'));
 
 
 
 
72
  em_options_input_text ( __( 'List events by date title', 'events-manager'), '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/>', 'events-manager') );
 
 
 
 
 
 
 
73
  if( EM_MS_GLOBAL && !get_option('dbem_ms_global_events_links') ){
74
+ em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('event','events-manager')), 'dbem_event_page_title_format', sprintf(__( 'The format of a single %s page title.', 'events-manager'),__('event','events-manager')).' '.__( 'This is only used when showing events from other blogs.', 'events-manager').$events_placeholder_tip );
75
  }
76
+ ?>
77
+
78
+ <tr class="em-subheader"><td colspan="2"><h5><?php esc_html_e( 'Event List Formats', 'events-manager'); ?></h5></td></tr>
79
+ <?php
80
+ em_options_input_text ( __( 'No events message', 'events-manager'), 'dbem_no_events_message', __( 'The message displayed when no events are available.', 'events-manager') );
81
+ ?>
82
+
83
+ <!-- ADVANCED Formatting -->
84
+ <tbody class="am-af">
85
+ <?php
86
+ em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[events-list]', '', '', '.am-af-events-list' );
87
+ ?>
88
+ </tbody>
89
+ <tbody class="am-af am-af-events-list">
90
+ <?php
91
+ em_options_textarea ( __( 'Default event list format header', 'events-manager'), 'dbem_event_list_item_format_header', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager'), true );
92
+ em_options_textarea ( __( 'Default event list format', 'events-manager'), 'dbem_event_list_item_format', __( 'The format of any events in a list.', 'events-manager').$events_placeholder_tip, true );
93
+ em_options_textarea ( __( 'Default event list format footer', 'events-manager'), 'dbem_event_list_item_format_footer', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager'), true );
94
+ ?>
95
+ </tbody>
96
+ <!-- /ADVANCED Formatting -->
97
+
98
+ <!-- ADVANCED Formatting -->
99
+ <tbody class="am-af">
100
+ <tr class="em-header">
101
+ <td colspan="2">
102
+ <h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Event','events-manager')); ?></h4>
103
+ <em><?php echo sprintf(__('These formats can be used on %s pages or on other areas of your site displaying an %s.','events-manager'),__('event','events-manager'),__('event','events-manager'));?></em>
104
+ </td>
105
+ </tr>
106
+ <?php
107
+ em_options_radio_binary(__('Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[event-single]', '', '', '.am-af-event-single');
108
+ ?>
109
+ </tbody>
110
+ <tbody class="am-af am-af-event-single">
111
+ <?php
112
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('event','events-manager')), 'dbem_single_event_format', sprintf(__( 'The format used to display %s content on single pages or elsewhere on your site.', 'events-manager'),__('event','events-manager')).$events_placeholder_tip, true);
113
  ?>
114
+ </tbody>
115
+ <!-- /ADVANCED Formatting -->
116
+
117
+ <!-- ADVANCED Formatting -->
118
+ <tbody class="am-af">
119
+ <tr class="em-header">
120
+ <td colspan="2">
121
+ <h4><?php echo sprintf(__('%s Excerpts','events-manager'),__('Event','events-manager')); ?></h4>
122
+ <em><?php echo sprintf(__('These formats can be used when WordPress automatically displays %s excerpts on your site and %s is enabled in your %s settings tab.','events-manager'),__('event','events-manager'),'<strong>'.__( 'Override Excerpts with Formats?', 'events-manager').'</strong>','<a href="#formats" class="nav-tab-link" rel="#em-menu-pages">'.__('Pages','events-manager').' &gt; '.sprintf(__('%s List/Archives','events-manager'),__('Event','events-manager')).'</a>');?></em>
123
+ </td>
124
+ </tr>
125
+ <?php
126
+ em_options_radio_binary(__('Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[event-excerpt]', '', '', '.am-af-event-excerpt');
127
+ ?>
128
+ </tbody>
129
+ <tbody class="am-af am-af-event-excerpt">
130
+ <?php
131
+ em_options_textarea ( sprintf(__('%s excerpt', 'events-manager'),__('Event','events-manager')), 'dbem_event_excerpt_format', __( 'Used if an excerpt has been defined.', 'events-manager').$events_placeholder_tip, true );
132
+ em_options_textarea ( sprintf(__('%s excerpt fallback', 'events-manager'),__('Event','events-manager')), 'dbem_event_excerpt_alt_format', __( 'Used if an excerpt has not been defined.', 'events-manager').$events_placeholder_tip, true );
133
+ ?>
134
+ </tbody>
135
+ <!-- /ADVANCED Formatting -->
136
+
137
+ <?php
138
  echo $save_button;
139
  ?>
140
  </table>
276
  <?php
277
  em_options_select( __( 'Event Preview Mode', 'events-manager'), 'dbem_calendar_preview_mode', array('tooltips' => esc_html__('Tooltip', 'events-manager'), 'modal' => esc_html__('Modal Popup', 'events-manager'), 'none' => esc_html__('No Preview', 'events-manager')), __( 'Choose how to show a information about an event when clicking or hovering over a single event on the calendar.','events-manager') );
278
  em_options_select( __( 'Date Preview Mode', 'events-manager'), 'dbem_calendar_preview_mode_date', array('modal' => esc_html__('Modal Popup', 'events-manager'), 'none' => esc_html__('Direct Link', 'events-manager')), __( 'Choose whether to show a preview of the upcoming events for the date clicked on, or directly link to the calendar day.','events-manager') );
279
+ ?>
280
+
281
+ <!-- ADVANCED Formatting -->
282
+ <tbody class="am-af">
283
+ <?php
284
+ em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[calendar-previews]', '', '', '.am-af-calendar-previews' );
285
+ ?>
286
+ </tbody>
287
+ <tbody class="am-af am-af-calendar-previews">
288
+ <?php
289
+ em_options_textarea ( __( 'Event modal preview format', 'events-manager'), 'dbem_calendar_preview_modal_event_format', sprintf(esc_html__( 'Used to show a single event when preview mode is set to %s.', 'events-manager'), '<code>'.esc_html__('Modal Popup', 'events-manager').'</code>'), true );
290
+ em_options_textarea ( __( 'Event tooltip preview format', 'events-manager'), 'dbem_calendar_preview_tooltip_event_format', sprintf(esc_html__( 'Used to show a single event when preview mode is set to %s.', 'events-manager'), '<code>'.esc_html__('Tooltip', 'events-manager').'</code>'), true );
291
+ em_options_textarea ( __( 'Events date modal preview format', 'events-manager'), 'dbem_calendar_preview_modal_date_format', esc_html__( 'Used to format each event in a list when previewing a single date in a modal popup.', 'events-manager'), true );
292
  ?>
293
+ </tbody>
294
+ <!-- /ADVANCED Formatting -->
295
+
296
  <tr class="em-header"><td colspan="2"><h4><?php _e('Full-Size Calendar','events-manager'); ?></h4></td></tr>
297
  <?php
298
  $large_tip = sprintf(esc_html__('This setting will be applied if you choose to specifically show a size %s calendar.', 'events-manager'), esc_html__('large', 'events-manager'));
346
  <em><?php _e('When Events Manager displays lists of events the default behavior is ordering by start date in ascending order. To change this, modify the values above.','events-manager'); ?></em>
347
  </td>
348
  </tr>
349
+ <?php
350
  em_options_input_text ( __( 'Calendar events/day limit', 'events-manager'), 'dbem_display_calendar_events_limit', __( 'Limits the number of events on each calendar day. Leave blank for no limit.', 'events-manager') );
351
  em_options_input_text ( __( 'More Events message', 'events-manager'), 'dbem_display_calendar_events_limit_msg', __( 'Text with link to calendar day page with all events for that day if there are more events than the limit above, leave blank for no link as the day number is also a link.', 'events-manager') );
352
  ?>
368
  <div class="handlediv" title="<?php __('Click to toggle', 'events-manager'); ?>"><br /></div><h3><span><?php _e ( 'Locations', 'events-manager'); ?> </span></h3>
369
  <div class="inside">
370
  <table class="form-table">
371
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Locations','events-manager')); ?></h4></td></tr>
372
+ <?php
373
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Locations','events-manager')), 'dbem_no_locations_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('locations','events-manager')) );
374
+ ?>
375
+
376
+ <!-- ADVANCED Formatting -->
377
+ <tbody class="am-af">
378
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[locations-list]', '', '', '.am-af-locations-list' ); ?>
379
+ </tbody>
380
+ <tbody class="am-af am-af-locations-list">
381
  <?php
382
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('locations','events-manager')), true );
383
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('locations','events-manager')).$locations_placeholder_tip, true );
384
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Locations','events-manager')), 'dbem_location_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('locations','events-manager')), true );
 
385
  ?>
386
+ </tbody>
387
+ <!-- /ADVANCED Formatting -->
388
+
389
+ <!-- ADVANCED Formatting -->
390
+ <tbody class="am-af">
391
+ <tr class="em-header">
392
+ <td colspan="2">
393
+ <h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Location','events-manager')); ?></h4>
394
+ <em><?php echo sprintf(__('These formats can be used on %s pages or on other areas of your site displaying an %s.','events-manager'),__('location','events-manager'),__('location','events-manager'));?></em>
395
+ </td>
396
+ </tr>
397
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[location-single]', '', '', '.am-af-location-single' ); ?>
398
+ </tbody>
399
+ <tbody class="am-af am-af-location-single">
400
+ <?php
401
  if( EM_MS_GLOBAL && get_option('dbem_ms_global_location_links') ){
402
  em_options_input_text (sprintf( __( 'Single %s title format', 'events-manager'),__('location','events-manager')), 'dbem_location_page_title_format', sprintf(__( 'The format of a single %s page title.', 'events-manager'),__('location','events-manager')).$locations_placeholder_tip );
403
  }
404
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('location','events-manager')), 'dbem_single_location_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('location','events-manager')).$locations_placeholder_tip, true );
405
  ?>
406
+ </tbody>
407
+ <!-- /ADVANCED Formatting -->
408
+
409
+ <!-- ADVANCED Formatting -->
410
+ <tbody class="am-af">
411
+ <tr class="em-header">
412
+ <td colspan="2">
413
+ <h4><?php echo sprintf(__('%s Excerpts','events-manager'),__('Location','events-manager')); ?></h4>
414
+ <em><?php echo sprintf(__('These formats can be used when WordPress automatically displays %s excerpts on your site and %s is enabled in your %s settings tab.','events-manager'),__('location','events-manager'),'<strong>'.__( 'Override Excerpts with Formats?', 'events-manager').'</strong>','<a href="#formats" class="nav-tab-link" rel="#em-menu-pages">'.__('Pages','events-manager').' &gt; '.sprintf(__('%s List/Archives','events-manager'),__('Location','events-manager')).'</a>');?></em>
415
+ </td>
416
+ </tr>
417
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[location-excerpt]', '', '', '.am-af-location-excerpt' ); ?>
418
+ </tbody>
419
+ <tbody class="am-af am-af-location-excerpt">
420
+ <?php
421
+ em_options_textarea ( sprintf(__('%s excerpt', 'events-manager'),__('Location','events-manager')), 'dbem_location_excerpt_format', __( 'Used if an excerpt has been defined.', 'events-manager').$locations_placeholder_tip, true );
422
+ em_options_textarea ( sprintf(__('%s excerpt fallback', 'events-manager'),__('Location','events-manager')), 'dbem_location_excerpt_alt_format', __( 'Used if an excerpt has not been defined.', 'events-manager').$locations_placeholder_tip, true );
423
+ ?>
424
+ </tbody>
425
+ <!-- /ADVANCED Formatting -->
426
+
427
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
428
+ <?php
429
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_location_no_events_message', sprintf(__( 'The message to be displayed in the list generated by %s when no events are available.', 'events-manager'), '<code>#_LOCATIONNEXTEVENTS</code>, <code>#_LOCATIONPASTEVENTS</code>, <code>#_LOCATIONALLEVENTS</code>') );
430
  ?>
431
+
432
+ <!-- ADVANCED Formatting -->
433
+ <tbody class="am-af">
434
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[location-event-lists]', '', '', '.am-af-location-event-lists' ); ?>
435
+ </tbody>
436
+ <tbody class="am-af am-af-location-event-lists">
437
  <?php
438
+ em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_location_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager') , '', true );
439
+ em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_location_event_list_item_format', sprintf(__( 'The format of the events the list inserted in the location page through the %s element.', 'events-manager').$events_placeholder_tip, '<code>#_LOCATIONNEXTEVENTS</code>, <code>#_LOCATIONPASTEVENTS</code>, <code>#_LOCATIONALLEVENTS</code>') , true );
440
+ em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_location_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager') , '', true );
 
441
  ?>
442
+ </tbody>
443
+ <!-- /ADVANCED Formatting -->
444
+
445
  <tr class="em-header"><td colspan="2">
446
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
447
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_LOCATIONNEXTEVENT</code>'); ?></p>
464
  <?php
465
  em_options_input_text(sprintf(esc_html__('Default %s color','events-manager'), esc_html__('category','events-manager')), 'dbem_category_default_color', sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>'));
466
  ?>
467
+
468
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Categories','events-manager')); ?></h4></td></tr>
469
+ <?php
470
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Categories','events-manager')), 'dbem_no_categories_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('categories','events-manager')) );
471
+ ?>
472
+
473
+ <!-- ADVANCED Formatting -->
474
+ <tbody class="am-af">
475
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[categories-list]', '', '', '.am-af-categories-list' ); ?>
476
+ </tbody>
477
+ <tbody class="am-af am-af-categories-list">
478
  <?php
479
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('categories','events-manager')), true );
480
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('categories','events-manager')).$categories_placeholder_tip, true );
481
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Categories','events-manager')), 'dbem_categories_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('categories','events-manager')), true );
 
482
  ?>
483
+ </tbody>
484
+ <!-- /ADVANCED Formatting -->
485
+
486
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Category','events-manager')); ?></h4></td></tr>
487
+ <?php
488
+ em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('category','events-manager')), 'dbem_category_page_title_format', __( 'The format of a single category page title.', 'events-manager').$categories_placeholder_tip );
489
+ ?>
490
+
491
+ <!-- ADVANCED Formatting -->
492
+ <tbody class="am-af">
493
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[category-single]', '', '', '.am-af-category-single' ); ?>
494
+ </tbody>
495
+ <tbody class="am-af am-af-category-single">
496
  <?php
 
497
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('category','events-manager')), 'dbem_category_page_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('category','events-manager')).$categories_placeholder_tip, true );
498
  ?>
499
+ </tbody>
500
+ <!-- /ADVANCED Formatting -->
501
+
502
+
503
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
504
+ <?php
505
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_category_no_events_message', sprintf(__( 'The message to be displayed in the list generated by %s when no events are available.', 'events-manager'), '<code>#_CATEGORYPASTEVENTS</code>, <code>#_CATEGORYNEXTEVENTS</code>, <code>#_CATEGORYALLEVENTS</code>') );
506
+ ?>
507
+
508
+ <!-- ADVANCED Formatting -->
509
+ <tbody class="am-af">
510
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[category-events-list]', '', '', '.am-af-category-events-list' ); ?>
511
+ </tbody>
512
+ <tbody class="am-af am-af-category-events-list">
513
  <?php
514
+ em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_category_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager'), '', true );
515
+ em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_category_event_list_item_format', sprintf(__( 'The format of the events the list inserted in the category page through the %s element.', 'events-manager').$events_placeholder_tip, '<code>#_CATEGORYPASTEVENTS</code>, <code>#_CATEGORYNEXTEVENTS</code>, <code>#_CATEGORYALLEVENTS</code>'), true );
516
+ em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_category_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager'), '', true );
 
517
  ?>
518
+ </tbody>
519
+ <!-- /ADVANCED Formatting -->
520
+
521
  <tr class="em-header"><td colspan="2">
522
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
523
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_CATEGORYNEXTEVENT</code>'); ?></p>
540
  <?php
541
  em_options_input_text(sprintf(esc_html__('Default %s color','events-manager'), esc_html__('tag','events-manager')), 'dbem_tag_default_color', sprintf(esc_html_x('Colors must be in a valid %s format, such as #FF00EE.', 'hex format', 'events-manager'), '<a href="http://en.wikipedia.org/wiki/Web_colors">hex</a>'));
542
  ?>
543
+
544
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s Page','events-manager'),__('Tags','events-manager')); ?></h4></td></tr>
545
+ <?php
546
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('Tags','events-manager')), 'dbem_no_tags_message', sprintf( __( 'The message displayed when no %s are available.', 'events-manager'), __('tags','events-manager')) );
547
+ ?>
548
+
549
+ <!-- ADVANCED Formatting -->
550
+ <tbody class="am-af">
551
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[tags-list]', '', '', '.am-af-tags-list' ); ?>
552
+ </tbody>
553
+ <tbody class="am-af am-af-tags-list">
554
  <?php
555
  em_options_textarea ( sprintf(__('%s list header format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format_header', sprintf(__( 'This content will appear just above your code for the %s list format below. Default is blank', 'events-manager'), __('tags','events-manager')), true );
556
  em_options_textarea ( sprintf(__('%s list item format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format', sprintf(__( 'The format of a single %s in a list.', 'events-manager'), __('tags','events-manager')).$categories_placeholder_tip, true);
557
  em_options_textarea ( sprintf(__('%s list footer format','events-manager'),__('Tags','events-manager')), 'dbem_tags_list_item_format_footer', sprintf(__( 'This content will appear just below your code for the %s list format above. Default is blank', 'events-manager'), __('tags','events-manager')), true );
 
558
  ?>
559
+ </tbody>
560
+ <!-- /ADVANCED Formatting -->
561
+
562
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('Single %s Page','events-manager'),__('Tag','events-manager')); ?></h4></td></tr>
563
+ <?php em_options_input_text ( sprintf(__( 'Single %s title format', 'events-manager'),__('tag','events-manager')), 'dbem_tag_page_title_format', __( 'The format of a single tag page title.', 'events-manager').$categories_placeholder_tip ); ?>
564
+
565
+ <!-- ADVANCED Formatting -->
566
+ <tbody class="am-af">
567
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[tag-single]', '', '', '.am-af-tag-single' ); ?>
568
+ </tbody>
569
+ <tbody class="am-af am-af-tag-single">
570
  <?php
 
571
  em_options_textarea ( sprintf(__('Single %s page format', 'events-manager'),__('tag','events-manager')), 'dbem_tag_page_format', sprintf(__( 'The format of a single %s page.', 'events-manager'),__('tag','events-manager')).$categories_placeholder_tip, true );
572
  ?>
573
+ </tbody>
574
+ <!-- /ADVANCED Formatting -->
575
+
576
+ <tr class="em-header"><td colspan="2"><h4><?php echo sprintf(__('%s List Formats','events-manager'),__('Event','events-manager')); ?></h4></td></tr>
577
+ <?php
578
+ em_options_input_text ( sprintf(__( 'No %s message', 'events-manager'),__('events','events-manager')), 'dbem_tag_no_events_message', __( 'The message to be displayed in the list generated by <code>#_TAGNEXTEVENTS</code>, <code>#_TAGNEXTEVENTS</code> and <code>#_TAGALLEVENTS</code> when no events are available.', 'events-manager') );
579
+ ?>
580
+
581
+ <!-- ADVANCED Formatting -->
582
+ <tbody class="am-af">
583
+
584
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[tag-events-list]', '', '', '.am-af-tag-events-list' ); ?>
585
+ </tbody>
586
+ <tbody class="am-af am-af-tag-events-list">
587
  <?php
588
+ em_options_input_text ( __( 'Default event list format header', 'events-manager'), 'dbem_tag_event_list_item_header_format', __( 'This content will appear just above your code for the default event list format. Default is blank', 'events-manager'), '', true );
589
+ em_options_textarea ( sprintf(__( 'Default %s list format', 'events-manager'),__('events','events-manager')), 'dbem_tag_event_list_item_format', __( 'The format of the events the list inserted in the tag page through the <code>#_TAGNEXTEVENTS</code>, <code>#_TAGNEXTEVENTS</code> and <code>#_TAGALLEVENTS</code> element.', 'events-manager').$categories_placeholder_tip, true );
590
+ em_options_input_text ( __( 'Default event list format footer', 'events-manager'), 'dbem_tag_event_list_item_footer_format', __( 'This content will appear just below your code for the default event list format. Default is blank', 'events-manager'), '', true );
 
591
  ?>
592
+ </tbody>
593
+ <!-- /ADVANCED Formatting -->
594
+
595
  <tr class="em-header"><td colspan="2">
596
  <h4><?php echo sprintf(__('Single %s Format','events-manager'),__('Event','events-manager')); ?></h4>
597
  <p><?php echo sprintf(__('The settings below are used when using the %s placeholder','events-manager'), '<code>#_TAGNEXTEVENT</code>'); ?></p>
677
  <?php em_options_input_text(__('Default map width','events-manager'), 'dbem_map_default_width', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?>
678
  <?php em_options_input_text(__('Default map height','events-manager'), 'dbem_map_default_height', sprintf(__('Can be in form of pixels or a percentage such as %s or %s.', 'events-manager'), '<code>100%</code>', '<code>100px</code>')); ?>
679
  </tr>
680
+
681
+ <!-- ADVANCED Formatting -->
682
+ <tbody class="am-af">
683
+ <?php em_options_radio_binary ( __( 'Override Default Formats?', 'events-manager'), 'dbem_advanced_formatting_modes[maps]', '', '', '.am-af-maps' ); ?>
684
+ </tbody>
685
+ <tbody class="am-af am-af-maps">
686
+ <tr class="em-header"><td colspan="2">
687
+ <h4><?php _e('Global Map Format','events-manager'); ?></h4>
688
+ <p><?php echo sprintf(__('If you use the %s <a href="%s">shortcode</a>, you can display a map of all your locations and events, the settings below will be used.','events-manager'), '<code>[locations_map]</code>','http://wp-events-plugin.com/documentation/shortcodes/'); ?></p>
689
+ </td></tr>
690
+ <?php
691
+ em_options_textarea ( __( 'Location balloon format', 'events-manager'), 'dbem_map_text_format', __( 'The format of the text appearing in the balloon describing the location.', 'events-manager').' '.__( 'Event.', 'events-manager').$locations_placeholder_tip, true );
692
+ ?>
693
+ <tr class="em-header"><td colspan="2">
694
+ <h4><?php _e('Single Location/Event Map Format','events-manager'); ?></h4>
695
+ <p><?php echo sprintf(_e('If you use the <code>#_LOCATIONMAP</code> <a href="%s">placeholder</a> when displaying individual event and location information, the settings below will be used.','events-manager'), '<code>[locations_map]</code>','http://wp-events-plugin.com/documentation/placeholders/'); ?></p>
696
+ </td></tr>
697
+ <?php
698
+ em_options_textarea ( __( 'Location balloon format', 'events-manager'), 'dbem_location_baloon_format', __( 'The format of the text appearing in the balloon describing the location.', 'events-manager').$events_placeholder_tip, true );
699
+ ?>
700
+ </tbody>
701
+ <!-- /ADVANCED Formatting -->
702
+
703
  <?php
 
704
  echo $save_button;
705
  ?>
706
  </table>
admin/settings/tabs/general.php CHANGED
@@ -329,14 +329,30 @@
329
  </tbody>
330
  <tbody class="all-css">
331
  <?php
332
- em_options_radio_binary ( __( 'Enable Theme Styling?', 'events-manager'), 'dbem_css_theme', esc_html__("We impose some theme styling rules which help normalize the look of Events Manager accross themes and overrides general theming. This is limited to our components but will prevent your theme from taking over things like fonts, font-sizes, form structures etc. You can also disable strict styling for individual components below.", 'events-manager'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  ?>
334
  </tbody>
335
- <tr class="em-header all-css"><td colspan="2">
336
- <h4><?php _e('Individual Components','events-manager'); ?></h4>
337
- <p><?php esc_html_e("Here you can disable individual item styling eompletely or just allow basic styling. Basic styling will try to impose general structuring (such as calendar structures) but won't use our Strict styling rules.", 'events-manager'); ?></p>
338
- </td></tr>
339
  <tbody class="all-css">
 
 
 
 
340
  <?php
341
  $select = array(
342
  1 => __('Enabled','events-manager'), 0 => __('Disabled', 'events-manager'), 2 => __('Basic Only', 'events-manager')
329
  </tbody>
330
  <tbody class="all-css">
331
  <?php
332
+ em_options_radio_binary ( __( 'Enable Theme Styling?', 'events-manager'), 'dbem_css_theme', esc_html__("We impose some theme styling rules which help normalize the look of Events Manager accross themes and overrides general theming. This is limited to our components but will prevent your theme from taking over things like fonts, font-sizes, form structures etc. You can also disable strict styling for individual components below.", 'events-manager'), null, '.theme-css');
333
+ ?>
334
+ </tbody>
335
+ <tbody class="theme-css">
336
+ <tr><td colspan="2">
337
+ <h4><?php _e('Individual Components','events-manager'); ?></h4>
338
+ <p>
339
+ <?php echo sprintf(esc_html__('Our theme has multiple CSS variables that can be overriden easily. The options below could be overriden just as easily via one line of CSS in your %s settings area, for example %s'), '<em>'.__('Customizer').' > '. __('Additional CSS').'</em>', '<code>body .em.pixelbones{ --font-family:arial, --font-size:14px; --font-weight: normal; --line-height:16px; }</code>'); ?>
340
+ </p>
341
+ </td></tr>
342
+ <?php
343
+ $settings = array(0 => esc_html__('Default plugin setting', 'events-manager'), 1 => esc_html__('Inherit your theme settings', 'events-manager'));
344
+ $desc = esc_html__('Our default setting is %s');
345
+ em_options_select ( __( 'Default font family', 'events-manager'), 'dbem_css_theme_font_family', $settings, sprintf($desc, '<code>"Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;</code>') );
346
+ em_options_select ( __( 'Base font size', 'events-manager'), 'dbem_css_theme_font_size', $settings, sprintf($desc, '<code>16px</code>') );
347
+ em_options_select ( __( 'Base line height', 'events-manager'), 'dbem_css_theme_line_height', $settings, sprintf($desc, '<code>20px</code>') );
348
+ em_options_select ( __( 'Base font weight', 'events-manager'), 'dbem_css_theme_font_weight', $settings, sprintf($desc, '<code>400</code>') );
349
  ?>
350
  </tbody>
 
 
 
 
351
  <tbody class="all-css">
352
+ <tr class="em-header all-css"><td colspan="2">
353
+ <h4><?php _e('Individual Components','events-manager'); ?></h4>
354
+ <p><?php esc_html_e("Here you can disable individual item styling eompletely or just allow basic styling. Basic styling will try to impose general structuring (such as calendar structures) but won't use our Strict styling rules.", 'events-manager'); ?></p>
355
+ </td></tr>
356
  <?php
357
  $select = array(
358
  1 => __('Enabled','events-manager'), 0 => __('Disabled', 'events-manager'), 2 => __('Basic Only', 'events-manager')
em-functions.php CHANGED
@@ -811,7 +811,7 @@ function em_checkbox_items($name, $array, $saved_values, $horizontal = true) {
811
  echo $output;
812
 
813
  }
814
- function em_options_input_text($title, $name, $description ='', $default='') {
815
  $translate = EM_ML::is_option_translatable($name);
816
  if( preg_match('/^(.+)\[(.+)?\]$/', $name, $matches) ){
817
  $value = EM_Options::get($matches[2], $default, $matches[1]);
@@ -820,7 +820,14 @@ function em_options_input_text($title, $name, $description ='', $default='') {
820
  }
821
  ?>
822
  <tr valign="top" id='<?php echo esc_attr($name);?>_row'>
823
- <th scope="row"><?php echo esc_html($title); ?></th>
 
 
 
 
 
 
 
824
  <td>
825
  <input name="<?php echo esc_attr($name) ?>" type="text" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($value, ENT_QUOTES); ?>" size="45" />
826
  <?php if( $translate ): ?><span class="em-translatable dashicons dashicons-admin-site"></span><?php endif; ?>
@@ -930,10 +937,20 @@ function em_options_radio($name, $options, $title='') {
930
 
931
  function em_options_radio_binary($title, $name, $description='', $option_names = '', $trigger='', $untrigger=false) {
932
  if( empty($option_names) ) $option_names = array(0 => __('No','events-manager'), 1 => __('Yes','events-manager'));
933
- if( substr($name, 0, 7) == 'dbem_ms' ){
934
- $list_events_page = get_site_option($name);
 
 
 
 
935
  }else{
936
- $list_events_page = get_option($name);
 
 
 
 
 
 
937
  }
938
  if( $untrigger ){
939
  $trigger_att = ($trigger) ? 'data-trigger="'.esc_attr($trigger).'" class="em-untrigger"':'';
@@ -941,11 +958,11 @@ function em_options_radio_binary($title, $name, $description='', $option_names =
941
  $trigger_att = ($trigger) ? 'data-trigger="'.esc_attr($trigger).'" class="em-trigger"':'';
942
  }
943
  ?>
944
- <tr valign="top" id='<?php echo $name;?>_row'>
945
  <th scope="row"><?php echo esc_html($title); ?></th>
946
- <td>
947
- <?php echo $option_names[1]; ?> <input id="<?php echo esc_attr($name) ?>_yes" name="<?php echo esc_attr($name) ?>" type="radio" value="1" <?php if($list_events_page) echo "checked='checked'"; echo $trigger_att; ?> />&nbsp;&nbsp;&nbsp;
948
- <?php echo $option_names[0]; ?> <input id="<?php echo esc_attr($name) ?>_no" name="<?php echo esc_attr($name) ?>" type="radio" value="0" <?php if(!$list_events_page) echo "checked='checked'"; echo $trigger_att; ?> />
949
  <br/><em><?php echo $description; ?></em>
950
  </td>
951
  </tr>
811
  echo $output;
812
 
813
  }
814
+ function em_options_input_text($title, $name, $description ='', $default='', $resetable = false) {
815
  $translate = EM_ML::is_option_translatable($name);
816
  if( preg_match('/^(.+)\[(.+)?\]$/', $name, $matches) ){
817
  $value = EM_Options::get($matches[2], $default, $matches[1]);
820
  }
821
  ?>
822
  <tr valign="top" id='<?php echo esc_attr($name);?>_row'>
823
+ <th scope="row">
824
+ <?php echo esc_html($title); ?>
825
+ <?php if( $resetable ): ?>
826
+ <a href="#" class="em-option-resettable em-tooltip" aria-label="<?php esc_attr_e('Reset to default value?', 'events-manager'); ?>" data-name="<?php echo esc_attr($name) ?>" data-nonce="<?php echo wp_create_nonce('option-default-'.$name); ?>">
827
+ <span class="dashicons dashicons-undo"></span>
828
+ </a>
829
+ <?php endif; ?>
830
+ </th>
831
  <td>
832
  <input name="<?php echo esc_attr($name) ?>" type="text" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($value, ENT_QUOTES); ?>" size="45" />
833
  <?php if( $translate ): ?><span class="em-translatable dashicons dashicons-admin-site"></span><?php endif; ?>
937
 
938
  function em_options_radio_binary($title, $name, $description='', $option_names = '', $trigger='', $untrigger=false) {
939
  if( empty($option_names) ) $option_names = array(0 => __('No','events-manager'), 1 => __('Yes','events-manager'));
940
+ if( preg_match('/^(.+)\[([a-z_A-Z0-9\-]+)\]$/', $name, $match ) ){
941
+ // deal with an option stored as an array
942
+ $name_data = get_option($match[1]);
943
+ $value = !empty($name_data[$match[2]]);
944
+ $id = $match[1].'-'.$match[2];
945
+ $class = $match[1];
946
  }else{
947
+ $id = $name;
948
+ $class = $name;
949
+ if( substr($name, 0, 7) == 'dbem_ms' ){
950
+ $value = get_site_option($name);
951
+ }else{
952
+ $value = get_option($name);
953
+ }
954
  }
955
  if( $untrigger ){
956
  $trigger_att = ($trigger) ? 'data-trigger="'.esc_attr($trigger).'" class="em-untrigger"':'';
958
  $trigger_att = ($trigger) ? 'data-trigger="'.esc_attr($trigger).'" class="em-trigger"':'';
959
  }
960
  ?>
961
+ <tr valign="top" class="<?php echo $class ?>_row" id='<?php echo $id;?>_row'>
962
  <th scope="row"><?php echo esc_html($title); ?></th>
963
+ <td class="<?php echo $class; ?>">
964
+ <?php echo $option_names[1]; ?> <input id="<?php echo esc_attr($id) ?>_yes" name="<?php echo esc_attr($name) ?>" type="radio" value="1" <?php if($value) echo "checked='checked'"; echo $trigger_att; ?> />&nbsp;&nbsp;&nbsp;
965
+ <?php echo $option_names[0]; ?> <input id="<?php echo esc_attr($id) ?>_no" name="<?php echo esc_attr($name) ?>" type="radio" value="0" <?php if(!$value) echo "checked='checked'"; echo $trigger_att; ?> />
966
  <br/><em><?php echo $description; ?></em>
967
  </td>
968
  </tr>
em-install.php CHANGED
@@ -482,8 +482,8 @@ function em_add_options() {
482
  'dbem_event_list_groupby_header_format' => '<h2>#s</h2>',
483
  'dbem_display_calendar_in_events_page' => 0,
484
  'dbem_single_event_format' => EM_Formats::dbem_single_event_format(''),
485
- 'dbem_event_excerpt_format' => '#_EVENTDATES @ #_EVENTTIMES - #_EVENTEXCERPT',
486
- 'dbem_event_excerpt_alt_format' => '#_EVENTDATES @ #_EVENTTIMES - #_EVENTEXCERPT{55}',
487
  'dbem_event_page_title_format' => '#_EVENTNAME',
488
  'dbem_event_all_day_message' => __('All Day','events-manager'),
489
  'dbem_no_events_message' => sprintf(__( 'No %s', 'events-manager'),__('Events','events-manager')),
@@ -499,27 +499,13 @@ function em_add_options() {
499
  'dbem_location_list_item_format' => EM_Formats::dbem_location_list_item_format(''),
500
  'dbem_location_list_item_format_footer' => EM_Formats::dbem_location_list_item_format_footer(''),
501
  'dbem_location_page_title_format' => '#_LOCATIONNAME',
502
- 'dbem_single_location_format' => '<div style="float:right; margin:0px 0px 15px 15px;">#_LOCATIONMAP</div>
503
- <p>
504
- <strong>'.__('Address','events-manager').'</strong><br/>
505
- #_LOCATIONADDRESS<br/>
506
- #_LOCATIONTOWN<br/>
507
- #_LOCATIONSTATE<br/>
508
- #_LOCATIONREGION<br/>
509
- #_LOCATIONPOSTCODE<br/>
510
- #_LOCATIONCOUNTRY
511
- </p>
512
- <br style="clear:both" />
513
- #_LOCATIONNOTES
514
-
515
- <h3>'.__('Upcoming Events','events-manager').'</h3>
516
- <p>#_LOCATIONNEXTEVENTS</p>',
517
- 'dbem_location_excerpt_format' => '#_LOCATIONEXCERPT',
518
- 'dbem_location_excerpt_alt_format' => '#_LOCATIONEXCERPT{55}',
519
- 'dbem_location_no_events_message' => '<li>'.__('No events in this location', 'events-manager').'</li>',
520
- 'dbem_location_event_list_item_header_format' => "<ul>",
521
- 'dbem_location_event_list_item_format' => "<li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>",
522
- 'dbem_location_event_list_item_footer_format' => "</ul>",
523
  'dbem_location_event_list_limit' => 20,
524
  'dbem_location_event_list_orderby' => 'event_start_date,event_start_time,event_name',
525
  'dbem_location_event_list_order' => 'ASC',
@@ -530,17 +516,17 @@ function em_add_options() {
530
  'dbem_categories_default_orderby' => 'name',
531
  'dbem_categories_default_order' => 'ASC',
532
  //Categories Page Formatting
533
- 'dbem_categories_list_item_format_header' => '<ul class="em-categories-list">',
534
- 'dbem_categories_list_item_format' => '<li>#_CATEGORYLINK</li>',
535
- 'dbem_categories_list_item_format_footer' => '</ul>',
536
  'dbem_no_categories_message' => sprintf(__( 'No %s', 'events-manager'),__('Categories','events-manager')),
537
  //Category Formatting
538
  'dbem_category_page_title_format' => '#_CATEGORYNAME',
539
- 'dbem_category_page_format' => '#_CATEGORYNOTES<h3>'.__('Upcoming Events','events-manager').'</h3>#_CATEGORYNEXTEVENTS',
540
- 'dbem_category_no_events_message' => '<li>'.__('No events in this category', 'events-manager').'</li>',
541
- 'dbem_category_event_list_item_header_format' => '<ul>',
542
- 'dbem_category_event_list_item_format' => "<li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>",
543
- 'dbem_category_event_list_item_footer_format' => '</ul>',
544
  'dbem_category_event_list_limit' => 20,
545
  'dbem_category_event_list_orderby' => 'event_start_date,event_start_time,event_name',
546
  'dbem_category_event_list_order' => 'ASC',
@@ -551,18 +537,20 @@ function em_add_options() {
551
  'dbem_tags_default_limit' => 10,
552
  'dbem_tags_default_orderby' => 'name',
553
  'dbem_tags_default_order' => 'ASC',
 
554
  //Tags Page Formatting
555
- 'dbem_tags_list_item_format_header' => '<ul class="em-tags-list">',
556
- 'dbem_tags_list_item_format' => '<li>#_TAGLINK</li>',
557
- 'dbem_tags_list_item_format_footer' => '</ul>',
558
  'dbem_no_tags_message' => sprintf(__( 'No %s', 'events-manager'),__('Tags','events-manager')),
559
  //Tag Page Formatting
560
  'dbem_tag_page_title_format' => '#_TAGNAME',
561
- 'dbem_tag_page_format' => '<h3>'.__('Upcoming Events','events-manager').'</h3>#_TAGNEXTEVENTS',
562
- 'dbem_tag_no_events_message' => '<li>'.__('No events with this tag', 'events-manager').'</li>',
563
- 'dbem_tag_event_list_item_header_format' => '<ul class="em-tags-list">',
564
- 'dbem_tag_event_list_item_format' => "<li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>",
565
- 'dbem_tag_event_list_item_footer_format' => '</ul>',
 
566
  'dbem_tag_event_single_format' => '#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES',
567
  'dbem_tag_no_event_message' => __('No events with this tag', 'events-manager'),
568
  'dbem_tag_event_list_limit' => 20,
@@ -590,8 +578,8 @@ function em_add_options() {
590
  'dbem_google_maps_browser_key'=> '',
591
  'dbem_map_default_width'=> '400px', //eventually will use %
592
  'dbem_map_default_height'=> '300px',
593
- 'dbem_location_baloon_format' => '<strong>#_LOCATIONNAME</strong><br/>#_LOCATIONADDRESS - #_LOCATIONTOWN<br/><a href="#_LOCATIONPAGEURL">'.__('Events', 'events-manager').'</a>',
594
- 'dbem_map_text_format' => '<strong>#_LOCATIONNAME</strong><p>#_LOCATIONADDRESS</p><p>#_LOCATIONTOWN</p>',
595
  //Email Config
596
  'dbem_email_disable_registration' => 0,
597
  'dbem_rsvp_mail_port' => 465,
@@ -739,6 +727,10 @@ function em_add_options() {
739
  //custom CSS options for public pages
740
  'dbem_css' => 1,
741
  'dbem_css_theme' => 1,
 
 
 
 
742
  'dbem_css_calendar' => 1,
743
  'dbem_css_editors' => 1,
744
  'dbem_css_rsvp' => 1, //my bookings page
@@ -815,7 +807,8 @@ function em_add_options() {
815
  'dbem_data_privacy_export_bookings' => 1,
816
  'dbem_data_privacy_erase_events' => 1,
817
  'dbem_data_privacy_erase_locations' => 1,
818
- 'dbem_data_privacy_erase_bookings' => 1
 
819
  );
820
 
821
  //do date js according to locale:
@@ -868,7 +861,7 @@ function em_upgrade_current_installation(){
868
  $orderby[] = 'event_'.$val;
869
  }
870
  }
871
- $orderby = (count($orderby) > 0) ? implode(',',$orderby):$dbem_options['dbem_events_default_orderby'];
872
  update_option('dbem_events_default_orderby',$orderby);
873
  //Locations and categories weren't controlled in v4, so just reset them
874
  update_option('dbem_locations_default_orderby','location_name');
@@ -1155,6 +1148,26 @@ function em_upgrade_current_installation(){
1155
  $EM_Admin_Notice = new EM_Admin_Notice(array( 'name' => 'v6-update', 'who' => 'admin', 'where' => 'all', 'message' => "$message $message2" ));
1156
  EM_Admin_Notices::add($EM_Admin_Notice, is_multisite());
1157
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1158
  }
1159
 
1160
  function em_set_mass_caps( $roles, $caps ){
482
  'dbem_event_list_groupby_header_format' => '<h2>#s</h2>',
483
  'dbem_display_calendar_in_events_page' => 0,
484
  'dbem_single_event_format' => EM_Formats::dbem_single_event_format(''),
485
+ 'dbem_event_excerpt_format' => EM_Formats::dbem_event_excerpt_format(''),
486
+ 'dbem_event_excerpt_alt_format' => EM_Formats::dbem_event_excerpt_alt_format(''),
487
  'dbem_event_page_title_format' => '#_EVENTNAME',
488
  'dbem_event_all_day_message' => __('All Day','events-manager'),
489
  'dbem_no_events_message' => sprintf(__( 'No %s', 'events-manager'),__('Events','events-manager')),
499
  'dbem_location_list_item_format' => EM_Formats::dbem_location_list_item_format(''),
500
  'dbem_location_list_item_format_footer' => EM_Formats::dbem_location_list_item_format_footer(''),
501
  'dbem_location_page_title_format' => '#_LOCATIONNAME',
502
+ 'dbem_single_location_format' => EM_Formats::dbem_single_location_format(''),
503
+ 'dbem_location_excerpt_format' => EM_Formats::dbem_location_excerpt_format(''),
504
+ 'dbem_location_excerpt_alt_format' => EM_Formats::dbem_location_excerpt_alt_format(''),
505
+ 'dbem_location_no_events_message' => __('No events in this location', 'events-manager'),
506
+ 'dbem_location_event_list_item_header_format' => EM_Formats::dbem_location_event_list_item_header_format(''),
507
+ 'dbem_location_event_list_item_format' => EM_Formats::dbem_location_event_list_item_format(''),
508
+ 'dbem_location_event_list_item_footer_format' => EM_Formats::dbem_location_event_list_item_footer_format(''),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
509
  'dbem_location_event_list_limit' => 20,
510
  'dbem_location_event_list_orderby' => 'event_start_date,event_start_time,event_name',
511
  'dbem_location_event_list_order' => 'ASC',
516
  'dbem_categories_default_orderby' => 'name',
517
  'dbem_categories_default_order' => 'ASC',
518
  //Categories Page Formatting
519
+ 'dbem_categories_list_item_format_header' => EM_Formats::dbem_categories_list_item_format_header(''),
520
+ 'dbem_categories_list_item_format' => EM_Formats::dbem_categories_list_item_format(''),
521
+ 'dbem_categories_list_item_format_footer' => EM_Formats::dbem_categories_list_item_format_footer(''),
522
  'dbem_no_categories_message' => sprintf(__( 'No %s', 'events-manager'),__('Categories','events-manager')),
523
  //Category Formatting
524
  'dbem_category_page_title_format' => '#_CATEGORYNAME',
525
+ 'dbem_category_page_format' => EM_Formats::dbem_category_page_format(''),
526
+ 'dbem_category_no_events_message' => __('No events in this category', 'events-manager'),
527
+ 'dbem_category_event_list_item_header_format' => EM_Formats::dbem_category_event_list_item_header_format(''),
528
+ 'dbem_category_event_list_item_format' => EM_Formats::dbem_category_event_list_item_format(''),
529
+ 'dbem_category_event_list_item_footer_format' => EM_Formats::dbem_category_event_list_item_footer_format(''),
530
  'dbem_category_event_list_limit' => 20,
531
  'dbem_category_event_list_orderby' => 'event_start_date,event_start_time,event_name',
532
  'dbem_category_event_list_order' => 'ASC',
537
  'dbem_tags_default_limit' => 10,
538
  'dbem_tags_default_orderby' => 'name',
539
  'dbem_tags_default_order' => 'ASC',
540
+
541
  //Tags Page Formatting
542
+ 'dbem_tags_list_item_format_header' => EM_Formats::dbem_tags_list_item_format_header(''),
543
+ 'dbem_tags_list_item_format' => EM_Formats::dbem_tags_list_item_format(''),
544
+ 'dbem_tags_list_item_format_footer' => EM_Formats::dbem_tags_list_item_format_footer(''),
545
  'dbem_no_tags_message' => sprintf(__( 'No %s', 'events-manager'),__('Tags','events-manager')),
546
  //Tag Page Formatting
547
  'dbem_tag_page_title_format' => '#_TAGNAME',
548
+ 'dbem_tag_page_format' => EM_Formats::dbem_tag_page_format(''),
549
+ 'dbem_tag_no_events_message' => __('No events with this tag', 'events-manager'),
550
+ 'dbem_tag_event_list_item_header_format' => EM_Formats::dbem_tag_event_list_item_header_format(''),
551
+ 'dbem_tag_event_list_item_format' => EM_Formats::dbem_tag_event_list_item_format(''),
552
+ 'dbem_tag_event_list_item_footer_format' => EM_Formats::dbem_tag_event_list_item_footer_format(''),
553
+
554
  'dbem_tag_event_single_format' => '#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES',
555
  'dbem_tag_no_event_message' => __('No events with this tag', 'events-manager'),
556
  'dbem_tag_event_list_limit' => 20,
578
  'dbem_google_maps_browser_key'=> '',
579
  'dbem_map_default_width'=> '400px', //eventually will use %
580
  'dbem_map_default_height'=> '300px',
581
+ 'dbem_location_baloon_format' => EM_Formats::dbem_location_baloon_format(''),
582
+ 'dbem_map_text_format' => EM_Formats::dbem_map_text_format(''),
583
  //Email Config
584
  'dbem_email_disable_registration' => 0,
585
  'dbem_rsvp_mail_port' => 465,
727
  //custom CSS options for public pages
728
  'dbem_css' => 1,
729
  'dbem_css_theme' => 1,
730
+ 'dbem_css_theme_font_family' => 0,
731
+ 'dbem_css_theme_font_size' => 0,
732
+ 'dbem_css_theme_font_weight' => 0,
733
+ 'dbem_css_theme_line_height' => 0,
734
  'dbem_css_calendar' => 1,
735
  'dbem_css_editors' => 1,
736
  'dbem_css_rsvp' => 1, //my bookings page
807
  'dbem_data_privacy_export_bookings' => 1,
808
  'dbem_data_privacy_erase_events' => 1,
809
  'dbem_data_privacy_erase_locations' => 1,
810
+ 'dbem_data_privacy_erase_bookings' => 1,
811
+ 'dbem_advanced_formatting' => 0,
812
  );
813
 
814
  //do date js according to locale:
861
  $orderby[] = 'event_'.$val;
862
  }
863
  }
864
+ $orderby = (count($orderby) > 0) ? implode(',',$orderby): get_option('dbem_events_default_orderby');
865
  update_option('dbem_events_default_orderby',$orderby);
866
  //Locations and categories weren't controlled in v4, so just reset them
867
  update_option('dbem_locations_default_orderby','location_name');
1148
  $EM_Admin_Notice = new EM_Admin_Notice(array( 'name' => 'v6-update', 'who' => 'admin', 'where' => 'all', 'message' => "$message $message2" ));
1149
  EM_Admin_Notices::add($EM_Admin_Notice, is_multisite());
1150
  }
1151
+ if( $current_version != '' && version_compare($current_version, '6.0', '>=') && version_compare($current_version, '6.0.1.1', '<') ){
1152
+ $admin_data = get_option('dbem_data', array());
1153
+ $admin_data['v6'] = false;
1154
+ update_option('dbem_data', $admin_data);
1155
+ // notify user of new update
1156
+ $message = "<strong>We've made some changes to our template files since the 6.0 update which may break your currently saved formats. We're re-enabling preview/migration for you on the %s to have the chance to preview and reload our newly updated templates. Sorry for the inconvenience!</strong>";
1157
+ $settings_page_url = '<a href="'.admin_url('admin.php?page=events-manager-options').'">'. esc_html__('settings page', 'events-manager-google').'</a>';
1158
+ $message = sprintf($message, $settings_page_url);
1159
+ $message .= '</p><p>'."We've also added some extra features to help transition, which can be found in <code>Settings > General > Styling Options</code> and a new Default/Advanced mode in <code>Settings > Formatting</code> which will allow your formats to automatically update themselves directly from our plugin rather than settings page.";
1160
+ $EM_Admin_Notice = new EM_Admin_Notice(array( 'name' => 'v6-update2', 'who' => 'admin', 'where' => 'all', 'message' => $message, 'what'=>'warning' ));
1161
+ EM_Admin_Notices::add($EM_Admin_Notice, is_multisite());
1162
+ }
1163
+ if( $current_version != '' && version_compare($current_version, '6.0.1.1', '<') ){
1164
+ // enable advanced formatting for any previous users, looks like before, they can disable afterwards.
1165
+ update_option('dbem_advanced_formatting', 2);
1166
+ update_option('dbem_css_theme_font_weight', 1);
1167
+ update_option('dbem_css_theme_font_family', 1);
1168
+ update_option('dbem_css_theme_font_size', 1);
1169
+ update_option('dbem_css_theme_line_height', 1);
1170
+ }
1171
  }
1172
 
1173
  function em_set_mass_caps( $roles, $caps ){
events-manager.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
- Version: 6.0.0.1
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
  */
29
 
30
  // Setting constants
31
- define('EM_VERSION', '6.0.1'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x
32
  define('EM_PRO_MIN_VERSION', 2.6712); //self expanatory
33
  define('EM_PRO_MIN_VERSION_CRITICAL', 2.377); //self expanatory
34
  define('EM_DIR', dirname( __FILE__ )); //an absolute path to this directory
@@ -221,6 +221,7 @@ class EM_Scripts_and_Styles {
221
  add_action('admin_enqueue_scripts', array('EM_Scripts_and_Styles','admin_enqueue'));
222
  }else{
223
  add_action('wp_enqueue_scripts', array('EM_Scripts_and_Styles','public_enqueue'));
 
224
  }
225
  static::$locale = substr(get_locale(), 0, 2);
226
  }
@@ -354,6 +355,20 @@ class EM_Scripts_and_Styles {
354
  }
355
  }
356
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  public static function admin_enqueue( $hook_suffix = false ){
358
  if( $hook_suffix == 'post.php' || $hook_suffix === true || (!empty($_GET['page']) && substr($_GET['page'],0,14) == 'events-manager') || (!empty($_GET['post_type']) && in_array($_GET['post_type'], array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring'))) ){
359
  if( $hook_suffix == 'post.php' && empty($_GET['post_type']) && !empty($_GET['post']) ){
@@ -473,6 +488,11 @@ class EM_Scripts_and_Styles {
473
  $em_localized_js['open_text'] = __('Expand All','events-manager');
474
  }
475
  $em_localized_js['option_reset'] = __('Option value has been reverted. Please save your settings for it to take effect.', 'events-manager');
 
 
 
 
 
476
  }
477
  wp_localize_script('events-manager','EM', apply_filters('em_wp_localize_script', $em_localized_js));
478
  }
@@ -715,9 +735,15 @@ function em_locate_template( $template_name, $load=false, $the_args = array() )
715
  //First we check if there are overriding tempates in the child or parent theme
716
  $located = locate_template(array('plugins/events-manager/'.$template_name));
717
  if( !$located ){
718
- $located = apply_filters('em_locate_template_default', $located, $template_name, $load, $the_args);
719
- if ( !$located && file_exists(EM_DIR.'/templates/'.$template_name) ) {
720
- $located = EM_DIR.'/templates/'.$template_name;
 
 
 
 
 
 
721
  }
722
  }
723
  $located = apply_filters('em_locate_template', $located, $template_name, $load, $the_args);
@@ -859,7 +885,7 @@ function em_get_template_classes($component, $subcomponents = array(), $just_sub
859
  add_filter('em_get_template_classes', '__return_empty_array');
860
  */
861
  /*
862
- add_filter('em_get_template_classes', function( $classes, $component, $additional_classes, $theme, $component_classes ){
863
  $component_classes[] = 'em';
864
  return $component_classes;
865
  }, 1, 5);
@@ -882,27 +908,144 @@ function em_template_classes( $component, $additional_classes = array(), $theme
882
  * @method event_list_item_format()
883
  */
884
  class EM_Formats {
 
 
 
 
 
885
  public static function init(){
886
  add_action( 'events_manager_loaded', 'EM_Formats::add_filters');
887
  }
888
- public static function add_filters(){
889
  //you can hook into this filter and activate the format options you want to override by supplying the wp option names in an array, just like in the database.
890
- $formats = apply_filters('em_formats_filter', array());
 
891
  foreach( $formats as $format_name ){
892
  add_filter('pre_option_'.$format_name, 'EM_Formats::'. $format_name, 1,1);
893
  }
894
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
895
  public static function __callStatic($name, $args ){
 
 
 
896
  $value = empty($args) || !isset($args[0]) ? '' : $args[0];
897
- $name = preg_replace('/^dbem_/', '', $name);
898
- $format = em_locate_template( 'formats/'.$name.'.php' );
899
  if( $format ){
900
  ob_start();
901
  include($format);
902
  $value = ob_get_clean();
903
  }
 
904
  return $value;
905
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
906
  }
907
  EM_Formats::init();
908
 
1
  <?php
2
  /*
3
  Plugin Name: Events Manager
4
+ Version: 6.0.1
5
  Plugin URI: http://wp-events-plugin.com
6
  Description: Event registration and booking management for WordPress. Recurring events, locations, webinars, google maps, rss, ical, booking registration and more!
7
  Author: Marcus Sykes
28
  */
29
 
30
  // Setting constants
31
+ define('EM_VERSION', '6.0.1.1'); //self expanatory, although version currently may not correspond directly with published version number. until 6.0 we're stuck updating 5.999.x
32
  define('EM_PRO_MIN_VERSION', 2.6712); //self expanatory
33
  define('EM_PRO_MIN_VERSION_CRITICAL', 2.377); //self expanatory
34
  define('EM_DIR', dirname( __FILE__ )); //an absolute path to this directory
221
  add_action('admin_enqueue_scripts', array('EM_Scripts_and_Styles','admin_enqueue'));
222
  }else{
223
  add_action('wp_enqueue_scripts', array('EM_Scripts_and_Styles','public_enqueue'));
224
+ add_action('em_enqueue_styles', 'EM_Scripts_and_Styles::inline_enqueue');
225
  }
226
  static::$locale = substr(get_locale(), 0, 2);
227
  }
355
  }
356
  }
357
 
358
+ public static function inline_enqueue(){
359
+ // check if we want to override our theme basic styles as per styling options
360
+ if( get_option('dbem_css_theme') ){
361
+ $css = array();
362
+ if( get_option('dbem_css_theme_font_family') == 1 ) $css[] = '--font-family : inherit;';
363
+ if( get_option('dbem_css_theme_font_weight') == 1 ) $css[] = '--font-weight : inherit;';
364
+ if( get_option('dbem_css_theme_font_size') == 1 ) $css[] = '--font-size : 1em;';
365
+ if( get_option('dbem_css_theme_line_height') == 1 ) $css[] = '--line-height : inherit;';
366
+ if( !empty($css) ){
367
+ wp_add_inline_style( 'events-manager', 'body .em { '. implode(' ', $css) .' }' );
368
+ }
369
+ }
370
+ }
371
+
372
  public static function admin_enqueue( $hook_suffix = false ){
373
  if( $hook_suffix == 'post.php' || $hook_suffix === true || (!empty($_GET['page']) && substr($_GET['page'],0,14) == 'events-manager') || (!empty($_GET['post_type']) && in_array($_GET['post_type'], array(EM_POST_TYPE_EVENT,EM_POST_TYPE_LOCATION,'event-recurring'))) ){
374
  if( $hook_suffix == 'post.php' && empty($_GET['post_type']) && !empty($_GET['post']) ){
488
  $em_localized_js['open_text'] = __('Expand All','events-manager');
489
  }
490
  $em_localized_js['option_reset'] = __('Option value has been reverted. Please save your settings for it to take effect.', 'events-manager');
491
+ $em_localized_js['admin'] = array(
492
+ 'settings' => array(
493
+ 'option_override_tooltip' => __("You can override this specific set of formats rather than using the plugin defaults.")
494
+ ),
495
+ );
496
  }
497
  wp_localize_script('events-manager','EM', apply_filters('em_wp_localize_script', $em_localized_js));
498
  }
735
  //First we check if there are overriding tempates in the child or parent theme
736
  $located = locate_template(array('plugins/events-manager/'.$template_name));
737
  if( !$located ){
738
+ // now check the wp-content/plugin-templates/events-manager/ folder
739
+ if( file_exists(WP_CONTENT_DIR.'/plugin-templates/events-manager/'.$template_name) ){
740
+ $located = WP_CONTENT_DIR.'/plugin-templates/events-manager/'.$template_name;
741
+ }else{
742
+ // finally get the plugin from EM if no others exist
743
+ $located = apply_filters('em_locate_template_default', $located, $template_name, $load, $the_args);
744
+ if ( !$located && file_exists(EM_DIR.'/templates/'.$template_name) ) {
745
+ $located = EM_DIR.'/templates/'.$template_name;
746
+ }
747
  }
748
  }
749
  $located = apply_filters('em_locate_template', $located, $template_name, $load, $the_args);
885
  add_filter('em_get_template_classes', '__return_empty_array');
886
  */
887
  /*
888
+ add_filter('em_get_template_classes', function( $classes, $component, $subcomponents, $just_subcomponent, $component_data, $subcomponents_data ){
889
  $component_classes[] = 'em';
890
  return $component_classes;
891
  }, 1, 5);
908
  * @method event_list_item_format()
909
  */
910
  class EM_Formats {
911
+ /**
912
+ * @var array array of previously loaded formats for faster reference. much like get_option does
913
+ */
914
+ public static $loaded_formats = array();
915
+
916
  public static function init(){
917
  add_action( 'events_manager_loaded', 'EM_Formats::add_filters');
918
  }
919
+ public static function add_filters( $get_all = false ){
920
  //you can hook into this filter and activate the format options you want to override by supplying the wp option names in an array, just like in the database.
921
+ if( is_admin() && !empty($_REQUEST['page']) && $_REQUEST['page'] == 'events-manager-options' ) return; // exit on setting pages to avoid content wiping
922
+ $formats = apply_filters('em_formats_filter', static::get_default_formats($get_all));
923
  foreach( $formats as $format_name ){
924
  add_filter('pre_option_'.$format_name, 'EM_Formats::'. $format_name, 1,1);
925
  }
926
  }
927
+
928
+ public static function remove_filters( $get_all = false ){
929
+ $formats = apply_filters('em_formats_filter', static::get_default_formats($get_all));
930
+ foreach( $formats as $format_name ){
931
+ remove_filter('pre_option_'.$format_name, 'EM_Formats::'. $format_name, 1);
932
+ }
933
+ }
934
+
935
+ /**
936
+ * Intercepts the pre_option_ hooks and check if we have a php file format verion, if so that content is supplied.
937
+ * @param string $name
938
+ * @param string[] $args
939
+ * @return string
940
+ */
941
  public static function __callStatic($name, $args ){
942
+ if( !empty(static::$loaded_formats[$name]) ){
943
+ return static::$loaded_formats[$name];
944
+ } // cached already
945
  $value = empty($args) || !isset($args[0]) ? '' : $args[0];
946
+ $filename = preg_replace('/^dbem_/', '', $name);
947
+ $format = em_locate_template( 'formats/'.$filename.'.php' );
948
  if( $format ){
949
  ob_start();
950
  include($format);
951
  $value = ob_get_clean();
952
  }
953
+ static::$loaded_formats[$name] = $value;
954
  return $value;
955
  }
956
+
957
+ /**
958
+ * @return mixed|void
959
+ */
960
+ public static function get_formatting_modes_map(){
961
+ $formatting_modes_map = array (
962
+ 'events-list' => array(
963
+ 'dbem_event_list_item_format_header',
964
+ 'dbem_event_list_item_format',
965
+ 'dbem_event_list_item_format_footer',
966
+ ),
967
+ 'event-single' => array(
968
+ 'dbem_single_event_format',
969
+ ),
970
+ 'event-excerpt' => array(
971
+ 'dbem_event_excerpt_format',
972
+ 'dbem_event_excerpt_alt_format',
973
+ ),
974
+ 'calendar-previews' => array(
975
+ 'dbem_calendar_preview_modal_event_format',
976
+ 'dbem_calendar_preview_modal_date_format',
977
+ 'dbem_calendar_preview_tooltip_event_format',
978
+ ),
979
+ 'locations-list' => array(
980
+ 'dbem_location_list_item_format_header',
981
+ 'dbem_location_list_item_format',
982
+ 'dbem_location_list_item_format_footer',
983
+ ),
984
+ 'location-single' => array(
985
+ 'dbem_single_location_format',
986
+ ),
987
+ 'location-excerpt' => array(
988
+ 'dbem_location_excerpt_format',
989
+ 'dbem_location_excerpt_alt_format',
990
+ ),
991
+ 'location-event-lists' => array(
992
+ 'dbem_location_event_list_item_header_format',
993
+ 'dbem_location_event_list_item_format',
994
+ 'dbem_location_event_list_item_footer_format'
995
+ ),
996
+ 'categories-list' => array(
997
+ 'dbem_categories_list_item_format_header',
998
+ 'dbem_categories_list_item_format',
999
+ 'dbem_categories_list_item_format_footer',
1000
+ ),
1001
+ 'category-single' => array(
1002
+ 'dbem_category_page_format',
1003
+ ),
1004
+ 'category-events-list' => array(
1005
+ 'dbem_category_event_list_item_header_format',
1006
+ 'dbem_category_event_list_item_format',
1007
+ 'dbem_category_event_list_item_footer_format',
1008
+ ),
1009
+ 'tags-list' => array(
1010
+ 'dbem_tags_list_item_format_header',
1011
+ 'dbem_tags_list_item_format',
1012
+ 'dbem_tags_list_item_format_footer',
1013
+ ),
1014
+ 'tag-single' => array(
1015
+ 'dbem_tag_page_format',
1016
+ ),
1017
+ 'tag-events-list' => array(
1018
+ 'dbem_tag_event_list_item_header_format',
1019
+ 'dbem_tag_event_list_item_format',
1020
+ 'dbem_tag_event_list_item_footer_format',
1021
+ ),
1022
+ 'maps' => array(
1023
+ 'dbem_map_text_format',
1024
+ 'dbem_location_baloon_format',
1025
+ ),
1026
+ );
1027
+ return apply_filters('em_formats_formatting_modes_map', $formatting_modes_map);
1028
+ }
1029
+
1030
+ public static function get_default_formats( $get_all = false ){
1031
+ $default_formats = array();
1032
+ $formatting_modes_map = static::get_formatting_modes_map();
1033
+ if( get_option('dbem_advanced_formatting') == 0 || $get_all == true ){
1034
+ // load all formats from files
1035
+ foreach( $formatting_modes_map as $k => $formats ){
1036
+ $default_formats = array_merge($default_formats, $formats);
1037
+ }
1038
+ }elseif( get_option('dbem_advanced_formatting') == 1 ){
1039
+ // go through settings and see what needs loading from files and which don't
1040
+ $formatting_modes = get_option('dbem_advanced_formatting_modes');
1041
+ foreach( $formatting_modes as $mode => $status ){
1042
+ if( !$status && !empty($formatting_modes_map[$mode]) ){
1043
+ $default_formats = array_merge($default_formats, $formatting_modes_map[$mode]);
1044
+ }
1045
+ }
1046
+ } // if set to 2 (or something else) we're loading everything direct from settings
1047
+ return $default_formats;
1048
+ }
1049
  }
1050
  EM_Formats::init();
1051
 
includes/css/events-manager-admin.css CHANGED
@@ -75,6 +75,18 @@
75
  margin-bottom: 20px;
76
  }
77
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  .wp-admin .em-settings-notice {
79
  background: #fff;
80
  border: 1px solid #c3c4c7;
@@ -82,14 +94,6 @@
82
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
83
  margin: 10px 0 20px 0;
84
  padding: 20px;
85
- /*
86
-
87
- <!--
88
- <div class="em-settings-notice em-settings-notice-info">
89
- <p>Some Text Here</p>
90
- </div>
91
- -->
92
- */
93
  }
94
  .wp-admin .em-settings-notice.em-settings-notice-info {
95
  border-left-color: #72aee6;
@@ -100,5 +104,25 @@
100
  .wp-admin .em-settings-notice p:last-child {
101
  margin-bottom: 0;
102
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
 
104
  /*# sourceMappingURL=events-manager-admin.css.map */
75
  margin-bottom: 20px;
76
  }
77
 
78
+ .wp-admin .em-postbox-notice.em-postbox-notice-info {
79
+ border-left: 4px solid #72aee6;
80
+ }
81
+ .wp-admin .em-postbox-notice span.status {
82
+ font-style: italic;
83
+ }
84
+ .wp-admin .em-postbox-notice span.status.enabled {
85
+ color: #00a32a;
86
+ }
87
+ .wp-admin .em-postbox-notice span.status.disabled {
88
+ color: #999;
89
+ }
90
  .wp-admin .em-settings-notice {
91
  background: #fff;
92
  border: 1px solid #c3c4c7;
94
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
95
  margin: 10px 0 20px 0;
96
  padding: 20px;
 
 
 
 
 
 
 
 
97
  }
98
  .wp-admin .em-settings-notice.em-settings-notice-info {
99
  border-left-color: #72aee6;
104
  .wp-admin .em-settings-notice p:last-child {
105
  margin-bottom: 0;
106
  }
107
+ .wp-admin .dbem_advanced_formatting_modes_row th {
108
+ text-decoration: 2px underline dotted #c45500;
109
+ text-underline-offset: 6px;
110
+ }
111
+ .wp-admin .dbem_advanced_formatting_modes_row th, .wp-admin .dbem_advanced_formatting_modes_row td {
112
+ color: #c45500;
113
+ }
114
+ .wp-admin #em-opt-advanced-formatting .inside {
115
+ display: grid;
116
+ width: 100%;
117
+ column-gap: 30px;
118
+ grid-template-columns: min-content 1fr;
119
+ }
120
+ .wp-admin #em-opt-advanced-formatting .em-af-status {
121
+ font-size: 110%;
122
+ font-weight: bold;
123
+ }
124
+ .wp-admin #em-opt-advanced-formatting .em-af-status .em-af-status-save {
125
+ color: #c45500;
126
+ }
127
 
128
  /*# sourceMappingURL=events-manager-admin.css.map */
includes/css/events-manager-admin.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["events-manager-admin.scss","partials/admin/_when.scss"],"names":[],"mappings":"AA+EQ;AA/ER;EACC;EACA;EACA;EACA;;;AAED;ACLC;EACC;;AAED;EACC;;AAGA;EACC;;AAED;EACC;;AAED;EACC;;AAIF;EACC;EACA;EACA;;AAIA;EACC;EACA;;AAED;EACC;EACA;;AAKD;EACC;;AAIH;EACC;;;ADhCA;EACC;;;AAKD;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;EACA;;;AAKD;EACC;;;AAKD;EACC;EACA;EACA;EACA;EACA;EACA;AAQA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AANA;EACC;;AAED;EACC;;AAUD;EACC","file":"events-manager-admin.css"}
1
+ {"version":3,"sourceRoot":"","sources":["events-manager-admin.scss","partials/admin/_when.scss"],"names":[],"mappings":"AAiHQ;AAjHR;EACC;EACA;EACA;EACA;;;AAED;ACLC;EACC;;AAED;EACC;;AAGA;EACC;;AAED;EACC;;AAED;EACC;;AAIF;EACC;EACA;EACA;;AAIA;EACC;EACA;;AAED;EACC;EACA;;AAKD;EACC;;AAIH;EACC;;;ADhCA;EACC;;;AAKD;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;;AAGF;EACC;;AAED;EACC;;AAED;EACC;;AAED;EACC;EACA;;;AAKD;EACC;;;AAMA;EACC;;AAED;EACC;;AACA;EACC;;AAED;EACC;;AAMH;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAED;EACC;;AAED;EACC;;AAKD;EACC;EACA;;AAED;EACC;;AAKD;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC","file":"events-manager-admin.css"}
includes/css/events-manager-admin.min.css CHANGED
@@ -1 +1 @@
1
- @import 'events_manager_admin.css';.wp-admin .em.pixelbones{--font-size:inherit;--line-height:inherit;--font-weight:inherit;--font-family:inherit}.event-form-when>*,.wp-admin .event-form-when>*{margin-bottom:15px!important}.event-form-when>p,.wp-admin .event-form-when>p{margin-bottom:20px!important}.wp-admin .event-form-when .em-recurrence-pattern input[type=text],.wp-admin .event-form-when .em-recurrence-pattern select{width:auto!important}.wp-admin .event-form-when .em-recurrence-pattern select{padding-right:30px!important}.wp-admin .event-form-when .em-recurrence-pattern div.alternate-selector{margin-top:15px}.wp-admin .event-form-when .alternate-selector.em-weekly-selector label{width:auto!important;display:inline-block!important;padding-right:10px!important}.wp-admin .event-form-when .em-event-dates label{width:100%;display:block}.wp-admin .event-form-when .em-event-dates .em-date-start-end{width:100%!important;max-width:500px!important}.wp-admin .event-form-when .event-form-recurrence-when>*{margin-bottom:20px}.wp-admin .em-datepicker .em-date-input{background-color:inherit!important}.event-form-recurrence fieldset.inline{display:inline-block}.event-form-when label,.event-form-when legend{display:block;width:100%;margin-bottom:8px}.event-form-when label.inline-left,.event-form-when legend.inline-left{width:auto;display:inline-block;padding-right:5px;padding-left:3px}.event-form-when .em-time-range fieldset{margin-bottom:10px}.event-form-when input.em-date-start-end{width:100%;background:#fff}:not(.em-location-where) .em-location-data>div:first-child{margin-bottom:20px}.wp-admin .em-settings-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);margin:10px 0 20px;padding:20px}.wp-admin .em-settings-notice.em-settings-notice-info{border-left-color:#72aee6}.wp-admin .em-settings-notice p:first-child{margin-top:0}.wp-admin .em-settings-notice p:last-child{margin-bottom:0}
1
+ @import 'events_manager_admin.css';.wp-admin .em.pixelbones{--font-size:inherit;--line-height:inherit;--font-weight:inherit;--font-family:inherit}.event-form-when>*,.wp-admin .event-form-when>*{margin-bottom:15px!important}.event-form-when>p,.wp-admin .event-form-when>p{margin-bottom:20px!important}.wp-admin .event-form-when .em-recurrence-pattern input[type=text],.wp-admin .event-form-when .em-recurrence-pattern select{width:auto!important}.wp-admin .event-form-when .em-recurrence-pattern select{padding-right:30px!important}.wp-admin .event-form-when .em-recurrence-pattern div.alternate-selector{margin-top:15px}.wp-admin .event-form-when .alternate-selector.em-weekly-selector label{width:auto!important;display:inline-block!important;padding-right:10px!important}.wp-admin .event-form-when .em-event-dates label{width:100%;display:block}.wp-admin .event-form-when .em-event-dates .em-date-start-end{width:100%!important;max-width:500px!important}.wp-admin .event-form-when .event-form-recurrence-when>*{margin-bottom:20px}.wp-admin .em-datepicker .em-date-input{background-color:inherit!important}.event-form-recurrence fieldset.inline{display:inline-block}.event-form-when label,.event-form-when legend{display:block;width:100%;margin-bottom:8px}.event-form-when label.inline-left,.event-form-when legend.inline-left{width:auto;display:inline-block;padding-right:5px;padding-left:3px}.event-form-when .em-time-range fieldset{margin-bottom:10px}.event-form-when input.em-date-start-end{width:100%;background:#fff}:not(.em-location-where) .em-location-data>div:first-child{margin-bottom:20px}.wp-admin .em-postbox-notice.em-postbox-notice-info{border-left:4px solid #72aee6}.wp-admin .em-postbox-notice span.status{font-style:italic}.wp-admin .em-postbox-notice span.status.enabled{color:#00a32a}.wp-admin .em-postbox-notice span.status.disabled{color:#999}.wp-admin .em-settings-notice{background:#fff;border:1px solid #c3c4c7;border-left-width:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);margin:10px 0 20px;padding:20px}.wp-admin .em-settings-notice.em-settings-notice-info{border-left-color:#72aee6}.wp-admin .em-settings-notice p:first-child{margin-top:0}.wp-admin .em-settings-notice p:last-child{margin-bottom:0}.wp-admin .dbem_advanced_formatting_modes_row th{text-decoration:2px underline dotted #c45500;text-underline-offset:6px;color:#c45500}.wp-admin #em-opt-advanced-formatting .em-af-status .em-af-status-save,.wp-admin .dbem_advanced_formatting_modes_row td{color:#c45500}.wp-admin #em-opt-advanced-formatting .inside{display:grid;width:100%;column-gap:30px;grid-template-columns:min-content 1fr}.wp-admin #em-opt-advanced-formatting .em-af-status{font-size:110%;font-weight:700}
includes/css/events-manager-admin.scss CHANGED
@@ -49,6 +49,22 @@
49
  }
50
 
51
  .wp-admin {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  .em-settings-notice {
53
  background: #fff;
54
  border: 1px solid #c3c4c7;
@@ -63,18 +79,36 @@
63
  p:first-child {
64
  margin-top: 0;
65
  }
66
- /*
67
-
68
- <!--
69
- <div class="em-settings-notice em-settings-notice-info">
70
- <p>Some Text Here</p>
71
- </div>
72
- -->
73
- */
74
  p:last-child {
75
  margin-bottom: 0;
76
  }
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
80
  @import 'events_manager_admin.css';
49
  }
50
 
51
  .wp-admin {
52
+ .em-postbox-notice {
53
+ &.em-postbox-notice-info {
54
+ border-left: 4px solid #72aee6;
55
+ }
56
+ span.status {
57
+ font-style: italic;
58
+ &.enabled {
59
+ color: #00a32a;
60
+ }
61
+ &.disabled {
62
+ color: #999;
63
+ }
64
+ }
65
+ }
66
+
67
+
68
  .em-settings-notice {
69
  background: #fff;
70
  border: 1px solid #c3c4c7;
79
  p:first-child {
80
  margin-top: 0;
81
  }
 
 
 
 
 
 
 
 
82
  p:last-child {
83
  margin-bottom: 0;
84
  }
85
  }
86
+
87
+ .dbem_advanced_formatting_modes_row {
88
+ th {
89
+ text-decoration: 2px underline dotted #c45500;
90
+ text-underline-offset: 6px;
91
+ }
92
+ th, td {
93
+ color: #c45500;
94
+ }
95
+ }
96
+
97
+ #em-opt-advanced-formatting{
98
+ .inside {
99
+ display: grid;
100
+ width: 100%;
101
+ column-gap: 30px;
102
+ grid-template-columns: min-content 1fr;
103
+ }
104
+ .em-af-status {
105
+ font-size: 110%;
106
+ font-weight: bold;
107
+ .em-af-status-save {
108
+ color: #c45500;
109
+ }
110
+ }
111
+ }
112
  }
113
 
114
  @import 'events_manager_admin.css';
includes/js/admin-settings.js CHANGED
@@ -163,4 +163,39 @@ jQuery(document).ready(function($){
163
  dataType: 'text',
164
  })
165
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  });
163
  dataType: 'text',
164
  })
165
  });
166
+
167
+ let status = $('#em-advanced-formatting');
168
+ let af_toggle_action = function(){
169
+ const am = status.val();
170
+ if( am == 0 ){
171
+ $('.am-af').hide();
172
+ }else if( am == 1 ){
173
+ $('.am-af').show();
174
+ $('.dbem_advanced_formatting_modes_row').show(); // show toggles
175
+ $('.dbem_advanced_formatting_modes .em-trigger:checked').trigger('change');
176
+ }else{
177
+ $('.am-af').show(); // show everything
178
+ $('.dbem_advanced_formatting_modes_row').hide(); // hide toggles
179
+ }
180
+ $('.em-af-toggle, .em-af-status span').hide();
181
+ $('.em-af-toggle.show-'+ am).show();
182
+ $('.em-af-status-'+ am).show();
183
+ if( $('.em-af-status').attr('data-status') != am ){
184
+ $('.em-af-status .em-af-status-save').show();
185
+ }else{
186
+ $('.em-af-status .em-af-status-save').hide();
187
+ }
188
+ };
189
+ $('.em-af-toggle').on('click', function(e){
190
+ e.preventDefault();
191
+ status.val( this.getAttribute('data-set-status') );
192
+ af_toggle_action();
193
+ });
194
+ af_toggle_action();
195
+
196
+ if( typeof EM.admin === 'object' && 'settings' in EM.admin ){
197
+ tippy( $('.dbem_advanced_formatting_modes_row th').toArray(), {
198
+ content : EM.admin.settings.option_override_tooltip,
199
+ });
200
+ }
201
  });
includes/js/admin-settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function($){var open_close=$('<a href="#" style="display:block; float:right; clear:right; margin:10px;">'+EM.open_text+"</a>");$("#em-options-title").before(open_close);open_close.on("click",function(e){e.preventDefault();if($(this).text()==EM.close_text){$(".postbox").addClass("closed");$(this).text(EM.open_text)}else{$(".postbox").removeClass("closed");$(this).text(EM.close_text)}});$(".postbox > h3").on("click",function(){$(this).parent().toggleClass("closed")});$(".postbox").addClass("closed");$(".tabs-active .nav-tab-wrapper .nav-tab").on("click",function(){el=$(this);elid=el.attr("id");$(".em-menu-group").hide();$("."+elid).show();$(".postbox").addClass("closed");open_close.text(EM.open_text)});$(".nav-tab-wrapper .nav-tab").on("click",function(){$(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active").blur();$(this).addClass("nav-tab-active")});var navUrl=document.location.toString();if(navUrl.match("#")){var nav_tab=navUrl.split("#").pop().split("+");var current_tab="a#em-menu-"+nav_tab[0];$(current_tab).trigger("click");if(nav_tab.length>1){section=$("#em-opt-"+nav_tab[1]);if(section.length>0){section.children("h3").trigger("click");$("html, body").animate({scrollTop:section.offset().top-30})}}}else{document.location=navUrl+"#general"}$(".nav-tab-link").on("click",function(){$($(this).attr("rel")).trigger("click")});$('input[type="submit"]').on("click",function(){var el=$(this).parents(".postbox").first();var docloc=document.location.toString().split("#");var newloc=docloc[0];if(docloc.length>1){var nav_tab=docloc[1].split("+");var tab_path=nav_tab[0];if(el.attr("id")){tab_path=tab_path+"+"+el.attr("id").replace("em-opt-","")}newloc=newloc+"#"+tab_path}document.location=newloc;$(this).closest("form").append('<input type="hidden" name="tab_path" value="'+tab_path+'" />')});$('input[name="dbem_cp_events_has_archive"]').on("change",function(){if($('input:radio[name="dbem_cp_events_has_archive"]:checked').val()==1){$("tbody.em-event-archive-sub-options").show()}else{$("tbody.em-event-archive-sub-options").hide()}}).trigger("change");$('select[name="dbem_events_page"]').on("change",function(){if($('select[name="dbem_events_page"]').val()==0){$("tbody.em-event-page-options").hide()}else{$("tbody.em-event-page-options").show()}}).trigger("change");$('input[name="dbem_cp_locations_has_archive"]').on("change",function(){if($('input:radio[name="dbem_cp_locations_has_archive"]:checked').val()==1){$("tbody.em-location-archive-sub-options").show()}else{$("tbody.em-location-archive-sub-options").hide()}}).trigger("change");$("input:radio[name=dbem_disable_title_rewrites]").on("change",function(){checked_check=$("input:radio[name=dbem_disable_title_rewrites]:checked");if(checked_check.val()==1){$("#dbem_title_html_row").show()}else{$("#dbem_title_html_row").hide()}});$("input:radio[name=dbem_disable_title_rewrites]").trigger("change");$('select[name="dbem_event_list_groupby"]').on("change",function(){if($('select[name="dbem_event_list_groupby"]').val()==0){$("tr#dbem_event_list_groupby_header_format_row, tr#dbem_event_list_groupby_format_row").hide()}else{$("tr#dbem_event_list_groupby_header_format_row, tr#dbem_event_list_groupby_format_row").show()}}).trigger("change");$(".em-translatable").on("click",function(){$(this).nextAll(".em-ml-options").toggle()});$('input[type="radio"].em-trigger').on("change",function(e){var el=$(this);el.val()=="1"?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="radio"].em-trigger:checked').trigger("change");$('input[type="radio"].em-untrigger').on("change",function(e){var el=$(this);el.val()=="0"?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="radio"].em-untrigger:checked').trigger("change");$('input[type="checkbox"].em-trigger').on("change",function(e){var el=$(this);el.prop("checked")?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="checkbox"].em-trigger').trigger("change");$('input[type="checkbox"].em-untrigger').on("change",function(e){var el=$(this);!el.prop("checked")?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="checkbox"].em-untrigger').trigger("change");$("a.admin-tools-db-cleanup").on("click",function(e){if(!confirm(EM.admin_db_cleanup_warning)){e.preventDefault();return false}});$("#dbem_category_default_color, #dbem_tag_default_color").wpColorPicker();$(".em-option-resettable").on("click",function(e){e.preventDefault();let el=$(this);let name=el.attr("data-name");let inputs=el.closest("tr").find('input[name="'+name+'"], textarea[name="'+name+'"]');$.get({url:EM.ajaxurl,data:{action:"em_admin_get_option_default",option_name:name,nonce:el.attr("data-nonce")},success:function(data){inputs.val(data);inputs.prop("disabled",false);alert(EM.option_reset)},beforeSend:function(){inputs.prop("disabled",true)},error:function(){inputs.prop("disabled",false);alert("Error - could not revert.")},dataType:"text"})})});
1
+ jQuery(document).ready(function($){var open_close=$('<a href="#" style="display:block; float:right; clear:right; margin:10px;">'+EM.open_text+"</a>");$("#em-options-title").before(open_close);open_close.on("click",function(e){e.preventDefault();if($(this).text()==EM.close_text){$(".postbox").addClass("closed");$(this).text(EM.open_text)}else{$(".postbox").removeClass("closed");$(this).text(EM.close_text)}});$(".postbox > h3").on("click",function(){$(this).parent().toggleClass("closed")});$(".postbox").addClass("closed");$(".tabs-active .nav-tab-wrapper .nav-tab").on("click",function(){el=$(this);elid=el.attr("id");$(".em-menu-group").hide();$("."+elid).show();$(".postbox").addClass("closed");open_close.text(EM.open_text)});$(".nav-tab-wrapper .nav-tab").on("click",function(){$(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active").blur();$(this).addClass("nav-tab-active")});var navUrl=document.location.toString();if(navUrl.match("#")){var nav_tab=navUrl.split("#").pop().split("+");var current_tab="a#em-menu-"+nav_tab[0];$(current_tab).trigger("click");if(nav_tab.length>1){section=$("#em-opt-"+nav_tab[1]);if(section.length>0){section.children("h3").trigger("click");$("html, body").animate({scrollTop:section.offset().top-30})}}}else{document.location=navUrl+"#general"}$(".nav-tab-link").on("click",function(){$($(this).attr("rel")).trigger("click")});$('input[type="submit"]').on("click",function(){var el=$(this).parents(".postbox").first();var docloc=document.location.toString().split("#");var newloc=docloc[0];if(docloc.length>1){var nav_tab=docloc[1].split("+");var tab_path=nav_tab[0];if(el.attr("id")){tab_path=tab_path+"+"+el.attr("id").replace("em-opt-","")}newloc=newloc+"#"+tab_path}document.location=newloc;$(this).closest("form").append('<input type="hidden" name="tab_path" value="'+tab_path+'" />')});$('input[name="dbem_cp_events_has_archive"]').on("change",function(){if($('input:radio[name="dbem_cp_events_has_archive"]:checked').val()==1){$("tbody.em-event-archive-sub-options").show()}else{$("tbody.em-event-archive-sub-options").hide()}}).trigger("change");$('select[name="dbem_events_page"]').on("change",function(){if($('select[name="dbem_events_page"]').val()==0){$("tbody.em-event-page-options").hide()}else{$("tbody.em-event-page-options").show()}}).trigger("change");$('input[name="dbem_cp_locations_has_archive"]').on("change",function(){if($('input:radio[name="dbem_cp_locations_has_archive"]:checked').val()==1){$("tbody.em-location-archive-sub-options").show()}else{$("tbody.em-location-archive-sub-options").hide()}}).trigger("change");$("input:radio[name=dbem_disable_title_rewrites]").on("change",function(){checked_check=$("input:radio[name=dbem_disable_title_rewrites]:checked");if(checked_check.val()==1){$("#dbem_title_html_row").show()}else{$("#dbem_title_html_row").hide()}});$("input:radio[name=dbem_disable_title_rewrites]").trigger("change");$('select[name="dbem_event_list_groupby"]').on("change",function(){if($('select[name="dbem_event_list_groupby"]').val()==0){$("tr#dbem_event_list_groupby_header_format_row, tr#dbem_event_list_groupby_format_row").hide()}else{$("tr#dbem_event_list_groupby_header_format_row, tr#dbem_event_list_groupby_format_row").show()}}).trigger("change");$(".em-translatable").on("click",function(){$(this).nextAll(".em-ml-options").toggle()});$('input[type="radio"].em-trigger').on("change",function(e){var el=$(this);el.val()=="1"?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="radio"].em-trigger:checked').trigger("change");$('input[type="radio"].em-untrigger').on("change",function(e){var el=$(this);el.val()=="0"?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="radio"].em-untrigger:checked').trigger("change");$('input[type="checkbox"].em-trigger').on("change",function(e){var el=$(this);el.prop("checked")?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="checkbox"].em-trigger').trigger("change");$('input[type="checkbox"].em-untrigger').on("change",function(e){var el=$(this);!el.prop("checked")?$(el.attr("data-trigger")).show():$(el.attr("data-trigger")).hide()});$('input[type="checkbox"].em-untrigger').trigger("change");$("a.admin-tools-db-cleanup").on("click",function(e){if(!confirm(EM.admin_db_cleanup_warning)){e.preventDefault();return false}});$("#dbem_category_default_color, #dbem_tag_default_color").wpColorPicker();$(".em-option-resettable").on("click",function(e){e.preventDefault();let el=$(this);let name=el.attr("data-name");let inputs=el.closest("tr").find('input[name="'+name+'"], textarea[name="'+name+'"]');$.get({url:EM.ajaxurl,data:{action:"em_admin_get_option_default",option_name:name,nonce:el.attr("data-nonce")},success:function(data){inputs.val(data);inputs.prop("disabled",false);alert(EM.option_reset)},beforeSend:function(){inputs.prop("disabled",true)},error:function(){inputs.prop("disabled",false);alert("Error - could not revert.")},dataType:"text"})});let status=$("#em-advanced-formatting");let af_toggle_action=function(){const am=status.val();if(am==0){$(".am-af").hide()}else if(am==1){$(".am-af").show();$(".dbem_advanced_formatting_modes_row").show();$(".dbem_advanced_formatting_modes .em-trigger:checked").trigger("change")}else{$(".am-af").show();$(".dbem_advanced_formatting_modes_row").hide()}$(".em-af-toggle, .em-af-status span").hide();$(".em-af-toggle.show-"+am).show();$(".em-af-status-"+am).show();if($(".em-af-status").attr("data-status")!=am){$(".em-af-status .em-af-status-save").show()}else{$(".em-af-status .em-af-status-save").hide()}};$(".em-af-toggle").on("click",function(e){e.preventDefault();status.val(this.getAttribute("data-set-status"));af_toggle_action()});af_toggle_action();if(typeof EM.admin==="object"&&"settings"in EM.admin){tippy($(".dbem_advanced_formatting_modes_row th").toArray(),{content:EM.admin.settings.option_override_tooltip})}});
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: bookings, calendar, tickets, events, buddypress, event management, google
5
  Text Domain: events-manager
6
  Requires at least: 5.2
7
  Tested up to: 6.0.1
8
- Stable tag: 6.0
9
  Requires PHP: 5.3
10
 
11
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
@@ -129,9 +129,15 @@ See our [FAQ](http://wp-events-plugin.com/documentation/faq/) page, which is upd
129
  15. Clean forms for submitting and managing events, as well as booking events for users.
130
 
131
  == Changelog ==
132
- = 6.0.0.1 (dev) =
 
133
  * added more fine-grained settings to the Settings > Styling Options section allowing to disable styling elements throughout the plugin
134
  * fixed modal transition CSS issues
 
 
 
 
 
135
 
136
  = 6.0 =
137
  * MAJOR UI overhaul inclusding complete rewrite of calendars, lists, search
5
  Text Domain: events-manager
6
  Requires at least: 5.2
7
  Tested up to: 6.0.1
8
+ Stable tag: 6.0.1
9
  Requires PHP: 5.3
10
 
11
  Fully featured event registration management including recurring events, locations management, calendar, Google map integration, booking management
129
  15. Clean forms for submitting and managing events, as well as booking events for users.
130
 
131
  == Changelog ==
132
+ = 6.0.1 =
133
+ * breaking changes to templates for those upgrading from 6.0, included warning/nudge for users upgrading from 6.0
134
  * added more fine-grained settings to the Settings > Styling Options section allowing to disable styling elements throughout the plugin
135
  * fixed modal transition CSS issues
136
+ * added advanced mode enabling users to directly use some, all or none our plugin template files for formats rather than the settings page
137
+ * improved reset option for all overridable placeholder formats in settings allowing for users to reload default formats into individual text boxes
138
+ * added ability to override plugin template files via wp-content/plugin-templates/events-manager/
139
+ * added styling options to allow the use of theme font family, width, height and weight
140
+ * maded default styling options to use theme properties when upgrading from EM < v6.0.1
141
 
142
  = 6.0 =
143
  * MAJOR UI overhaul inclusding complete rewrite of calendars, lists, search
templates/formats/category_event_list_item_footer_format.php ADDED
@@ -0,0 +1 @@
 
1
+ </ul>
templates/formats/category_event_list_item_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>
templates/formats/category_event_list_item_header_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <ul>
templates/formats/event_excerpt_alt_format.php ADDED
@@ -0,0 +1 @@
 
1
+ #_EVENTDATES @ #_EVENTTIMES - #_EVENTEXCERPT{55}
templates/formats/event_excerpt_format.php ADDED
@@ -0,0 +1 @@
 
1
+ #_EVENTDATES @ #_EVENTTIMES - #_EVENTEXCERPT
templates/formats/location_baloon_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <strong>#_LOCATIONNAME</strong><br/>#_LOCATIONADDRESS - #_LOCATIONTOWN<br/><a href="#_LOCATIONPAGEURL">'.__('Events', 'events-manager').'</a>
templates/formats/location_event_list_item_footer_format.php ADDED
@@ -0,0 +1 @@
 
1
+ </ul>
templates/formats/location_event_list_item_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>
templates/formats/location_event_list_item_header_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <ul>
templates/formats/location_excerpt_alt_format.php ADDED
@@ -0,0 +1 @@
 
1
+ #_LOCATIONEXCERPT{55}
templates/formats/location_excerpt_format.php ADDED
@@ -0,0 +1 @@
 
1
+ #_LOCATIONEXCERPT
templates/formats/map_text_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <strong>#_LOCATIONNAME</strong><p>#_LOCATIONADDRESS</p><p>#_LOCATIONTOWN</p>
templates/formats/no_tags_message.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ sprintf(__( 'No %s', 'events-manager'),__('Tags','events-manager'));
templates/formats/single_location_format.php CHANGED
@@ -10,7 +10,7 @@
10
  <h3><?php esc_html_e('Location', 'events-manager'); ?></h3>
11
  <div class="em-item-meta-line em-location-address">
12
  <span class="em-icon-location em-icon"></span>
13
- #_LOCATIONFULLBR
14
  </div>
15
  </section>
16
  {no_loc_image}
10
  <h3><?php esc_html_e('Location', 'events-manager'); ?></h3>
11
  <div class="em-item-meta-line em-location-address">
12
  <span class="em-icon-location em-icon"></span>
13
+ xxx#_LOCATIONFULLBR
14
  </div>
15
  </section>
16
  {no_loc_image}
templates/formats/tag_event_list_item_footer_format.php ADDED
@@ -0,0 +1 @@
 
1
+ </ul>
templates/formats/tag_event_list_item_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <li>#_EVENTLINK - #_EVENTDATES - #_EVENTTIMES</li>
templates/formats/tag_event_list_item_header_format.php ADDED
@@ -0,0 +1 @@
 
1
+ <ul class="em-tags-list">
templates/formats/tags_list_item_format_header.php ADDED
File without changes
v6-migrate.php CHANGED
@@ -4,44 +4,20 @@ class EM_v6_Migration {
4
  add_action('init', 'EM_v6_Migration::pro');
5
  $v6 = EM_Options::get('v6', null);
6
  if( $v6 === null ) return;
7
- if( (!is_admin() || defined('DOING_AJAX')) && $v6 === 'p' ){
8
- add_filter('em_formats_filter', 'EM_v6_Migration::preview_formats', 1, 1);
9
  }
10
  add_action('admin_init', 'EM_v6_Migration::actions');
11
  add_action('em_options_page_header', 'EM_v6_Migration::em_options_page_header');
12
  }
13
 
14
- public static function preview_formats( $array ){
15
- $new_formats = static::get_new_formats();
16
- return $array + $new_formats;
17
- }
18
-
19
- public static function get_new_formats(){
20
- return array(
21
- 'dbem_event_list_item_format_header',
22
- 'dbem_event_list_item_format',
23
- 'dbem_event_list_item_format_footer',
24
- 'dbem_single_event_format',
25
-
26
- 'dbem_location_list_item_format_header',
27
- 'dbem_location_list_item_format',
28
- 'dbem_location_list_item_format_footer',
29
- 'dbem_single_location_format',
30
-
31
- 'dbem_categories_list_item_format_header',
32
- 'dbem_categories_list_item_format',
33
- 'dbem_categories_list_item_format_footer',
34
- 'dbem_category_page_format',
35
-
36
- 'dbem_tags_list_item_format_header',
37
- 'dbem_tags_list_item_format',
38
- 'dbem_tags_list_item_format_footer',
39
- 'dbem_tag_page_format',
40
-
41
- 'dbem_calendar_preview_modal_event_format',
42
- 'dbem_calendar_preview_modal_date_format',
43
- 'dbem_calendar_preview_tooltip_event_format',
44
- );
45
  }
46
 
47
  public static function actions(){
@@ -63,18 +39,27 @@ class EM_v6_Migration {
63
  remove_filter('em_formats_filter', 'EM_v6_Migration::preview_formats', 1);
64
  // copy over new formats overriding old ones, but putting them in an 'undo' var
65
  $undo = array();
66
- foreach( static::get_new_formats() as $format ){
67
  $format_content = call_user_func('EM_Formats::'.$format, '');
68
  $undo[$format] = get_option($format);
69
  update_option($format, $format_content );
70
  }
71
  update_option('dbem_v6_undo', $undo, false); // no auto-loading this
 
 
 
 
 
 
 
72
  EM_Admin_Notices::remove('v6-update', is_multisite());
 
73
  $EM_Notices->add_confirm(esc_html__('You nave successfully migrated to the default v6 formatting options, enjoy! We have an undo option, just in case...', 'events-manager'), true);
74
  break;
75
  case 'dismiss':
76
  unset($data['v6']);
77
  EM_Admin_Notices::remove('v6-update', is_multisite());
 
78
  break;
79
  case 'dismiss-undo':
80
  delete_option('dbem_v6_undo');
@@ -83,6 +68,11 @@ class EM_v6_Migration {
83
  case 'undo':
84
  $data['v6'] = false;
85
  $undo = get_option('dbem_v6_undo');
 
 
 
 
 
86
  if( empty($undo) ){
87
  $EM_Notices->add_error('Oh dear... looks like the undo data was deleted from your wp_options table. Please see if you have a backup of that table and look for the <strong>dbem_v6_undo</strong> option_name value.', true);
88
  }else{
4
  add_action('init', 'EM_v6_Migration::pro');
5
  $v6 = EM_Options::get('v6', null);
6
  if( $v6 === null ) return;
7
+ if( (!is_admin() || defined('EM_DOING_AJAX')) && $v6 === 'p' ){
8
+ add_action('events_manager_loaded', 'EM_v6_Migration::preview_formats', 1);
9
  }
10
  add_action('admin_init', 'EM_v6_Migration::actions');
11
  add_action('em_options_page_header', 'EM_v6_Migration::em_options_page_header');
12
  }
13
 
14
+ public static function preview_formats(){
15
+ if( !current_user_can('manage_options') ) return;
16
+ add_filter('pre_option_dbem_advanced_formatting', '__return_zero');
17
+ add_filter('pre_option_dbem_css_theme_font_weight', '__return_zero');
18
+ add_filter('pre_option_dbem_css_theme_font_family', '__return_zero');
19
+ add_filter('pre_option_dbem_css_theme_font_size', '__return_zero');
20
+ add_filter('pre_option_dbem_css_theme_line_height', '__return_zero');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
 
23
  public static function actions(){
39
  remove_filter('em_formats_filter', 'EM_v6_Migration::preview_formats', 1);
40
  // copy over new formats overriding old ones, but putting them in an 'undo' var
41
  $undo = array();
42
+ foreach( EM_Formats::get_default_formats( true ) as $format ){
43
  $format_content = call_user_func('EM_Formats::'.$format, '');
44
  $undo[$format] = get_option($format);
45
  update_option($format, $format_content );
46
  }
47
  update_option('dbem_v6_undo', $undo, false); // no auto-loading this
48
+ // add overriding styling
49
+ update_option('dbem_advanced_formatting', 0);
50
+ update_option('dbem_css_theme_font_weight', 0);
51
+ update_option('dbem_css_theme_font_family', 0);
52
+ update_option('dbem_css_theme_font_size', 0);
53
+ update_option('dbem_css_theme_line_height', 0);
54
+ // remove notices and add confirmation
55
  EM_Admin_Notices::remove('v6-update', is_multisite());
56
+ EM_Admin_Notices::remove('v6-update2', is_multisite());
57
  $EM_Notices->add_confirm(esc_html__('You nave successfully migrated to the default v6 formatting options, enjoy! We have an undo option, just in case...', 'events-manager'), true);
58
  break;
59
  case 'dismiss':
60
  unset($data['v6']);
61
  EM_Admin_Notices::remove('v6-update', is_multisite());
62
+ EM_Admin_Notices::remove('v6-update2', is_multisite());
63
  break;
64
  case 'dismiss-undo':
65
  delete_option('dbem_v6_undo');
68
  case 'undo':
69
  $data['v6'] = false;
70
  $undo = get_option('dbem_v6_undo');
71
+ update_option('dbem_advanced_formatting', 2);
72
+ update_option('dbem_css_theme_font_weight', 1);
73
+ update_option('dbem_css_theme_font_family', 1);
74
+ update_option('dbem_css_theme_font_size', 1);
75
+ update_option('dbem_css_theme_line_height', 1);
76
  if( empty($undo) ){
77
  $EM_Notices->add_error('Oh dear... looks like the undo data was deleted from your wp_options table. Please see if you have a backup of that table and look for the <strong>dbem_v6_undo</strong> option_name value.', true);
78
  }else{