From e0da362ae5340b2a542bba09e8f449d2ed6e29ec Mon Sep 17 00:00:00 2001 From: Luca Rullo Date: Mon, 20 Nov 2017 16:34:37 +0100 Subject: [PATCH] Leon Corre Theme for Wordpress 4.x --- footer.php | 47 ++++ header.php | 60 ++++++ .../buddypress/group-events.php | 160 ++++++++++++++ .../events-manager/buddypress/my-bookings.php | 4 + .../events-manager/buddypress/my-events.php | 2 + .../buddypress/my-group-events.php | 162 ++++++++++++++ .../buddypress/my-locations.php | 2 + plugins/events-manager/buddypress/profile.php | 46 ++++ plugins/events-manager/buddypress/readme.txt | 10 + .../events-manager/emails/bookingsummary.php | 69 ++++++ .../events-manager/emails/bookingtickets.php | 12 ++ plugins/events-manager/emails/readme.txt | 10 + plugins/events-manager/formats/readme.txt | 21 ++ .../forms/bookingform/booking-fields.php | 28 +++ .../forms/bookingform/login.php | 40 ++++ .../forms/bookingform/ticket-single.php | 52 +++++ .../forms/bookingform/tickets-list.php | 60 ++++++ plugins/events-manager/forms/event-editor.php | 120 +++++++++++ .../forms/event/attributes-public.php | 31 +++ .../events-manager/forms/event/attributes.php | 89 ++++++++ .../forms/event/booking-stats.php | 37 ++++ .../forms/event/bookings-ticket-form.php | 109 ++++++++++ .../events-manager/forms/event/bookings.php | 200 ++++++++++++++++++ .../forms/event/categories-public.php | 23 ++ .../forms/event/featured-image-public.php | 20 ++ plugins/events-manager/forms/event/group.php | 48 +++++ .../events-manager/forms/event/location.php | 128 +++++++++++ .../forms/event/recurring-when.php | 92 ++++++++ .../forms/event/when-with-recurring.php | 88 ++++++++ plugins/events-manager/forms/event/when.php | 28 +++ .../events-manager/forms/location-editor.php | 70 ++++++ .../forms/location/attributes-public.php | 30 +++ .../forms/location/attributes.php | 89 ++++++++ .../forms/location/featured-image-public.php | 20 ++ .../events-manager/forms/location/where.php | 58 +++++ .../events-manager/forms/map-container.php | 6 + plugins/events-manager/forms/readme.txt | 13 ++ plugins/events-manager/forms/ticket-form.php | 3 + plugins/events-manager/forms/tickets-form.php | 2 + .../events-manager/placeholders/attendees.php | 20 ++ .../placeholders/attendeeslist.php | 20 ++ .../placeholders/attendeespendinglist.php | 20 ++ .../placeholders/bookingbutton.php | 34 +++ .../placeholders/bookingform.php | 108 ++++++++++ .../placeholders/categories.php | 14 ++ .../placeholders/eventcategoriesimages.php | 20 ++ .../events-manager/placeholders/eventtags.php | 12 ++ .../placeholders/locationmap.php | 36 ++++ .../events-manager/placeholders/readme.txt | 12 ++ plugins/events-manager/readme.txt | 16 ++ plugins/events-manager/tables/events.php | 180 ++++++++++++++++ plugins/events-manager/tables/locations.php | 94 ++++++++ plugins/events-manager/tables/readme.txt | 10 + .../templates/bookings-event-printable.php | 55 +++++ .../events-manager/templates/calendar-day.php | 20 ++ .../templates/calendar-full.php | 61 ++++++ .../templates/calendar-small.php | 52 +++++ .../templates/categories-list.php | 17 ++ .../templates/category-single.php | 12 ++ .../events-manager/templates/event-single.php | 17 ++ .../templates/events-calendar.php | 13 ++ .../templates/events-list-grouped.php | 17 ++ .../events-manager/templates/events-list.php | 17 ++ .../templates/events-search.php | 69 ++++++ plugins/events-manager/templates/ical.php | 135 ++++++++++++ .../templates/location-single.php | 17 ++ .../templates/locations-list.php | 17 ++ .../templates/locations-search.php | 14 ++ .../events-manager/templates/map-global.php | 26 +++ .../events-manager/templates/my-bookings.php | 97 +++++++++ plugins/events-manager/templates/readme.txt | 10 + plugins/events-manager/templates/rss.php | 57 +++++ .../templates/search/categories.php | 23 ++ .../templates/search/geo-units.php | 20 ++ .../events-manager/templates/search/geo.js | 100 +++++++++ .../events-manager/templates/search/geo.php | 23 ++ .../templates/search/location-countries.php | 27 +++ .../templates/search/location-regions.php | 24 +++ .../templates/search/location-states.php | 25 +++ .../templates/search/location-towns.php | 26 +++ .../templates/search/location.php | 18 ++ .../events-manager/templates/search/scope.php | 17 ++ .../templates/search/search.php | 15 ++ .../events-manager/templates/tag-single.php | 12 ++ .../events-manager/templates/tags-list.php | 17 ++ style.css | 50 ++++- template-parts/footer/footer-widgets.php | 32 +++ template-parts/footer/site-info.php | 14 ++ template-parts/header/header-image.php | 20 ++ template-parts/header/site-branding.php | 38 ++++ template-parts/navigation/navigation-top.php | 29 +++ .../page/content-front-page-panels.php | 79 +++++++ template-parts/page/content-front-page.php | 53 +++++ template-parts/page/content-page.php | 30 +++ template-parts/post/content-audio.php | 105 +++++++++ template-parts/post/content-excerpt.php | 46 ++++ template-parts/post/content-gallery.php | 92 ++++++++ template-parts/post/content-image.php | 81 +++++++ template-parts/post/content-none.php | 33 +++ template-parts/post/content-video.php | 103 +++++++++ template-parts/post/content.php | 75 +++++++ 101 files changed, 4633 insertions(+), 2 deletions(-) create mode 100644 footer.php create mode 100644 header.php create mode 100644 plugins/events-manager/buddypress/group-events.php create mode 100644 plugins/events-manager/buddypress/my-bookings.php create mode 100644 plugins/events-manager/buddypress/my-events.php create mode 100644 plugins/events-manager/buddypress/my-group-events.php create mode 100644 plugins/events-manager/buddypress/my-locations.php create mode 100644 plugins/events-manager/buddypress/profile.php create mode 100644 plugins/events-manager/buddypress/readme.txt create mode 100644 plugins/events-manager/emails/bookingsummary.php create mode 100644 plugins/events-manager/emails/bookingtickets.php create mode 100644 plugins/events-manager/emails/readme.txt create mode 100644 plugins/events-manager/formats/readme.txt create mode 100644 plugins/events-manager/forms/bookingform/booking-fields.php create mode 100644 plugins/events-manager/forms/bookingform/login.php create mode 100644 plugins/events-manager/forms/bookingform/ticket-single.php create mode 100644 plugins/events-manager/forms/bookingform/tickets-list.php create mode 100644 plugins/events-manager/forms/event-editor.php create mode 100644 plugins/events-manager/forms/event/attributes-public.php create mode 100644 plugins/events-manager/forms/event/attributes.php create mode 100644 plugins/events-manager/forms/event/booking-stats.php create mode 100644 plugins/events-manager/forms/event/bookings-ticket-form.php create mode 100644 plugins/events-manager/forms/event/bookings.php create mode 100644 plugins/events-manager/forms/event/categories-public.php create mode 100644 plugins/events-manager/forms/event/featured-image-public.php create mode 100644 plugins/events-manager/forms/event/group.php create mode 100644 plugins/events-manager/forms/event/location.php create mode 100644 plugins/events-manager/forms/event/recurring-when.php create mode 100644 plugins/events-manager/forms/event/when-with-recurring.php create mode 100644 plugins/events-manager/forms/event/when.php create mode 100644 plugins/events-manager/forms/location-editor.php create mode 100644 plugins/events-manager/forms/location/attributes-public.php create mode 100644 plugins/events-manager/forms/location/attributes.php create mode 100644 plugins/events-manager/forms/location/featured-image-public.php create mode 100644 plugins/events-manager/forms/location/where.php create mode 100644 plugins/events-manager/forms/map-container.php create mode 100644 plugins/events-manager/forms/readme.txt create mode 100644 plugins/events-manager/forms/ticket-form.php create mode 100644 plugins/events-manager/forms/tickets-form.php create mode 100644 plugins/events-manager/placeholders/attendees.php create mode 100644 plugins/events-manager/placeholders/attendeeslist.php create mode 100644 plugins/events-manager/placeholders/attendeespendinglist.php create mode 100644 plugins/events-manager/placeholders/bookingbutton.php create mode 100644 plugins/events-manager/placeholders/bookingform.php create mode 100644 plugins/events-manager/placeholders/categories.php create mode 100644 plugins/events-manager/placeholders/eventcategoriesimages.php create mode 100644 plugins/events-manager/placeholders/eventtags.php create mode 100644 plugins/events-manager/placeholders/locationmap.php create mode 100644 plugins/events-manager/placeholders/readme.txt create mode 100644 plugins/events-manager/readme.txt create mode 100644 plugins/events-manager/tables/events.php create mode 100644 plugins/events-manager/tables/locations.php create mode 100644 plugins/events-manager/tables/readme.txt create mode 100644 plugins/events-manager/templates/bookings-event-printable.php create mode 100644 plugins/events-manager/templates/calendar-day.php create mode 100644 plugins/events-manager/templates/calendar-full.php create mode 100644 plugins/events-manager/templates/calendar-small.php create mode 100644 plugins/events-manager/templates/categories-list.php create mode 100644 plugins/events-manager/templates/category-single.php create mode 100644 plugins/events-manager/templates/event-single.php create mode 100644 plugins/events-manager/templates/events-calendar.php create mode 100644 plugins/events-manager/templates/events-list-grouped.php create mode 100644 plugins/events-manager/templates/events-list.php create mode 100644 plugins/events-manager/templates/events-search.php create mode 100644 plugins/events-manager/templates/ical.php create mode 100644 plugins/events-manager/templates/location-single.php create mode 100644 plugins/events-manager/templates/locations-list.php create mode 100644 plugins/events-manager/templates/locations-search.php create mode 100644 plugins/events-manager/templates/map-global.php create mode 100644 plugins/events-manager/templates/my-bookings.php create mode 100644 plugins/events-manager/templates/readme.txt create mode 100644 plugins/events-manager/templates/rss.php create mode 100644 plugins/events-manager/templates/search/categories.php create mode 100644 plugins/events-manager/templates/search/geo-units.php create mode 100644 plugins/events-manager/templates/search/geo.js create mode 100644 plugins/events-manager/templates/search/geo.php create mode 100644 plugins/events-manager/templates/search/location-countries.php create mode 100644 plugins/events-manager/templates/search/location-regions.php create mode 100644 plugins/events-manager/templates/search/location-states.php create mode 100644 plugins/events-manager/templates/search/location-towns.php create mode 100644 plugins/events-manager/templates/search/location.php create mode 100644 plugins/events-manager/templates/search/scope.php create mode 100644 plugins/events-manager/templates/search/search.php create mode 100644 plugins/events-manager/templates/tag-single.php create mode 100644 plugins/events-manager/templates/tags-list.php create mode 100644 template-parts/footer/footer-widgets.php create mode 100644 template-parts/footer/site-info.php create mode 100644 template-parts/header/header-image.php create mode 100644 template-parts/header/site-branding.php create mode 100644 template-parts/navigation/navigation-top.php create mode 100644 template-parts/page/content-front-page-panels.php create mode 100644 template-parts/page/content-front-page.php create mode 100644 template-parts/page/content-page.php create mode 100644 template-parts/post/content-audio.php create mode 100644 template-parts/post/content-excerpt.php create mode 100644 template-parts/post/content-gallery.php create mode 100644 template-parts/post/content-image.php create mode 100644 template-parts/post/content-none.php create mode 100644 template-parts/post/content-video.php create mode 100644 template-parts/post/content.php diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..2e65a63 --- /dev/null +++ b/footer.php @@ -0,0 +1,47 @@ + + + + + + + + + + + diff --git a/header.php b/header.php new file mode 100644 index 0000000..9028d05 --- /dev/null +++ b/header.php @@ -0,0 +1,60 @@ + section and everything up until
+ * + * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials + * + * @package WordPress + * @subpackage Twenty_Seventeen + * @since 1.0 + * @version 1.0 + */ + +?> + class="no-js no-svg"> + + + + + + + + + + + +> +
+ + + + + '; + echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' ); + echo '
'; + endif; + ?> + +
+
diff --git a/plugins/events-manager/buddypress/group-events.php b/plugins/events-manager/buddypress/group-events.php new file mode 100644 index 0000000..1365d32 --- /dev/null +++ b/plugins/events-manager/buddypress/group-events.php @@ -0,0 +1,160 @@ +events->link . 'my-events/'; //url to this page + $order = ( !empty($_REQUEST ['order']) ) ? $_REQUEST ['order']:'ASC'; + $limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit + $page = ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:1; + $offset = ( $page > 1 ) ? ($page-1)*$limit : 0; + $EM_Events = EM_Events::get( array('group'=>'this','scope'=>'future', 'limit' => 0, 'order' => $order) ); + $events_count = count ( $EM_Events ); + $future_count = EM_Events::count( array('status'=>1, 'owner' =>get_current_user_id(), 'scope' => 'future')); + $pending_count = EM_Events::count( array('status'=>0, 'owner' =>get_current_user_id(), 'scope' => 'all') ); + $use_events_end = get_option('dbem_use_event_end'); + echo $EM_Notices; + ?> +
+ = $limit ) { + $events_nav = em_admin_paginate( $events_count, $limit, $page); + echo $events_nav; + } + ?> +
+
+ + ". __( 'No Events','events-manager') ."

"; + } else { + foreach( $EM_Events as $EM_Event ){ break; } + $can_edit_events = $EM_Event->can_manage('edit_events','edit_others_events'); + ?> + + + + + + + */ ?> + + + + + + + can_manage('edit_events','edit_others_events'); + if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) { + $rowno++; + $class = ($rowno % 2) ? 'alternate' : ''; + // FIXME set to american + $localised_start_date = date_i18n(get_option('dbem_date_format'), $EM_Event->start); + $localised_end_date = date_i18n(get_option('dbem_date_format'), $EM_Event->end); + $style = ""; + $today = date ( "Y-m-d" ); + $location_summary = "" . $EM_Event->get_location()->name . "
" . $EM_Event->get_location()->address . " - " . $EM_Event->get_location()->town; + + if ($EM_Event->start_date < $today && $EM_Event->end_date < $today){ + $class .= " past"; + } + //Check pending approval events + if ( !$EM_Event->status ){ + $class .= " pending"; + } + ?> + id="event_event_id ?>"> + + + + */ ?> + + + + + + + + +
+ + output('#_NAME'); + }else{ + echo $EM_Event->output('#_EVENTLINK'); + } + ?> + + can_manage('manage_bookings','manage_others_bookings') && get_option('dbem_rsvp_enabled') == 1 && $EM_Event->rsvp == 1 ){ + ?> +
+ – + : get_bookings()->get_booked_spaces()."/".$EM_Event->get_spaces(); ?> + + | : get_bookings()->get_pending_spaces(); ?> + +
+ can_manage('delete_events', 'delete_others_events')) : $can_delete_events = true; ?> + + + + + + + + +
+
+ + + + +
+ start_time, 0, 5 ) . " - " . substr ( $EM_Event->end_time, 0, 5 ); + ?> +
+ is_recurrence() && $EM_Event->can_manage('edit_events','edit_others_events') ) { + $recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager'); + ?> + + get_recurrence_description(); ?>
+ +
+ +
+ +
+
+
+
+ = $limit ) : ?> +
+ +
+ +
+
\ No newline at end of file diff --git a/plugins/events-manager/buddypress/my-bookings.php b/plugins/events-manager/buddypress/my-bookings.php new file mode 100644 index 0000000..d7d134d --- /dev/null +++ b/plugins/events-manager/buddypress/my-bookings.php @@ -0,0 +1,4 @@ + \ No newline at end of file diff --git a/plugins/events-manager/buddypress/my-events.php b/plugins/events-manager/buddypress/my-events.php new file mode 100644 index 0000000..e0c0fdc --- /dev/null +++ b/plugins/events-manager/buddypress/my-events.php @@ -0,0 +1,2 @@ +events->link . 'my-events/'; //url to this page + $order = ( !empty($_REQUEST ['order']) ) ? $_REQUEST ['order']:'ASC'; + $limit = ( !empty($_REQUEST['limit']) ) ? $_REQUEST['limit'] : 20;//Default limit + $page = ( !empty($_REQUEST['pno']) ) ? $_REQUEST['pno']:1; + $offset = ( $page > 1 ) ? ($page-1)*$limit : 0; + $EM_Events = EM_Events::get( array('group'=>'my','scope'=>'future', 'limit' => 0, 'order' => $order) ); + $events_count = count ( $EM_Events ); + $future_count = EM_Events::count( array('status'=>1, 'owner' =>get_current_user_id(), 'scope' => 'future')); + $pending_count = EM_Events::count( array('status'=>0, 'owner' =>get_current_user_id(), 'scope' => 'all') ); + $use_events_end = get_option('dbem_use_event_end'); + echo $EM_Notices; + ?> +
+ = $limit ) { + $events_nav = em_admin_paginate( $events_count, $limit, $page); + echo $events_nav; + } + ?> +
+
+ + ". __( 'No Events','events-manager') ."

"; + } else { + ?> + + + + + + + + */ ?> + + + + + + + + = $offset || $offset === 0) ) { + $rowno++; + $class = ($rowno % 2) ? 'alternate' : ''; + // FIXME set to american + $localised_start_date = date_i18n(get_option('dbem_date_format'), $event->start); + $localised_end_date = date_i18n(get_option('dbem_date_format'), $event->end); + $style = ""; + $today = current_time('timestamp'); + $location_summary = "" . $event->get_location()->name . "
" . $event->get_location()->address . " - " . $event->get_location()->town; + + if ($event->start < $today && $event->end < $today){ + $class .= " past"; + } + //Check pending approval events + if ( !$event->status ){ + $class .= " pending"; + } + ?> + id="event_event_id ?>"> + + + + */ ?> + + + + + + + + + +
 
+ + event_name); ?> + + can_manage('manage_bookings','manage_others_bookings') && get_option('dbem_rsvp_enabled') == 1 && $event->event_rsvp == 1 ){ + ?> +
+ – + : get_bookings()->get_booked_spaces()."/".$event->get_spaces(); ?> + + | : get_bookings()->get_pending_spaces(); ?> + +
+ + + +
+
+ + + + + + + name) ) : ?> +
: name ?> + +
+ + +
+ event_all_day){ + echo date_i18n(get_option('time_format'), $event->start) . " - " . date_i18n(get_option('time_format'), $event->end); + }else{ + echo get_option('dbem_event_all_day_message'); + } + ?> +
+ is_recurrence() && $event->can_manage('edit_events','edit_others_events') ) { + $recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager'); + ?> + + get_recurrence_description(); ?>
+ + + + +
+ +
+ +
+
+
+
+ = $limit ) : ?> +
+ +
+ +
+
\ No newline at end of file diff --git a/plugins/events-manager/buddypress/my-locations.php b/plugins/events-manager/buddypress/my-locations.php new file mode 100644 index 0000000..4f5c8c3 --- /dev/null +++ b/plugins/events-manager/buddypress/my-locations.php @@ -0,0 +1,2 @@ +displayed_user->id,'edit_events') ){ + ?> +

+ $bp->displayed_user->id, + 'format_header' => get_option('dbem_bp_events_list_format_header'), + 'format' => get_option('dbem_bp_events_list_format'), + 'format_footer' => get_option('dbem_bp_events_list_format_footer'), + 'owner' => $bp->displayed_user->id, + 'pagination'=>1 + ); + $args['limit'] = !empty($args['limit']) ? $args['limit'] : get_option('dbem_events_default_limit'); + if( EM_Events::count($args) > 0 ){ + echo EM_Events::output($args); + }else{ + ?> +

. + displayed_user->id ): ?> + + +

+ +

+displayed_user->id ); +$EM_Bookings = $EM_Person->get_bookings( false, apply_filters('em_bp_attending_status',1) ); +if(count($EM_Bookings->bookings) > 0){ + //Get events here in one query to speed things up + $event_ids = array(); + foreach($EM_Bookings as $EM_Booking){ + $event_ids[] = $EM_Booking->event_id; + } + echo EM_Events::output(array('event'=>$event_ids)); +}else{ + ?> +

+ +get_tickets_bookings() as $EM_Ticket_Booking): /* @var $EM_Ticket_Booking EM_Ticket_Booking */ ?> + +get_ticket()->ticket_name; ?> + +-------------------------------------- +: get_spaces(); ?> + +: get_price(true); ?> + + + +======================================= + +get_price_summary_array(); +//we should now have an array of information including base price, taxes and post/pre tax discounts +?> + : get_price_base(true); ?> + + 0 ): ?> + + + + +() : - + + + + 0 ): ?> + + + + +() : + + + + + + ( ) : + + + 0 ): ?> + + + + + : - + + + + 0 ): ?> + + + + + : + + + + + : \ No newline at end of file diff --git a/plugins/events-manager/emails/bookingtickets.php b/plugins/events-manager/emails/bookingtickets.php new file mode 100644 index 0000000..c566e82 --- /dev/null +++ b/plugins/events-manager/emails/bookingtickets.php @@ -0,0 +1,12 @@ +get_tickets_bookings() as $EM_Ticket_Booking): ?> +get_ticket()->name; +?> + +: get_spaces(); ?> + +: get_price(),2); ?> + + + \ No newline at end of file diff --git a/plugins/events-manager/emails/readme.txt b/plugins/events-manager/emails/readme.txt new file mode 100644 index 0000000..61822f0 --- /dev/null +++ b/plugins/events-manager/emails/readme.txt @@ -0,0 +1,10 @@ +This folder contains email templates or parts of email templates that would be used in emails. + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/emails/ and edit as needed. + +If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there. + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/formats/readme.txt b/plugins/events-manager/formats/readme.txt new file mode 100644 index 0000000..c07329c --- /dev/null +++ b/plugins/events-manager/formats/readme.txt @@ -0,0 +1,21 @@ +Files in this folder or in wp-content/themes/yourthemedir/plugins/events-manager/formats/ would be used to replace formatting options in the settings page. This allows you a much greater degree of flexibility as you can use PHP go do all sorts of customizations to your events. + +To overwrite a formatting option, you need to firstly create a file here with the same name as the setting name in the wp_options table without the dbem_ prefix. So, for example: + +'dbem_event_list_item_format' - format for controlling a single event format in a list of events + +becomes + +event_list_item_format.php + +Then, using the example above, to activate the overriding format, you need to add this to your theme's functions.php file. + + + +If you want to add more than one format, add more option names to the $my_formats array and create the corresponding php file. \ No newline at end of file diff --git a/plugins/events-manager/forms/bookingform/booking-fields.php b/plugins/events-manager/forms/bookingform/booking-fields.php new file mode 100644 index 0000000..b4ae72e --- /dev/null +++ b/plugins/events-manager/forms/bookingform/booking-fields.php @@ -0,0 +1,28 @@ + + + + +

+ + +

+

+ + +

+

+ + +

+ + +

+ + +

\ No newline at end of file diff --git a/plugins/events-manager/forms/bookingform/login.php b/plugins/events-manager/forms/bookingform/login.php new file mode 100644 index 0000000..6d3650a --- /dev/null +++ b/plugins/events-manager/forms/bookingform/login.php @@ -0,0 +1,40 @@ + + \ No newline at end of file diff --git a/plugins/events-manager/forms/bookingform/ticket-single.php b/plugins/events-manager/forms/bookingform/ticket-single.php new file mode 100644 index 0000000..dcc0654 --- /dev/null +++ b/plugins/events-manager/forms/bookingform/ticket-single.php @@ -0,0 +1,52 @@ +get_tickets()->get_ticket_collumns(); //array of collumn type => title +foreach( $collumns as $type => $name ): ?> + ticket_description)){ //show description if there is one + ?>

ticket_description,$allowedposttags); ?>

get_price(true); ?>

get_available_spaces() > 1 && ( empty($EM_Ticket->ticket_max) || $EM_Ticket->ticket_max > 1 ) ): //more than one space available ?> +

+ + ticket_id]['spaces']) ? $_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']:0; + $spaces_options = $EM_Ticket->get_spaces_options(false,$default); + if( $spaces_options ){ + echo $spaces_options; + }else{ + echo "".__('N/A','events-manager').""; + } + ?> +

+ + + + + + \ No newline at end of file diff --git a/plugins/events-manager/forms/bookingform/tickets-list.php b/plugins/events-manager/forms/bookingform/tickets-list.php new file mode 100644 index 0000000..a8a27fb --- /dev/null +++ b/plugins/events-manager/forms/bookingform/tickets-list.php @@ -0,0 +1,60 @@ +get_bookings()->get_tickets(); //already instantiated, so should be a quick retrieval. +/* + * This variable can be overridden, by hooking into the em_booking_form_tickets_cols filter and adding your collumns into this array. + * Then, you should create a em_booking_form_tickets_col_arraykey action for your collumn data, which will pass a ticket and event object. + */ +$collumns = $EM_Tickets->get_ticket_collumns(); //array of collumn type => title +?> + + + $name): ?> + + + + tickets as $EM_Ticket ): /* @var $EM_Ticket EM_Ticket */ ?> + is_displayable() ): ?> + + + $name ): ?> + + + + + + + + + + + + +
ticket_name); ?>ticket_description)) :?>
ticket_description,$allowedposttags); ?>
get_price(true); ?> + ticket_id]['spaces']) ? $_REQUEST['em_tickets'][$EM_Ticket->ticket_id]['spaces']:0; + $spaces_options = $EM_Ticket->get_spaces_options(true,$default); + echo ( $spaces_options ) ? $spaces_options:"".__('N/A','events-manager').""; + ?> +
\ No newline at end of file diff --git a/plugins/events-manager/forms/event-editor.php b/plugins/events-manager/forms/event-editor.php new file mode 100644 index 0000000..b7932ab --- /dev/null +++ b/plugins/events-manager/forms/event-editor.php @@ -0,0 +1,120 @@ +can_manage('edit_events','edit_others_events') ){ + ?> +

+ *'); + +echo $EM_Notices; +//Success notice +if( !empty($_REQUEST['success']) ){ + if(!get_option('dbem_events_form_reshow')) return false; +} +?> +
+
+ + +

+
+

+ + +

+

+ + +

+ + +
+ +

+
+ +
+ + +
+ +

+
+ event_id) && $EM_Event->can_manage('edit_recurring_events','edit_others_recurring_events') && get_option('dbem_recurrence_enabled') ){ + em_locate_template('forms/event/when-with-recurring.php',true); + }elseif( $EM_Event->is_recurring() ){ + em_locate_template('forms/event/recurring-when.php',true); + }else{ + em_locate_template('forms/event/when.php',true); + } + ?> +
+ + +

+
+ +
+ + +

+
+
+ + post_content, 'em-editor-content', array('textarea_name'=>'content') ); ?> + + +
+ + +
+
+ + +
+
+ + can_manage('upload_event_images','upload_event_images') ): ?> +

+
+ +
+ + + can_manage('manage_bookings','manage_others_bookings') ) : ?> + +

+
+ +
+ + + + +
+

+ event_id) ): ?> + ' /> + + ' /> + +

+ + + + + + +
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/attributes-public.php b/plugins/events-manager/forms/event/attributes-public.php new file mode 100644 index 0000000..0453e40 --- /dev/null +++ b/plugins/events-manager/forms/event/attributes-public.php @@ -0,0 +1,31 @@ + + 0 ) : ?> + +
+ + 1 ): ?> + + + + + +
+ + \ No newline at end of file diff --git a/plugins/events-manager/forms/event/attributes.php b/plugins/events-manager/forms/event/attributes.php new file mode 100644 index 0000000..76508ad --- /dev/null +++ b/plugins/events-manager/forms/event/attributes.php @@ -0,0 +1,89 @@ + +
+ 0 ) : ?> + + + + + + + + + + + + + + + + + +
Attribute NameValue
+ 1 ): ?> + + + + +
settings page",'events-manager'),EM_ADMIN_URL ."&page=events-manager-options"); ?>
+ event_attributes), $attributes['names'])) > 0 ): ?> +

+

+ + + + + + + + + event_attributes) and count($EM_Event->event_attributes) > 0){ + foreach( $EM_Event->event_attributes as $name => $value){ + if( is_array($value) ) $value = serialize($value); + if( !in_array($name, $attributes['names']) ){ + ?> + + + + + + +
Attribute NameValue
+ +
+ + +

+ Settings > General to add attribute placeholders.', 'events-manager'); ?> +

+ + +
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/booking-stats.php b/plugins/events-manager/forms/event/booking-stats.php new file mode 100644 index 0000000..1c3f75d --- /dev/null +++ b/plugins/events-manager/forms/event/booking-stats.php @@ -0,0 +1,37 @@ + +
+ get_bookings()->get_available_spaces(); + $booked_spaces = $EM_Event->get_bookings()->get_booked_spaces(); + + if ( count($EM_Event->get_bookings()->bookings) > 0 ) { + ?> +
+

get_bookings()->get_available_spaces(); ?>

+

get_bookings()->get_booked_spaces(); ?>

+

get_bookings()->get_pending_spaces(); ?>

+
+
+ +

+ + +
+
+
+ + +
+ + +
+
+
+
+
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/bookings-ticket-form.php b/plugins/events-manager/forms/event/bookings-ticket-form.php new file mode 100644 index 0000000..6a09547 --- /dev/null +++ b/plugins/events-manager/forms/event/bookings-ticket-form.php @@ -0,0 +1,109 @@ + +
+ +
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+ +
+
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/bookings.php b/plugins/events-manager/forms/event/bookings.php new file mode 100644 index 0000000..e231db1 --- /dev/null +++ b/plugins/events-manager/forms/event/bookings.php @@ -0,0 +1,200 @@ +event_id) && $EM_Event->is_recurring() && $EM_Event->event_rsvp; +?> +
+ event_rsvp) ? 'checked="checked"' : ''; ?> /> +    + +
+
+ get_tickets(); + if( count($EM_Tickets->tickets) == 0 ){ + $EM_Tickets->tickets[] = new EM_Ticket(); + $delete_temp_ticket = true; + } + ?> +
+ tickets) == 1 ){ + ?> +

+ +

+ +
+

+

+ + + +

+
+ +
+ tickets) == 1 ){ + $col_count = 1; + $EM_Ticket = $EM_Tickets->get_first(); + include( em_locate_template('forms/ticket-form.php') ); //in future we'll be accessing forms/event/bookings-ticket-form.php directly + }else{ + ?> +

+ + + + + + + + + + + + + + + + + + event_id = $EM_Event->event_id; + array_unshift($EM_Tickets->tickets, $EM_Ticket); //prepend template ticket for JS + $col_count = 0; + foreach( $EM_Tickets->tickets as $EM_Ticket){ + /* @var $EM_Ticket EM_Ticket */ + ?> + > + + + + + + + + + + + + + + + tickets); + ?> +
 
+ +
+ ticket_members) echo '* ';?>ticket_name); ?> +
ticket_description,$allowedposttags); ?>
+
+ + get_bookings()->bookings) == 0 ): ?> + | + + | + +
+
+ ticket_price) ? esc_html($EM_Ticket->get_price_precise()) : esc_html__('Free','events-manager'); ?> + + + ticket_min) ) ? esc_html($EM_Ticket->ticket_min):'-'; ?> + / + ticket_max) ) ? esc_html($EM_Ticket->ticket_max):'-'; ?> + + ticket_start) ) ? date(get_option('dbem_date_format'), $EM_Ticket->start_timestamp):''; ?> + ticket_meta['recurrences']) ) echo $EM_Ticket->ticket_meta['recurrences']['start_days']; ?> + + ticket_start) ) ? date( em_get_hour_format(), $EM_Ticket->start_timestamp):''; ?> +
+ ticket_end) ) ? date(get_option('dbem_date_format'), $EM_Ticket->end_timestamp):''; ?> + ticket_meta['recurrences']) ) echo $EM_Ticket->ticket_meta['recurrences']['end_days']; ?> + + ticket_end) ) ? date( em_get_hour_format(), $EM_Ticket->end_timestamp):''; ?> +
+ get_available_spaces(); ?>/ + get_spaces() ? $EM_Ticket->get_spaces() : '-'; ?> + + get_booked_spaces(); ?> +
+ +
+ +
+ + + + + + + +
+ +
+
+ get_event()->get_tickets()->tickets) > 1 ): ?> +

+

+ +
+ +

+

+ +
+ +

+

+ + + + + + + + + + + + + + +
+ +

+ +
+ tickets); + } + do_action('em_events_admin_bookings_footer', $EM_Event); + ?> +
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/categories-public.php b/plugins/events-manager/forms/event/categories-public.php new file mode 100644 index 0000000..c2724c8 --- /dev/null +++ b/plugins/events-manager/forms/event/categories-public.php @@ -0,0 +1,23 @@ +'name','hide_empty'=>0)); +?> + 0 ): ?> +
+ + + + +
+ \ No newline at end of file diff --git a/plugins/events-manager/forms/event/featured-image-public.php b/plugins/events-manager/forms/event/featured-image-public.php new file mode 100644 index 0000000..a41a473 --- /dev/null +++ b/plugins/events-manager/forms/event/featured-image-public.php @@ -0,0 +1,20 @@ + +

+get_image_url() != '') : ?> + ' alt='event_name ?>'/> + + + +

+ +
+get_image_url() != '') : ?> + + \ No newline at end of file diff --git a/plugins/events-manager/forms/event/group.php b/plugins/events-manager/forms/event/group.php new file mode 100644 index 0000000..97c242d --- /dev/null +++ b/plugins/events-manager/forms/event/group.php @@ -0,0 +1,48 @@ +$group_id)); + } + } + $group_count = count($user_groups); +}else{ + $groups = groups_get_groups(array('show_hidden'=>true, 'per_page'=>0)); + $user_groups = $groups['groups']; + $group_count = $groups['total']; +} +if( count($user_groups) > 0 ){ + ?> +

+ +
+ +

+ +

+

*'); +?> + +
+

+ location_id === '0' || $EM_Event->location_id === 0 ) echo 'checked="checked"'; ?> /> + +

+ +
+ +
+ + can_manage('edit_locations','edit_others_locations') ) : ?> + + + + + +
+ +
+ + + location_id !== 0 ){ + $EM_Location = $EM_Event->get_location(); + }elseif(get_option('dbem_default_location') > 0){ + $EM_Location = em_get_location(get_option('dbem_default_location')); + }else{ + $EM_Location = new EM_Location(); + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
  + +
  + +
  + +
  + +
  + +
  + +
+ + +
+
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/recurring-when.php b/plugins/events-manager/forms/event/recurring-when.php new file mode 100644 index 0000000..163cf9b --- /dev/null +++ b/plugins/events-manager/forms/event/recurring-when.php @@ -0,0 +1,92 @@ + +
+

+ + + + + event_all_day)) echo 'checked="checked"'; ?> /> +

+
+ event_id) ): ?> +
+

get_recurrence_description()); ?>

+

+

+ + + +

+
+ +
+ + + + + + + + + + + + +

+ is_recurring() && $EM_Event->recurrence_byday != '' ) ? explode ( ",", $EM_Event->recurrence_byday ) : array(); + em_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays ); + ?> +

+

+ + + +   +

+
+

+ + + + + + +

+

+ recurrence_days .'" />'); ?> +

+

+
+
+ event_id) ): ?> +
+ + + + + + + +
+ +
+
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/when-with-recurring.php b/plugins/events-manager/forms/event/when-with-recurring.php new file mode 100644 index 0000000..cdd49fe --- /dev/null +++ b/plugins/events-manager/forms/event/when-with-recurring.php @@ -0,0 +1,88 @@ +is_recurring(); +?> + +
+

is_recurring()) echo 'checked' ?> />

+

+ + + + + + + + +

+

+ + + + + + event_all_day)) echo 'checked="checked"'; ?> /> +

+
+

+ + + + + + + + + + + + +

+

+ is_recurring()) ? explode ( ",", $EM_Event->recurrence_byday ) : array(); + em_checkbox_items ( 'recurrence_bydays[]', $days_names, $saved_bydays ); + ?> +

+

+ + + +

+

+ recurrence_days .'" />'); ?> +

+

+
+ +
\ No newline at end of file diff --git a/plugins/events-manager/forms/event/when.php b/plugins/events-manager/forms/event/when.php new file mode 100644 index 0000000..ae853a2 --- /dev/null +++ b/plugins/events-manager/forms/event/when.php @@ -0,0 +1,28 @@ +*'); +?> +
+

+ + + + + + +

+

+ + + + + event_all_day)) echo 'checked="checked"'; ?> /> +

+ + + +
+is_recurrence() ) : //in future, we could enable this and then offer a detach option alongside, which resets the recurrence id and removes the attachment to the recurrence set ?> + +can_manage('edit_locations','edit_others_locations') ){ + ?> +

+ +
null))); ?>'> + + ' /> + + + +

+
+ +
+ +
+ +

+
+ +
+ +

+
+ + post_content, 'em-editor-content', array('textarea_name'=>'content') ); ?> + + +
+ + +
+ + + + + can_manage('upload_event_images','upload_event_images') ): ?> +

+
+ +
+ + + + + + + +

+ location_id) ): ?> + ' /> + + ' /> + +

+
\ No newline at end of file diff --git a/plugins/events-manager/forms/location/attributes-public.php b/plugins/events-manager/forms/location/attributes-public.php new file mode 100644 index 0000000..4349cd3 --- /dev/null +++ b/plugins/events-manager/forms/location/attributes-public.php @@ -0,0 +1,30 @@ + + 0 ) : ?> + +
+ + 1 ): ?> + + + + +
+ + \ No newline at end of file diff --git a/plugins/events-manager/forms/location/attributes.php b/plugins/events-manager/forms/location/attributes.php new file mode 100644 index 0000000..5c07a2d --- /dev/null +++ b/plugins/events-manager/forms/location/attributes.php @@ -0,0 +1,89 @@ + +
+ 0 ) : ?> + + + + + + + + + + + + + + + + + +
Attribute NameValue
+ 1 ): ?> + + + + +
settings page",'events-manager'),EM_ADMIN_URL ."&page=locations-manager-options"); ?>
+ location_attributes), $attributes['names'])) > 0 ): ?> +

+

+ + + + + + + + + location_attributes) and count($EM_Location->location_attributes) > 0){ + foreach( $EM_Location->location_attributes as $name => $value){ + if( is_array($value) ) $value = serialize($value); + if( !in_array($name, $attributes['names']) ){ + ?> + + + + + + +
Attribute NameValue
+ +
+ + +

+ Settings > General to add attribute placeholders.', 'events-manager'); ?> +

+ + +
\ No newline at end of file diff --git a/plugins/events-manager/forms/location/featured-image-public.php b/plugins/events-manager/forms/location/featured-image-public.php new file mode 100644 index 0000000..9ab365f --- /dev/null +++ b/plugins/events-manager/forms/location/featured-image-public.php @@ -0,0 +1,20 @@ + +

+get_image_url() != '') : ?> + ' alt='location_name ?>'/> + + + +

+ +
+get_image_url() != '') : ?> + + \ No newline at end of file diff --git a/plugins/events-manager/forms/location/where.php b/plugins/events-manager/forms/location/where.php new file mode 100644 index 0000000..b204259 --- /dev/null +++ b/plugins/events-manager/forms/location/where.php @@ -0,0 +1,58 @@ +*'); +?> + +

try it on maps.google.com by adding all the fields below separated by commas.",'events-manager')?>

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
  + +
  + +
  + +
  + +
  + + +
  + +
+ +
+ +
\ No newline at end of file diff --git a/plugins/events-manager/forms/map-container.php b/plugins/events-manager/forms/map-container.php new file mode 100644 index 0000000..2b092bf --- /dev/null +++ b/plugins/events-manager/forms/map-container.php @@ -0,0 +1,6 @@ +
+
+

+
+ +
\ No newline at end of file diff --git a/plugins/events-manager/forms/readme.txt b/plugins/events-manager/forms/readme.txt new file mode 100644 index 0000000..fafa96a --- /dev/null +++ b/plugins/events-manager/forms/readme.txt @@ -0,0 +1,13 @@ +This folder contains specific forms used throughout EM. + +CAREFUL!! If you do override these files, make sure you keep form IDs, actions, filters and other php code of that nature. +Doing this could prevent the form from working properly. + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/forms/ and edit as needed. + +If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there. + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/forms/ticket-form.php b/plugins/events-manager/forms/ticket-form.php new file mode 100644 index 0000000..4b9b72f --- /dev/null +++ b/plugins/events-manager/forms/ticket-form.php @@ -0,0 +1,3 @@ +get_bookings(); +if( count($EM_Bookings->bookings) > 0 ){ + ?> +
    + booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){ + $people[] = $EM_Booking->get_person()->ID; + echo '
  • '. get_avatar($EM_Booking->get_person()->ID, 50) .'
  • '; + }elseif($EM_Booking->booking_status == 1 && $EM_Booking->is_no_user() ){ + echo '
  • '. get_avatar($EM_Booking->get_person()->ID, 50) .'
  • '; + } + } + ?> +
+ get_bookings(); +if( count($EM_Bookings->bookings) > 0 ){ + ?> +
    + booking_status == 1 && !in_array($EM_Booking->get_person()->ID, $people) ){ + $people[] = $EM_Booking->get_person()->ID; + echo '
  • '. $EM_Booking->get_person()->get_name() .'
  • '; + }elseif($EM_Booking->booking_status == 1 && $EM_Booking->is_no_user() ){ + echo '
  • '. $EM_Booking->get_person()->get_name() .'
  • '; + } + } + ?> +
+ get_bookings(); +if( count($EM_Bookings->bookings) > 0 ){ + ?> +
    + is_pending() && !in_array($EM_Booking->get_person()->ID, $people) ){ + $people[] = $EM_Booking->get_person()->ID; + echo '
  • '. $EM_Booking->get_person()->get_name() .'
  • '; + }elseif( $EM_Booking->is_pending() && $EM_Booking->is_no_user() ){ + echo '
  • '. $EM_Booking->get_person()->get_name() .'
  • '; + } + } + ?> +
+ +get_bookings()->has_booking(); + if( is_object($EM_Booking) && $EM_Booking->booking_status != 3 && get_option('dbem_bookings_user_cancellation') ){ + ?>get_bookings()->is_open() ){ + if( !is_object($EM_Booking) ){ + ?>get_bookings()->get_available_spaces() <= 0 ){ + ?> \ No newline at end of file diff --git a/plugins/events-manager/placeholders/bookingform.php b/plugins/events-manager/placeholders/bookingform.php new file mode 100644 index 0000000..fa801cd --- /dev/null +++ b/plugins/events-manager/placeholders/bookingform.php @@ -0,0 +1,108 @@ +get_bookings()->get_tickets()->tickets); +$available_tickets_count = count($EM_Event->get_bookings()->get_available_tickets()); +//decide whether user can book, event is open for bookings etc. +$can_book = is_user_logged_in() || (get_option('dbem_bookings_anonymous') && !is_user_logged_in()); +$is_open = $EM_Event->get_bookings()->is_open(); //whether there are any available tickets right now +$show_tickets = true; +//if user is logged out, check for member tickets that might be available, since we should ask them to log in instead of saying 'bookings closed' +if( !$is_open && !is_user_logged_in() && $EM_Event->get_bookings()->is_open(true) ){ + $is_open = true; + $can_book = false; + $show_tickets = get_option('dbem_bookings_tickets_show_unavailable') && get_option('dbem_bookings_tickets_show_member_tickets'); +} +?> +
+ get_bookings()->has_booking(); + ?> + +

+ + +

+ event_rsvp ): //bookings not enabled ?> +

+ get_bookings()->get_available_spaces() <= 0 ): ?> +

+ +

+ + + 0) : ?> + +
#em-booking'> + + + '/> + 1 || get_option('dbem_bookings_tickets_single_form')) ){ //show if more than 1 ticket, or if in forced ticket list view mode + do_action('em_booking_form_before_tickets', $EM_Event); //do not delete + //Show multiple tickets form to user, or single ticket list if settings enable this + //If logged out, can be allowed to see this in settings witout the register form + em_locate_template('forms/bookingform/tickets-list.php',true, array('EM_Event'=>$EM_Event)); + do_action('em_booking_form_after_tickets', $EM_Event); //do not delete + $show_tickets = false; + } + ?> + +
+ get_bookings()->get_available_tickets()->get_first(); + em_locate_template('forms/bookingform/ticket-single.php',true, array('EM_Event'=>$EM_Event, 'EM_Ticket'=>$EM_Ticket)); + do_action('em_booking_form_after_tickets', $EM_Event); //do not delete + } + ?> + $EM_Event)); + } + do_action('em_booking_form_after_user_details', $EM_Event); + ?> + +
+ + + + + +
+ +
+ +

+ +
+ $EM_Event)); + } + ?> +
+ + +
\ No newline at end of file diff --git a/plugins/events-manager/placeholders/categories.php b/plugins/events-manager/placeholders/categories.php new file mode 100644 index 0000000..58abccf --- /dev/null +++ b/plugins/events-manager/placeholders/categories.php @@ -0,0 +1,14 @@ +get_categories()->categories) > 0; +if( $count_cats > 0 ){ + ?> +
    + get_categories() as $EM_Category): ?> +
  • output("#_CATEGORYLINK"); ?>
  • + +
+ get_categories()->categories) > 0; +if( $count_cats > 0 ){ + $one_image = false; + ?> +
    + get_categories() as $EM_Category): /* @var $EM_Category EM_Category */ ?> + get_image_url() != '' ): ?> +
  • output('#_CATEGORYIMAGE'); $one_image = true; ?>
  • + + + +
  • + +
+ post_id, EM_TAXONOMY_TAG); +if( is_array($tags) && count($tags) > 0 ){ + $tags_list = array(); + foreach($tags as $tag){ + $link = get_term_link($tag->slug, EM_TAXONOMY_TAG); + if ( is_wp_error($link) ) $link = ''; + $tags_list[] = ''. $tag->name .''; + } + echo implode(', ', $tags_list); +} \ No newline at end of file diff --git a/plugins/events-manager/placeholders/locationmap.php b/plugins/events-manager/placeholders/locationmap.php new file mode 100644 index 0000000..c46d98a --- /dev/null +++ b/plugins/events-manager/placeholders/locationmap.php @@ -0,0 +1,36 @@ +location_latitude != 0 && $EM_Location->location_longitude != 0 ) ) { + //get dimensions with px or % added in + $width = (!empty($args['width'])) ? $args['width']:get_option('dbem_map_default_width','400px'); + $width = preg_match('/(px)|%/', $width) ? $width:$width.'px'; + $height = (!empty($args['height'])) ? $args['height']:get_option('dbem_map_default_height','300px'); + $height = preg_match('/(px)|%/', $height) ? $height:$height.'px'; + //assign random number for element id reference + $rand = substr(md5(rand().rand()),0,5); + ?> +
+
+ +
+
+ + + location_latitude == 0 && $EM_Location->location_longitude == 0 ){ + echo ''. __('Map Unavailable', 'events-manager') .''; + } \ No newline at end of file diff --git a/plugins/events-manager/placeholders/readme.txt b/plugins/events-manager/placeholders/readme.txt new file mode 100644 index 0000000..31450a0 --- /dev/null +++ b/plugins/events-manager/placeholders/readme.txt @@ -0,0 +1,12 @@ +This folder has files containing some of the more complex placeholders output information. + +Files in this folder are loaded automatically by the corresponding object and make certain variables available to them (see individual files for examples). + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/placeholders/ and edit as needed. + +If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there. + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/readme.txt b/plugins/events-manager/readme.txt new file mode 100644 index 0000000..426786c --- /dev/null +++ b/plugins/events-manager/readme.txt @@ -0,0 +1,16 @@ +This folder has files containing various templates which events manager uses to output its information. + +Almost every aspect of the public interface (and some parts of the admin interface!) can be modified. Please individual folders for more information + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to "wp-content/themes/yourtheme/plugins/events-manager/filepath within this folder/" and edit as needed. + +For example: + +copy templates/events-single.php + +to wp-content/themes/yourtheme/plugins/events-manager/templates/events-single.php + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/tables/events.php b/plugins/events-manager/tables/events.php new file mode 100644 index 0000000..bb8fcc4 --- /dev/null +++ b/plugins/events-manager/tables/events.php @@ -0,0 +1,180 @@ + +
+ 'edit','scope'=>null,'status'=>null,'event_id'=>null, 'success'=>null)).'">'.__('Add New','events-manager').''; + ?> +
+
+ null,'status'=>null,'em_search'=>null,'pno'=>null); //template for cleaning the link for each view below ?> + 'future')); ?>' > ()  |  + 0 ): ?> + 'pending')); ?>' > ()  |  + + 0 ): ?> + 'draft')); ?>' > ()  |  + + 'past')); ?>' > () +
+ +
+ = $limit ) { + $events_nav = em_admin_paginate( $events_count, $limit, $page); + echo $events_nav; + } + ?> +
+
+ + + + + + + + + + */ ?> + + + + + + + + start); + $localised_end_date = date_i18n(get_option('dbem_date_format'), $EM_Event->end); + $style = ""; + $today = current_time('timestamp'); + $location_summary = "" . esc_html($EM_Event->get_location()->location_name) . "
" . esc_html($EM_Event->get_location()->location_address) . " - " . esc_html($EM_Event->get_location()->location_town); + + if ($EM_Event->start < $today && $EM_Event->end < $today){ + $class .= " past"; + } + //Check pending approval events + if ( !$EM_Event->get_status() ){ + $class .= " pending"; + } + ?> + id="event_event_id ?>"> + + + + */ ?> + + + + + + + + + +
 
+ + event_name); ?> + + + event_rsvp == 1 ){ + ?> +
+ – + : get_bookings()->get_booked_spaces()."/".$EM_Event->get_spaces(); ?> + + | : get_bookings()->get_pending_spaces(); ?> + +
+ + + +
+
+ + + + + + + + + +
+ event_all_day){ + echo date_i18n(get_option('time_format'), $EM_Event->start) . " - " . date_i18n(get_option('time_format'), $EM_Event->end); + }else{ + echo get_option('dbem_event_all_day_message'); + } + ?> +
+ is_recurrence() ) { + $recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','events-manager'); + ?> + + get_recurrence_description(); ?>
+ + + + +
+ +
+ +
+
+
+
+ = $limit ) : ?> +
+ +
+ +
+
+
+
diff --git a/plugins/events-manager/tables/locations.php b/plugins/events-manager/tables/locations.php new file mode 100644 index 0000000..b235cdf --- /dev/null +++ b/plugins/events-manager/tables/locations.php @@ -0,0 +1,94 @@ +'edit','scope'=>null,'status'=>null,'location_id'=>null)).'">'.__('Add New','events-manager').''; +?> +
+ +
+ + + 0 ) : ?> +
+ +
+ + +
+ + + = $limit ) { + $locations_nav = em_admin_paginate( $locations_count, $limit, $page ); + echo $locations_nav; + } + ?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ can_manage('edit_events','edit_others_events') ): ?> + location_name); ?> + + location_name) ?> - + '> + + location_address,$EM_Location->location_town,$EM_Location->location_postcode))); ?>location_state) ?>get_country() ?>
+ +
+

+ + + +
+
\ No newline at end of file diff --git a/plugins/events-manager/tables/readme.txt b/plugins/events-manager/tables/readme.txt new file mode 100644 index 0000000..ed741a5 --- /dev/null +++ b/plugins/events-manager/tables/readme.txt @@ -0,0 +1,10 @@ +This folder has files containing table output layouts, such as event and location admin tables for the public pages. + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/tables/ and edit as needed. + +If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there. + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/templates/bookings-event-printable.php b/plugins/events-manager/templates/bookings-event-printable.php new file mode 100644 index 0000000..1af30e7 --- /dev/null +++ b/plugins/events-manager/templates/bookings-event-printable.php @@ -0,0 +1,55 @@ + + + + + + <?php echo sprintf(__('Bookings for %s','events-manager'), $EM_Event->name); ?> + + + +
+

name); ?>

+

output("#d #M #Y"); ?>

+

output("#_LOCATION, #_ADDRESS, #_TOWN"); ?>

+

+ + + + + + + + + get_bookings()->bookings as $EM_Booking) { + if( $EM_Booking->status == 1){ + ?> + + + + + + + + + + + + + + + + + + + +
person->get_name() ?>person->user_email ?>person->phone ?>get_spaces() ?>booking_comment ?>
 :get_bookings()->get_booked_spaces(); ?>
 :get_bookings()->get_available_spaces(); ?>
+
+ + \ No newline at end of file diff --git a/plugins/events-manager/templates/calendar-day.php b/plugins/events-manager/templates/calendar-day.php new file mode 100644 index 0000000..b21302d --- /dev/null +++ b/plugins/events-manager/templates/calendar-day.php @@ -0,0 +1,20 @@ + 1 || get_option('dbem_display_calendar_day_single') == 1 ) { + em_locate_template('templates/events-list.php', true, array('args' => apply_filters('em_content_calendar_day_output_args', $args)) ); +} elseif( $events_count == 1 ) { + $args['format'] = get_option('dbem_single_event_format'); + echo EM_Events::output(apply_filters('em_content_calendar_day_output_args', $args)); +} else { + echo get_option('dbem_no_events_message'); +} \ No newline at end of file diff --git a/plugins/events-manager/templates/calendar-full.php b/plugins/events-manager/templates/calendar-full.php new file mode 100644 index 0000000..867b107 --- /dev/null +++ b/plugins/events-manager/templates/calendar-full.php @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + $cell_data ){ + $class = ( !empty($cell_data['events']) && count($cell_data['events']) > 0 ) ? 'eventful':'eventless'; + if(!empty($cell_data['type'])){ + $class .= "-".$cell_data['type']; + } + //In some cases (particularly when long events are set to show here) long events and all day events are not shown in the right order. In these cases, + //if you want to sort events cronologically on each day, including all day events at top and long events within the right times, add define('EM_CALENDAR_SORTTIME', true); to your wp-config.php file + if( defined('EM_CALENDAR_SORTTIME') && EM_CALENDAR_SORTTIME ) ksort($cell_data['events']); //indexes are timestamps + ?> + + ':''; + $tot_count ++; + } + ?> + + +
<<>>
',$calendar['row_headers']); ?>
+ 0 ): ?> + +
    + get_option('dbem_full_calendar_event_format'))); ?> + $args['limit'] && get_option('dbem_display_calendar_events_limit_msg') != '' ): ?> +
  • + +
+ + + +
\ No newline at end of file diff --git a/plugins/events-manager/templates/calendar-small.php b/plugins/events-manager/templates/calendar-small.php new file mode 100644 index 0000000..9356522 --- /dev/null +++ b/plugins/events-manager/templates/calendar-small.php @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + $cell_data ){ + $class = ( !empty($cell_data['events']) && count($cell_data['events']) > 0 ) ? 'eventful':'eventless'; + if(!empty($cell_data['type'])){ + $class .= "-".$cell_data['type']; + } + ?> + + ':''; + $count ++; + } + ?> + + +
<<>>
',$calendar['row_headers']); ?>
+ 0 ): ?> + + + + +
\ No newline at end of file diff --git a/plugins/events-manager/templates/categories-list.php b/plugins/events-manager/templates/categories-list.php new file mode 100644 index 0000000..78dec97 --- /dev/null +++ b/plugins/events-manager/templates/categories-list.php @@ -0,0 +1,17 @@ +"; + +echo EM_Categories::output( $args ); + +if( get_option('dbem_css_catlist') ) echo "
"; \ No newline at end of file diff --git a/plugins/events-manager/templates/category-single.php b/plugins/events-manager/templates/category-single.php new file mode 100644 index 0000000..2bc8c40 --- /dev/null +++ b/plugins/events-manager/templates/category-single.php @@ -0,0 +1,12 @@ +output_single(); +?> \ No newline at end of file diff --git a/plugins/events-manager/templates/event-single.php b/plugins/events-manager/templates/event-single.php new file mode 100644 index 0000000..cd14d63 --- /dev/null +++ b/plugins/events-manager/templates/event-single.php @@ -0,0 +1,17 @@ +output_single(); +?> \ No newline at end of file diff --git a/plugins/events-manager/templates/events-calendar.php b/plugins/events-manager/templates/events-calendar.php new file mode 100644 index 0000000..69ab716 --- /dev/null +++ b/plugins/events-manager/templates/events-calendar.php @@ -0,0 +1,13 @@ +"; + +echo EM_Events::output_grouped($args); //note we're grabbing the content, not em_get_events_list_grouped function + +if( get_option('dbem_css_evlist') ) echo "
"; \ No newline at end of file diff --git a/plugins/events-manager/templates/events-list.php b/plugins/events-manager/templates/events-list.php new file mode 100644 index 0000000..6d0aba5 --- /dev/null +++ b/plugins/events-manager/templates/events-list.php @@ -0,0 +1,17 @@ +"; + +echo EM_Events::output( $args ); + +if( get_option('dbem_css_evlist') ) echo "
"; diff --git a/plugins/events-manager/templates/events-search.php b/plugins/events-manager/templates/events-search.php new file mode 100644 index 0000000..4cd14f7 --- /dev/null +++ b/plugins/events-manager/templates/events-search.php @@ -0,0 +1,69 @@ + +
+ +
+
\ No newline at end of file diff --git a/plugins/events-manager/templates/ical.php b/plugins/events-manager/templates/ical.php new file mode 100644 index 0000000..426308c --- /dev/null +++ b/plugins/events-manager/templates/ical.php @@ -0,0 +1,135 @@ +", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_description_format' ) ) ); +$description_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_real_description_format') ) ); +$location_format = str_replace ( ">", ">", str_replace ( "<", "<", get_option ( 'dbem_ical_location_format' ) ) ); +$parsed_url = parse_url(get_bloginfo('url')); +$site_domain = preg_replace('/^www./', '', $parsed_url['host']); + +//figure out limits +$ical_limit = get_option('dbem_ical_limit'); +$page_limit = $ical_limit > 50 || !$ical_limit ? 50:$ical_limit; //set a limit of 50 to output at a time, unless overall limit is lower +//get passed on $args and merge with defaults +$args = !empty($args) ? $args:array(); /* @var $args array */ +$args = array_merge(array('limit'=>$page_limit, 'page'=>'1', 'owner'=>false, 'orderby'=>'event_start_date', 'scope' => get_option('dbem_ical_scope') ), $args); +$args = apply_filters('em_calendar_template_args',$args); +//get first round of events to show, we'll start adding more via the while loop +$EM_Events = EM_Events::get( $args ); + +//calendar header +$output = "BEGIN:VCALENDAR +VERSION:2.0 +PRODID:-//wp-events-plugin.com//".EM_VERSION."//EN"; +echo preg_replace("/([^\r])\n/", "$1\r\n", $output); + +//loop through events +$count = 0; +while ( count($EM_Events) > 0 ){ + foreach ( $EM_Events as $EM_Event ) { + /* @var $EM_Event EM_Event */ + if( $ical_limit != 0 && $count > $ical_limit ) break; //we've reached our maximum + //calculate the times along with timezone offsets + if($EM_Event->event_all_day){ + $dateStart = ';VALUE=DATE:'.date('Ymd',$EM_Event->start); //all day + $dateEnd = ';VALUE=DATE:'.date('Ymd',$EM_Event->end + 86400); //add one day + }else{ + $dateStart = ':'.get_gmt_from_date(date('Y-m-d H:i:s', $EM_Event->start), 'Ymd\THis\Z'); + $dateEnd = ':'.get_gmt_from_date(date('Y-m-d H:i:s', $EM_Event->end), 'Ymd\THis\Z'); + } + if( !empty($EM_Event->event_date_modified) && $EM_Event->event_date_modified != '0000-00-00 00:00:00' ){ + $dateModified = get_gmt_from_date($EM_Event->event_date_modified, 'Ymd\THis\Z'); + }else{ + $dateModified = get_gmt_from_date($EM_Event->post_modified, 'Ymd\THis\Z'); + } + + //formats + $summary = em_mb_ical_wordwrap('SUMMARY:'.$EM_Event->output($summary_format,'ical')); + $description = em_mb_ical_wordwrap('DESCRIPTION:'.$EM_Event->output($description_format,'ical')); + $url = 'URL:'.$EM_Event->get_permalink(); + $url = wordwrap($url, 74, "\n ", true); + $location = $geo = $apple_geo = $apple_location = $apple_location_title = $apple_structured_location = $categories = false; + if( $EM_Event->location_id ){ + $location = em_mb_ical_wordwrap('LOCATION:'.$EM_Event->output($location_format, 'ical')); + if( $EM_Event->get_location()->location_latitude || $EM_Event->get_location()->location_longitude ){ + $geo = 'GEO:'.$EM_Event->get_location()->location_latitude.";".$EM_Event->get_location()->location_longitude; + } + if( !defined('EM_ICAL_APPLE_STRUCT') || !EM_ICAL_APPLE_STRUCT ){ + $apple_location = $EM_Event->output('#_LOCATIONFULLLINE, #_LOCATIONCOUNTRY', 'ical'); + $apple_location_title = $EM_Event->output('#_LOCATIONNAME', 'ical'); + $apple_geo = !empty($geo) ? $EM_Event->get_location()->location_latitude.",".$EM_Event->get_location()->location_longitude:'0,0'; + $apple_structured_location = "X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS={$apple_location};X-APPLE-RADIUS=100;X-TITLE={$apple_location_title}:geo:{$apple_geo}"; + $apple_structured_location = str_replace('"', '\"', $apple_structured_location); //google chucks a wobbly with these on this line + $apple_structured_location = em_mb_ical_wordwrap($apple_structured_location); + } + } + $categories = array(); + foreach( $EM_Event->get_categories() as $EM_Category ){ /* @var EM_Category $EM_Category */ + $categories[] = $EM_Category->name; + } + $image = $EM_Event->get_image_url(); + + //create a UID, make it unique and update independent + $UID = $EM_Event->event_id . '@' . $site_domain; + if( is_multisite() ) $UID = absint($EM_Event->blog_id) . '-' . $UID; + $UID = wordwrap("UID:".$UID, 74, "\r\n ", true); + +//output ical item +$output = "\r\n"."BEGIN:VEVENT +{$UID} +DTSTART{$dateStart} +DTEND{$dateEnd} +DTSTAMP:{$dateModified} +{$url} +{$summary}"; +//Description if available +if( $description ){ + $output .= "\r\n" . $description; +} +//add featured image if exists +if( $image ){ + $image = wordwrap("ATTACH;FMTTYPE=image/jpeg:".esc_url_raw($image), 74, "\n ", true); + $output .= " +{$image}"; +} +//add categories if there are any +if( !empty($categories) ){ + $categories = wordwrap("CATEGORIES:".implode(',', $categories), 74, "\n ", true); + $output .= " +{$categories}"; +} +//Location if there is one +if( $location ){ + $output .= " +{$location}"; + //geo coordinates if they exist + if( $geo ){ + $output .= " +{$geo}"; + } + //create apple-compatible feature for locations + if( !empty($apple_structured_location) ){ + $output .= " +{$apple_structured_location}"; + } +} +//end the event +$output .= " +END:VEVENT"; + + //clean up new lines, rinse and repeat + echo preg_replace("/([^\r])\n/", "$1\r\n", $output); + $count++; + } + if( $ical_limit != 0 && $count >= $ical_limit ){ + //we've reached our limit, or showing one event only + break; + }else{ + //get next page of results + $args['page']++; + $EM_Events = EM_Events::get( $args ); + } +} + +//calendar footer +$output = "\r\n"."END:VCALENDAR"; +echo preg_replace("/([^\r])\n/", "$1\r\n", $output); \ No newline at end of file diff --git a/plugins/events-manager/templates/location-single.php b/plugins/events-manager/templates/location-single.php new file mode 100644 index 0000000..595ae79 --- /dev/null +++ b/plugins/events-manager/templates/location-single.php @@ -0,0 +1,17 @@ +output_single(); +?> \ No newline at end of file diff --git a/plugins/events-manager/templates/locations-list.php b/plugins/events-manager/templates/locations-list.php new file mode 100644 index 0000000..1da84c7 --- /dev/null +++ b/plugins/events-manager/templates/locations-list.php @@ -0,0 +1,17 @@ +"; + +echo EM_Locations::output( $args ); + +if( get_option('dbem_css_loclist') ) echo ""; \ No newline at end of file diff --git a/plugins/events-manager/templates/locations-search.php b/plugins/events-manager/templates/locations-search.php new file mode 100644 index 0000000..d962549 --- /dev/null +++ b/plugins/events-manager/templates/locations-search.php @@ -0,0 +1,14 @@ +$args)); +?> \ No newline at end of file diff --git a/plugins/events-manager/templates/map-global.php b/plugins/events-manager/templates/map-global.php new file mode 100644 index 0000000..0a2b14e --- /dev/null +++ b/plugins/events-manager/templates/map-global.php @@ -0,0 +1,26 @@ + +
; height: ;'> +
' style="width:100%; height:100%">
+
' style="display:none; visibility:hidden;">
+ + + +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/my-bookings.php b/plugins/events-manager/templates/my-bookings.php new file mode 100644 index 0000000..1f761d9 --- /dev/null +++ b/plugins/events-manager/templates/my-bookings.php @@ -0,0 +1,97 @@ + +get_bookings(); + $bookings_count = count($EM_Bookings->bookings); + if($bookings_count > 0){ + //Get events here in one query to speed things up + $event_ids = array(); + foreach($EM_Bookings as $EM_Booking){ + $event_ids[] = $EM_Booking->event_id; + } + } + $limit = ( !empty($_GET['limit']) ) ? $_GET['limit'] : 20;//Default limit + $page = ( !empty($_GET['pno']) ) ? $_GET['pno']:1; + $offset = ( $page > 1 ) ? ($page-1)*$limit : 0; + echo $EM_Notices; + ?> +
+ = $limit ) : ?> +
+ = $limit ) { + $link = em_add_get_params($_SERVER['REQUEST_URI'], array('pno'=>'%PAGE%'), false); //don't html encode, so em_paginate does its thing + $bookings_nav = em_paginate( $link, $bookings_count, $limit, $page); + echo $bookings_nav; + } + ?> +
+
+ +
+ 0 ): ?> +
+ + + + + + + + + + + + get_event(); + if( ($rowno < $limit || empty($limit)) && ($event_count >= $offset || $offset === 0) ) { + $rowno++; + ?> + + + + + + + + + +
 
output("#_EVENTLINK"); ?>start ); ?>get_spaces() ?> + get_status(); ?> + + booking_status, array(2,3)) && get_option('dbem_bookings_user_cancellation') && $EM_Event->get_bookings()->has_open_time() ){ + $cancel_url = em_add_get_params($_SERVER['REQUEST_URI'], array('action'=>'booking_cancel', 'booking_id'=>$EM_Booking->booking_id, '_wpnonce'=>$nonce)); + $cancel_link = ''.__('Cancel','events-manager').''; + } + echo apply_filters('em_my_bookings_booking_actions', $cancel_link, $EM_Booking); + ?> +
+
+ + + + = $limit ) : ?> +
+ +
+
+ +
+ + +

Log In to view your bookings.','events-manager'),site_url('wp-login.php?redirect_to=' . urlencode(get_permalink()), 'login'))?>

+ \ No newline at end of file diff --git a/plugins/events-manager/templates/readme.txt b/plugins/events-manager/templates/readme.txt new file mode 100644 index 0000000..3ab4eb6 --- /dev/null +++ b/plugins/events-manager/templates/readme.txt @@ -0,0 +1,10 @@ +This folder has files containing various templates used by events manager. The file names are quite descriptive as to their functions. + +Any of these files in this folder can be individually overriden in your theme folder, making it upgrade safe without having to hack core plugin files directly. + +To override a file, copy (not move) the file to wp-content/themes/yourtheme/plugins/events-manager/templates/ and edit as needed. + +If the file is within a subfolder of this directory, create that subdirectory in your theme path above and copy the file there. + +Whilst we intend to keep changes to a minimum, it may be inevitable that we need to update these files to add new features or fix a +reported bug, please keep this in mind when updating. \ No newline at end of file diff --git a/plugins/events-manager/templates/rss.php b/plugins/events-manager/templates/rss.php new file mode 100644 index 0000000..eb21769 --- /dev/null +++ b/plugins/events-manager/templates/rss.php @@ -0,0 +1,57 @@ +'."\n"; +?> + + + <?php echo esc_html(get_option ( 'dbem_rss_main_title' )); ?> + + + http://blogs.law.harvard.edu/tech/rss + + + ", ">", str_replace ( "<", "<", get_option ( 'dbem_rss_description_format' ) ) ); + $rss_limit = get_option('dbem_rss_limit'); + $page_limit = $rss_limit > 50 || !$rss_limit ? 50 : $rss_limit; //set a limit of 50 to output at a time, unless overall limit is lower + $args = !empty($args) ? $args:array(); /* @var $args array */ + $args = array_merge(array('scope'=>get_option('dbem_rss_scope'), 'owner'=>false, 'limit'=>$page_limit, 'page'=>1, 'order'=>get_option('dbem_rss_order'), 'orderby'=>get_option('dbem_rss_orderby')), $args); + $args = apply_filters('em_rss_template_args',$args); + $EM_Events = EM_Events::get( $args ); + $count = 0; + while( count($EM_Events) > 0 ){ + foreach ( $EM_Events as $EM_Event ) { + /* @var $EM_Event EM_Event */ + $description = $EM_Event->output( get_option ( 'dbem_rss_description_format' ), "rss"); + $description = ent2ncr(convert_chars($description)); //Some RSS filtering + $event_url = $EM_Event->output('#_EVENTURL'); + ?> + + <?php echo $EM_Event->output( get_option('dbem_rss_title_format'), "rss" ); ?> + + + start), 'D, d M Y H:i:s +0000'); ?> + ]]> + + = $rss_limit ){ + //we've reached our limit, or showing one event only + break; + }else{ + //get next page of results + $args['page']++; + $EM_Events = EM_Events::get( $args ); + } + } + ?> + + + \ No newline at end of file diff --git a/plugins/events-manager/templates/search/categories.php b/plugins/events-manager/templates/search/categories.php new file mode 100644 index 0000000..2dabdf2 --- /dev/null +++ b/plugins/events-manager/templates/search/categories.php @@ -0,0 +1,23 @@ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/geo-units.php b/plugins/events-manager/templates/search/geo-units.php new file mode 100644 index 0000000..b927934 --- /dev/null +++ b/plugins/events-manager/templates/search/geo-units.php @@ -0,0 +1,20 @@ + + +
style="display:none;"> + + +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/geo.js b/plugins/events-manager/templates/search/geo.js new file mode 100644 index 0000000..bd2bb37 --- /dev/null +++ b/plugins/events-manager/templates/search/geo.js @@ -0,0 +1,100 @@ +function em_geo_search_init(){ + jQuery('input.em-search-geo').each(function(i){ + var input = /** @type {HTMLInputElement} */ jQuery(this); + var wrapper = input.closest('div.em-search-geo'); + var autocomplete = new google.maps.places.Autocomplete(input[0]); + var geo_coords = wrapper.find("input.em-search-geo-coords"); + + var geo_field_status = function( status ){ + wrapper.data('status',status); + var em_search = wrapper.closest('.em-search'); + if( status == 'on' ){ + wrapper.css('background-image', wrapper.css('background-image').replace('search-geo.png', 'search-geo-on.png').replace('search-geo-off.png', 'search-geo-on.png')); + em_search.find('select.em-search-country option:first-child').prop('selected','selected').trigger('change'); + em_search.find('.em-search-location').slideUp(); + em_search.find('.em-search-geo-units').slideDown(); + }else{ + if( status == 'off' ){ + wrapper.css('background-image', wrapper.css('background-image').replace('search-geo.png', 'search-geo-off.png').replace('search-geo-on.png', 'search-geo-off.png')); + }else{ + wrapper.css('background-image', wrapper.css('background-image').replace('search-geo-off.png', 'search-geo.png').replace('search-geo-on.png', 'search-geo.png')); + } + geo_coords.val(''); + em_search.find('.em-search-location').slideDown(); + em_search.find('.em-search-geo-units').slideUp(); + } + }; + + var ac_listener = function( place ) { + var place = autocomplete.getPlace(); + if( !place || !place.geometry ){ //place not found + if( input.val() == '' || input.val() == EM.geo_placeholder ){ + geo_field_status(false); + }else{ + if( wrapper.data('last-search') == input.val() ){ + geo_field_status('on'); + geo_coords.val( wrapper.data('last-coords') ); + return; + } + //do a nearest match suggestion as last resort + if( input.val().length >= 2 ){ + geo_field_status(false); + autocompleteService = new google.maps.places.AutocompleteService(); + autocompleteService.getPlacePredictions( {'input': input.val(), 'offset': input.val().length }, function listentoresult(list, status) { + if(list != null && list.length != 0) { + placesService = new google.maps.places.PlacesService(document.getElementById('em-search-geo-attr')); + placesService.getDetails( {'reference': list[0].reference}, function detailsresult(detailsResult, placesServiceStatus) { + //we have a match, ask the user + wrapper.data('last-search', detailsResult.formatted_address ); + wrapper.data('last-coords', detailsResult.geometry.location.lat() + ',' + detailsResult.geometry.location.lng()); + if( input.val() == detailsResult.formatted_address || confirm(EM.geo_alert_guess.replace('%s', '"'+detailsResult.formatted_address+'"')) ){ + geo_coords.val( detailsResult.geometry.location.lat() + ',' + detailsResult.geometry.location.lng() ); + geo_field_status('on'); + input.val(detailsResult.formatted_address); + }else{ + input.data('last-key',false); + geo_field_status('off'); + } + }); + }else{ geo_field_status('off'); } + }); + }else{ geo_field_status('off'); } + } + wrapper.data('last-search', input.val() ); + wrapper.data('last-coords', geo_coords.val()); + return; + } + geo_coords.val( place.geometry.location.lat() + ',' + place.geometry.location.lng() ); + geo_field_status('on'); + wrapper.data('last-search', input.val() ); + wrapper.data('last-coords', geo_coords.val()); + }; + google.maps.event.addListener(autocomplete, 'place_changed', ac_listener); + + if( geo_coords.val() != '' ){ + geo_field_status('on'); + wrapper.data('last-search', input.val() ); + wrapper.data('last-coords', geo_coords.val() ); + } + input.keypress( function(e) { + //if enter is pressed once during 'near' input, don't do anything so Google can select location, otherwise let behavior (form submittal) proceed + if( e.which == 13 ) { + if( input.data('last-key') != 13 || wrapper.data('status') != 'on' ){ + e.preventDefault(); + } + }else{ + geo_field_status(false); + } + }).keyup( function(e) { + if( this.value == '' ){ geo_field_status(false); } + else if( wrapper.data('last-search') != this.value ){ geo_field_status('off'); } + input.data('last-key', e.which); + }).blur( function(e){ //create HTML 5 placeholder effect if not HTML 5 + if( this.value == '' && !('placeholder' in document.createElement('input')) ) this.value = EM.geo_placeholder; + }).focus( function(e){ + if( this.value == EM.geo_placeholder ) this.value=''; + input.data('last-key', 13); + }).attr('placeholder', EM.geo_placeholder); + }); +} +jQuery(document).bind('em_maps_loaded', function(){ em_geo_search_init(); }); \ No newline at end of file diff --git a/plugins/events-manager/templates/search/geo.php b/plugins/events-manager/templates/search/geo.php new file mode 100644 index 0000000..f34ee9d --- /dev/null +++ b/plugins/events-manager/templates/search/geo.php @@ -0,0 +1,23 @@ + + +
+ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/location-countries.php b/plugins/events-manager/templates/search/location-countries.php new file mode 100644 index 0000000..0680c7d --- /dev/null +++ b/plugins/events-manager/templates/search/location-countries.php @@ -0,0 +1,27 @@ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/location-regions.php b/plugins/events-manager/templates/search/location-regions.php new file mode 100644 index 0000000..fcbea33 --- /dev/null +++ b/plugins/events-manager/templates/search/location-regions.php @@ -0,0 +1,24 @@ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/location-states.php b/plugins/events-manager/templates/search/location-states.php new file mode 100644 index 0000000..98e75ef --- /dev/null +++ b/plugins/events-manager/templates/search/location-states.php @@ -0,0 +1,25 @@ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/location-towns.php b/plugins/events-manager/templates/search/location-towns.php new file mode 100644 index 0000000..db27d65 --- /dev/null +++ b/plugins/events-manager/templates/search/location-towns.php @@ -0,0 +1,26 @@ + + +
+ +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/location.php b/plugins/events-manager/templates/search/location.php new file mode 100644 index 0000000..43bf97a --- /dev/null +++ b/plugins/events-manager/templates/search/location.php @@ -0,0 +1,18 @@ + +
style="display:none;"> + $args)); + }else{ + ?> +
style="display:none;"> + $args)); + if( !empty($args['search_states']) ) em_locate_template('templates/search/location-states.php',true,array('args'=>$args)); + if( !empty($args['search_towns']) ) em_locate_template('templates/search/location-towns.php',true,array('args'=>$args)); + ?> +
+
\ No newline at end of file diff --git a/plugins/events-manager/templates/search/scope.php b/plugins/events-manager/templates/search/scope.php new file mode 100644 index 0000000..461ac71 --- /dev/null +++ b/plugins/events-manager/templates/search/scope.php @@ -0,0 +1,17 @@ + + +
+ + + + +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/search/search.php b/plugins/events-manager/templates/search/search.php new file mode 100644 index 0000000..9594849 --- /dev/null +++ b/plugins/events-manager/templates/search/search.php @@ -0,0 +1,15 @@ + + +
+ + +
+ \ No newline at end of file diff --git a/plugins/events-manager/templates/tag-single.php b/plugins/events-manager/templates/tag-single.php new file mode 100644 index 0000000..4bc9533 --- /dev/null +++ b/plugins/events-manager/templates/tag-single.php @@ -0,0 +1,12 @@ +output_single(); +?> \ No newline at end of file diff --git a/plugins/events-manager/templates/tags-list.php b/plugins/events-manager/templates/tags-list.php new file mode 100644 index 0000000..e1af902 --- /dev/null +++ b/plugins/events-manager/templates/tags-list.php @@ -0,0 +1,17 @@ +"; + +echo EM_Tags::output( $args ); + +if( get_option('dbem_css_taglist') ) echo ""; \ No newline at end of file diff --git a/style.css b/style.css index 142e32a..34e02ad 100644 --- a/style.css +++ b/style.css @@ -1,5 +1,5 @@ /* - Theme Name: Your Theme Name + Theme Name: Leon Corre Theme Theme URI: https://yourwebsite.com Author: Your Name Author URI: https://yourwebsite.com @@ -10,4 +10,50 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: Text Domain: twentyseventeen-child - */ \ No newline at end of file + */ + @import url('https://fonts.googleapis.com/css?family=Roboto|Roboto+Slab'); + +body, +button, +input, +select, +textarea { +color: #333; +/*font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;*/ +font-family:"Roboto Slab",arial !important; +font-size: 15px; +font-size: 0.9375rem; +font-weight: 400; +line-height: 1.66; +} + +p { +font-family:"Roboto",arial !important; +text-align:justify !important; +} + +p.site-description {text-align:center !important;} +select {width:100%;} + +ul, +ol {padding: 0 50px; } +li {padding:5px;} +.elementor-widget-heading .elementor-heading-title {color:#000 !important;} +/*.wrap {padding:30px !important;}*/ +.page.page-one-column .entry-header, .twentyseventeen-front-page.page-one-column .entry-header, .archive.page-one-column:not(.has-sidebar) .page-header {margin-bottom:1em !important;} +.custom-logo {width:200px !important;height:auto !important;max-height:1000px !important;} + +.main-navigation a:hover, +a +{ color:#008000;} +.page .panel-content .entry-title, .page-title, body.page:not(.twentyseventeen-front-page) .entry-title +{color: #000000; +font-family:"Libre Franklin", "Helvetica Neue", helvetica; +} +.elementor-divider-separator {border:2px solid #008000 !important;} +strong {color:#008000;} +button, input[type="button"], input[type="submit"] +{background-color:#008000;} +h2 {font-weight:500;color:#008000;} + +.navigation-top {bottom:auto !important; top:0 !important; } diff --git a/template-parts/footer/footer-widgets.php b/template-parts/footer/footer-widgets.php new file mode 100644 index 0000000..ed6bb59 --- /dev/null +++ b/template-parts/footer/footer-widgets.php @@ -0,0 +1,32 @@ + + + + + + + diff --git a/template-parts/footer/site-info.php b/template-parts/footer/site-info.php new file mode 100644 index 0000000..8455dc4 --- /dev/null +++ b/template-parts/footer/site-info.php @@ -0,0 +1,14 @@ + +
+ +
diff --git a/template-parts/header/header-image.php b/template-parts/header/header-image.php new file mode 100644 index 0000000..390debc --- /dev/null +++ b/template-parts/header/header-image.php @@ -0,0 +1,20 @@ + +
+ +
+ +
+ + + +
diff --git a/template-parts/header/site-branding.php b/template-parts/header/site-branding.php new file mode 100644 index 0000000..475e374 --- /dev/null +++ b/template-parts/header/site-branding.php @@ -0,0 +1,38 @@ + +
+
+ +
+ +

+ +

+ + + +

+ +
+ + + 'arrow-right' ) ); ?> + + +
+
diff --git a/template-parts/navigation/navigation-top.php b/template-parts/navigation/navigation-top.php new file mode 100644 index 0000000..2c2115e --- /dev/null +++ b/template-parts/navigation/navigation-top.php @@ -0,0 +1,29 @@ + + diff --git a/template-parts/page/content-front-page-panels.php b/template-parts/page/content-front-page-panels.php new file mode 100644 index 0000000..51abf41 --- /dev/null +++ b/template-parts/page/content-front-page-panels.php @@ -0,0 +1,79 @@ + + +
> + + ID ), 'twentyseventeen-featured-image' ); + + // Calculate aspect ratio: h / w * 100%. + $ratio = $thumbnail[2] / $thumbnail[1] * 100; + ?> + +
+
+
+ + + +
+
+
+ ', '' ); ?> + + + +
+ +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + ?> +
+ + + + 3, + 'post_status' => 'publish', + 'ignore_sticky_posts' => true, + 'no_found_rows' => true, + ) ); + ?> + + have_posts() ) : ?> + +
+ + have_posts() ) : $recent_posts->the_post(); + get_template_part( 'template-parts/post/content', 'excerpt' ); + endwhile; + wp_reset_postdata(); + ?> +
+ + + +
+
+ +
diff --git a/template-parts/page/content-front-page.php b/template-parts/page/content-front-page.php new file mode 100644 index 0000000..e731888 --- /dev/null +++ b/template-parts/page/content-front-page.php @@ -0,0 +1,53 @@ + +
> + + ID ), 'twentyseventeen-featured-image' ); + + $post_thumbnail_id = get_post_thumbnail_id( $post->ID ); + + $thumbnail_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'twentyseventeen-featured-image' ); + + // Calculate aspect ratio: h / w * 100%. + $ratio = $thumbnail_attributes[2] / $thumbnail_attributes[1] * 100; + ?> + +
+
+
+ + + +
+
+
+ ', '' ); ?> + + + +
+ +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + ?> +
+ +
+
+ +
diff --git a/template-parts/page/content-page.php b/template-parts/page/content-page.php new file mode 100644 index 0000000..4c470ac --- /dev/null +++ b/template-parts/page/content-page.php @@ -0,0 +1,30 @@ + + +
> +
+ ', '' ); ?> + +
+
+ '', + ) ); + ?> +
+
diff --git a/template-parts/post/content-audio.php b/template-parts/post/content-audio.php new file mode 100644 index 0000000..63cf2e5 --- /dev/null +++ b/template-parts/post/content-audio.php @@ -0,0 +1,105 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + + + +
+ + + +
+ + +
+ + '; + echo $audio_html; + echo '
'; + } + }; + + }; + + if ( is_single() || empty( $audio ) ) { + + /* translators: %s: Name of current post */ + the_content( sprintf( + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + + }; + ?> + + + + + +
diff --git a/template-parts/post/content-excerpt.php b/template-parts/post/content-excerpt.php new file mode 100644 index 0000000..a552fba --- /dev/null +++ b/template-parts/post/content-excerpt.php @@ -0,0 +1,46 @@ + + +
> + +
+ + + + + + + ', esc_url( get_permalink() ) ), '' ); + } else { + the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); + } ?> +
+ +
+ +
+ +
diff --git a/template-parts/post/content-gallery.php b/template-parts/post/content-gallery.php new file mode 100644 index 0000000..f5934e1 --- /dev/null +++ b/template-parts/post/content-gallery.php @@ -0,0 +1,92 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ + '; + echo get_post_gallery(); + echo '
'; + }; + + }; + + if ( is_single() || ! get_post_gallery() ) { + + /* translators: %s: Name of current post */ + the_content( sprintf( + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + + }; + ?> + + + + + +
diff --git a/template-parts/post/content-image.php b/template-parts/post/content-image.php new file mode 100644 index 0000000..91c6545 --- /dev/null +++ b/template-parts/post/content-image.php @@ -0,0 +1,81 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ + "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + + }; + ?> + +
+ + + +
diff --git a/template-parts/post/content-none.php b/template-parts/post/content-none.php new file mode 100644 index 0000000..c42941b --- /dev/null +++ b/template-parts/post/content-none.php @@ -0,0 +1,33 @@ + + +
+ +
+ + +

Get started here.', 'twentyseventeen' ), esc_url( admin_url( 'post-new.php' ) ) ); ?>

+ + + +

+ +
+
diff --git a/template-parts/post/content-video.php b/template-parts/post/content-video.php new file mode 100644 index 0000000..dad681f --- /dev/null +++ b/template-parts/post/content-video.php @@ -0,0 +1,103 @@ + + +
> + 'thumb-tack' ) ); + } + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + } + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + + + +
+ + + +
+ + +
+ + '; + echo $video_html; + echo '
'; + } + }; + + }; + + if ( is_single() || empty( $video ) ) { + + /* translators: %s: Name of current post */ + the_content( sprintf( + __( 'Continue reading "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + }; + ?> + + + + + +
diff --git a/template-parts/post/content.php b/template-parts/post/content.php new file mode 100644 index 0000000..90c3a4d --- /dev/null +++ b/template-parts/post/content.php @@ -0,0 +1,75 @@ + + +
> + 'thumb-tack' ) ); + endif; + ?> +
+ '; + if ( is_single() ) { + twentyseventeen_posted_on(); + } else { + echo twentyseventeen_time_link(); + twentyseventeen_edit_link(); + }; + echo ''; + }; + + if ( is_single() ) { + the_title( '

', '

' ); + } elseif ( is_front_page() && is_home() ) { + the_title( '

', '

' ); + } else { + the_title( '

', '

' ); + } + ?> +
+ + +
+ + + +
+ + +
+ "%s"', 'twentyseventeen' ), + get_the_title() + ) ); + + wp_link_pages( array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + ) ); + ?> +
+ + + +