Version Description
Fixed: show google maps conflict with other plugins Fixed: geolocation bug Fixed: save organizer featured image issue
Download this release
Release Info
Developer | webdorado |
Plugin | Event Calendar WD – Responsive Event Calendar plugin |
Version | 1.0.9 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.0.9
- css/admin/admin.css +37 -37
- ecwd.php +1 -1
- ecwd_admin_class.php +1 -1
- ecwd_class.php +9 -5
- includes/calendar-class.php +1 -1
- includes/ecwd-cpt-class.php +158 -154
- readme.txt +42 -26
- views/admin/addons.php +6 -0
css/admin/admin.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* Admin CSS file
|
3 |
*/
|
4 |
#ecwd-tabs > div{
|
5 |
-
|
6 |
}
|
7 |
#ecwd-settings{
|
8 |
background: #ffffff;
|
@@ -112,7 +112,7 @@
|
|
112 |
|
113 |
}
|
114 |
.ecwd-events .ecwd-calendar-event-edit a{
|
115 |
-
|
116 |
display: inline-block;
|
117 |
float: left;
|
118 |
margin: 0 1px;
|
@@ -234,12 +234,12 @@
|
|
234 |
}
|
235 |
|
236 |
#ecwd-settings-content .nav-tab-wrapper a{
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
}
|
244 |
|
245 |
.ecwd-tabs li a:focus{
|
@@ -253,7 +253,7 @@
|
|
253 |
|
254 |
#ecwd-settings-content .nav-tab-wrapper {
|
255 |
border-bottom:0;
|
256 |
-
|
257 |
}
|
258 |
|
259 |
.ecwd-tabs li:hover,.ecwd-tabs li.ui-state-active,
|
@@ -500,14 +500,14 @@ span.ecwd_error{
|
|
500 |
float: left;
|
501 |
}
|
502 |
.ecwd-import-settings form{
|
503 |
-
|
504 |
-
|
505 |
}
|
506 |
.ecwd-import-settings input[type=file]{
|
507 |
-
|
508 |
}
|
509 |
.ecwd-import-settings .ecwd-calendar-event-import{
|
510 |
-
|
511 |
}
|
512 |
|
513 |
#ecwd-settings-content #add_on_title{
|
@@ -523,45 +523,45 @@ span.ecwd_error{
|
|
523 |
left: 0;
|
524 |
}
|
525 |
#ecwd-settings-content .ecwd-add-on a{
|
526 |
-
|
527 |
}
|
528 |
#ecwd-settings-content .ecwd-add-on h2{
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
}
|
536 |
#ecwd-settings-content .ecwd-addon-descr{
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
}
|
542 |
#ecwd-settings-content .ecwd-addon-descr a{
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
position: absolute;
|
551 |
left: 20px;
|
552 |
bottom: 0;
|
553 |
}
|
554 |
#ecwd-settings-content .ecwd-addon-descr span{
|
555 |
-
|
556 |
-
|
557 |
}
|
558 |
#ecwd-settings-content a:focus{
|
559 |
outline:none;
|
560 |
-
|
561 |
}
|
562 |
#ecwd-settings-content .ecwd-add-on{
|
563 |
width:310px;
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
}
|
2 |
* Admin CSS file
|
3 |
*/
|
4 |
#ecwd-tabs > div{
|
5 |
+
display:none;
|
6 |
}
|
7 |
#ecwd-settings{
|
8 |
background: #ffffff;
|
112 |
|
113 |
}
|
114 |
.ecwd-events .ecwd-calendar-event-edit a{
|
115 |
+
font-size: 0;
|
116 |
display: inline-block;
|
117 |
float: left;
|
118 |
margin: 0 1px;
|
234 |
}
|
235 |
|
236 |
#ecwd-settings-content .nav-tab-wrapper a{
|
237 |
+
background: #ffffff;
|
238 |
+
height: 21px;
|
239 |
+
margin-right: 4px;
|
240 |
+
display: inline-block;
|
241 |
+
font-weight: normal;
|
242 |
+
padding-top: 2px;
|
243 |
}
|
244 |
|
245 |
.ecwd-tabs li a:focus{
|
253 |
|
254 |
#ecwd-settings-content .nav-tab-wrapper {
|
255 |
border-bottom:0;
|
256 |
+
padding-left: 0;
|
257 |
}
|
258 |
|
259 |
.ecwd-tabs li:hover,.ecwd-tabs li.ui-state-active,
|
500 |
float: left;
|
501 |
}
|
502 |
.ecwd-import-settings form{
|
503 |
+
float:left;
|
504 |
+
width:45%;
|
505 |
}
|
506 |
.ecwd-import-settings input[type=file]{
|
507 |
+
margin: 10px 0;
|
508 |
}
|
509 |
.ecwd-import-settings .ecwd-calendar-event-import{
|
510 |
+
font-size: 15px;
|
511 |
}
|
512 |
|
513 |
#ecwd-settings-content #add_on_title{
|
523 |
left: 0;
|
524 |
}
|
525 |
#ecwd-settings-content .ecwd-add-on a{
|
526 |
+
text-decoration: none;
|
527 |
}
|
528 |
#ecwd-settings-content .ecwd-add-on h2{
|
529 |
+
color: #229DBF;
|
530 |
+
font-size: 17px;
|
531 |
+
border-bottom: 1px solid #898989;
|
532 |
+
width: 92%;
|
533 |
+
margin-bottom: 17px;
|
534 |
+
padding: 5px 0 7px 0;
|
535 |
}
|
536 |
#ecwd-settings-content .ecwd-addon-descr{
|
537 |
+
font-size: 15px;
|
538 |
+
line-height: 20px;
|
539 |
+
width: 90%;
|
540 |
+
color: #303030;
|
541 |
}
|
542 |
#ecwd-settings-content .ecwd-addon-descr a{
|
543 |
+
display: inline-block;
|
544 |
+
margin-top: 15px;
|
545 |
+
background: #229DBF url(../images/Add_Ons.jpg) no-repeat 6px center;
|
546 |
+
color: #D2EBF0;
|
547 |
+
padding: 9px 12px 9px 45px;
|
548 |
+
font-size: 17px;
|
549 |
+
border: 1px solid #93BBC7;
|
550 |
position: absolute;
|
551 |
left: 20px;
|
552 |
bottom: 0;
|
553 |
}
|
554 |
#ecwd-settings-content .ecwd-addon-descr span{
|
555 |
+
padding: 5px 0 5px 10px;
|
556 |
+
border-left: 1px solid #93CEE0;
|
557 |
}
|
558 |
#ecwd-settings-content a:focus{
|
559 |
outline:none;
|
560 |
+
box-shadow:none;
|
561 |
}
|
562 |
#ecwd-settings-content .ecwd-add-on{
|
563 |
width:310px;
|
564 |
+
float:left;
|
565 |
+
margin-right:40px;
|
566 |
+
margin-bottom:35px;
|
567 |
}
|
ecwd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Event Calendar WD
|
4 |
* Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
|
5 |
* Description: Event Calendar WD is an easy event management and planning tool with advanced features.
|
6 |
-
* Version: 1.0.
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
3 |
* Plugin Name: Event Calendar WD
|
4 |
* Plugin URI: https://web-dorado.com/products/wordpress-event-calendar-wd.html
|
5 |
* Description: Event Calendar WD is an easy event management and planning tool with advanced features.
|
6 |
+
* Version: 1.0.9
|
7 |
* Author: WebDorado
|
8 |
* Author URI: http://web-dorado.com
|
9 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
ecwd_admin_class.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
class ECWD_Admin {
|
7 |
|
8 |
protected static $instance = null;
|
9 |
-
protected $version = '1.0.
|
10 |
protected $ecwd_page = null;
|
11 |
|
12 |
private function __construct() {
|
6 |
class ECWD_Admin {
|
7 |
|
8 |
protected static $instance = null;
|
9 |
+
protected $version = '1.0.9';
|
10 |
protected $ecwd_page = null;
|
11 |
|
12 |
private function __construct() {
|
ecwd_class.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
*/
|
7 |
class ECWD {
|
8 |
|
9 |
-
protected $version = '1.0.
|
10 |
protected $plugin_name = 'event-calendar-wd';
|
11 |
protected $prefix = 'ecwd';
|
12 |
protected $old_version = '1.4.11';
|
@@ -105,14 +105,18 @@ class ECWD {
|
|
105 |
public function enqueue_scripts() {
|
106 |
global $wp_scripts;
|
107 |
$map_included = false;
|
108 |
-
if
|
109 |
foreach ( $wp_scripts->registered as $wp_script ) {
|
110 |
-
if ( $wp_script->src && (
|
111 |
-
$
|
112 |
-
|
|
|
|
|
|
|
113 |
}
|
114 |
}
|
115 |
}
|
|
|
116 |
if ( ! $map_included ) {
|
117 |
wp_enqueue_script( $this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places', array( 'jquery' ), $this->version, true );
|
118 |
}
|
6 |
*/
|
7 |
class ECWD {
|
8 |
|
9 |
+
protected $version = '1.0.9';
|
10 |
protected $plugin_name = 'event-calendar-wd';
|
11 |
protected $prefix = 'ecwd';
|
12 |
protected $old_version = '1.4.11';
|
105 |
public function enqueue_scripts() {
|
106 |
global $wp_scripts;
|
107 |
$map_included = false;
|
108 |
+
if(isset($wp_scripts->registered) && $wp_scripts->registered) {
|
109 |
foreach ( $wp_scripts->registered as $wp_script ) {
|
110 |
+
if ( $wp_script->src && (strpos( $wp_script->src, 'maps.googleapis.com' ) || strpos( $wp_script->src, 'maps.google.com' )) !== false ) {
|
111 |
+
if(is_array($wp_scripts->queue) && in_array($wp_script->handle, $wp_scripts->queue)) {
|
112 |
+
$map_included = true;
|
113 |
+
break;
|
114 |
+
}
|
115 |
+
|
116 |
}
|
117 |
}
|
118 |
}
|
119 |
+
|
120 |
if ( ! $map_included ) {
|
121 |
wp_enqueue_script( $this->prefix . '-maps-public', 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places', array( 'jquery' ), $this->version, true );
|
122 |
}
|
includes/calendar-class.php
CHANGED
@@ -964,7 +964,7 @@ class Calendar {
|
|
964 |
$svalue = $this->search_params['query'];
|
965 |
}
|
966 |
$html .= '<div class="ecwd-search">
|
967 |
-
<input class="ecwd-search" name="search" type="text"
|
968 |
. '<button class="btn btn-default ecwd-search-submit"><span class="glyphicon glyphicon-search"></span><i class="fa fa-search"></i></button>
|
969 |
</div>';
|
970 |
}
|
964 |
$svalue = $this->search_params['query'];
|
965 |
}
|
966 |
$html .= '<div class="ecwd-search">
|
967 |
+
<input class="ecwd-search" name="search" type="text" value="' . $svalue . '">'
|
968 |
. '<button class="btn btn-default ecwd-search-submit"><span class="glyphicon glyphicon-search"></span><i class="fa fa-search"></i></button>
|
969 |
</div>';
|
970 |
}
|
includes/ecwd-cpt-class.php
CHANGED
@@ -17,7 +17,7 @@ class ECWD_Cpt {
|
|
17 |
|
18 |
|
19 |
//actions
|
20 |
-
add_action( 'init', array( $this, 'setup_cpt' ));
|
21 |
|
22 |
add_action( 'pre_get_posts', array( $this, 'add_custom_post_type_to_query' ) );
|
23 |
add_action( 'add_meta_boxes', array( $this, 'calendars_cpt_meta' ) );
|
@@ -64,7 +64,7 @@ class ECWD_Cpt {
|
|
64 |
$this,
|
65 |
'taxonomy_column'
|
66 |
), 10, 3 );
|
67 |
-
add_filter( 'generate_rewrite_rules', array( $this, 'filterRewriteRules' ), 2);
|
68 |
|
69 |
|
70 |
add_action( 'wp_ajax_manage_calendar_events', array( $this, 'save_events' ) );
|
@@ -80,11 +80,11 @@ class ECWD_Cpt {
|
|
80 |
) );
|
81 |
add_filter( 'manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_columns', array( $this, 'add_column_headers' ) );
|
82 |
|
83 |
-
add_filter( 'template_include', array($this, 'ecwd_templates') );
|
84 |
|
85 |
//category filter
|
86 |
-
add_filter('init',array($this, 'event_restrict_manage'));
|
87 |
-
|
88 |
}
|
89 |
|
90 |
|
@@ -177,10 +177,10 @@ class ECWD_Cpt {
|
|
177 |
*/
|
178 |
public function setup_cpt() {
|
179 |
global $ecwd_options;
|
180 |
-
$rewrite
|
181 |
-
$venue_rewrite
|
182 |
$organizer_rewrite = false;
|
183 |
-
$event_supports
|
184 |
if ( isset( $ecwd_options['event_comments'] ) && $ecwd_options['event_comments'] == 1 ) {
|
185 |
$event_supports[] = 'comments';
|
186 |
}
|
@@ -204,9 +204,9 @@ class ECWD_Cpt {
|
|
204 |
|
205 |
$this->rewriteSlug = ( isset( $ecwd_options['events_slug'] ) && $ecwd_options['events_slug'] !== '' ) ? $ecwd_options['events_slug'] : $defaultSlug . 's';
|
206 |
$this->rewriteSlugSingular = ( isset( $ecwd_options['event_slug'] ) && $ecwd_options['event_slug'] !== '' ) ? $ecwd_options['event_slug'] : $defaultSlug;
|
207 |
-
$rewrite
|
208 |
-
$venue_rewrite
|
209 |
-
$organizer_rewrite
|
210 |
}
|
211 |
//calendars
|
212 |
$calendar_labels = array(
|
@@ -245,6 +245,45 @@ class ECWD_Cpt {
|
|
245 |
register_post_type( self::CALENDAR_POST_TYPE, $calendar_args );
|
246 |
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
//events
|
249 |
$labels = array(
|
250 |
'name' => __( 'Events', 'ecwd' ),
|
@@ -289,43 +328,6 @@ class ECWD_Cpt {
|
|
289 |
register_post_type( self::EVENT_POST_TYPE, $args );
|
290 |
|
291 |
|
292 |
-
//events organizers
|
293 |
-
$organizers_labels = array(
|
294 |
-
'name' => __( 'Organizers', 'ecwd' ),
|
295 |
-
'singular_name' => __( 'Organizer', 'ecwd' ),
|
296 |
-
'name_admin_bar' => __( 'Organizer', 'ecwd' ),
|
297 |
-
'add_new' => __( 'Add New', 'ecwd' ),
|
298 |
-
'add_new_item' => __( 'Add New Organizer', 'ecwd' ),
|
299 |
-
'new_item' => __( 'New Organizer', 'ecwd' ),
|
300 |
-
'edit_item' => __( 'Edit Organizer', 'ecwd' ),
|
301 |
-
'view_item' => __( 'View Organizer', 'ecwd' ),
|
302 |
-
'all_items' => __( 'All Organizers', 'ecwd' ),
|
303 |
-
'search_items' => __( 'Search Organizer', 'ecwd' ),
|
304 |
-
'not_found' => __( 'No Organizers found.', 'ecwd' ),
|
305 |
-
'not_found_in_trash' => __( 'No Organizers found in Trash.', 'ecwd' )
|
306 |
-
);
|
307 |
-
|
308 |
-
$organizers_args = array(
|
309 |
-
'labels' => $organizers_labels,
|
310 |
-
'public' => true,
|
311 |
-
'publicly_queryable' => true,
|
312 |
-
'show_ui' => true,
|
313 |
-
'show_in_menu' => true,
|
314 |
-
//'edit.php?post_type=ecwd_calendar',
|
315 |
-
'query_var' => true,
|
316 |
-
'capability_type' => 'post',
|
317 |
-
'taxonomies' => array(),
|
318 |
-
'has_archive' => true,
|
319 |
-
'hierarchical' => false,
|
320 |
-
'menu_icon' => plugins_url( '/assets/organizer-icon.png', ECWD_MAIN_FILE ),
|
321 |
-
'supports' => array(
|
322 |
-
'title',
|
323 |
-
'editor'
|
324 |
-
),
|
325 |
-
'rewrite' => $organizer_rewrite
|
326 |
-
);
|
327 |
-
|
328 |
-
register_post_type( self::ORGANIZER_POST_TYPE, $organizers_args );
|
329 |
|
330 |
//venues
|
331 |
$venues_labels = array(
|
@@ -358,7 +360,7 @@ class ECWD_Cpt {
|
|
358 |
'menu_icon' => plugins_url( '/assets/venue-icon.png', ECWD_MAIN_FILE ),
|
359 |
'supports' => array(
|
360 |
'title',
|
361 |
-
'editor'
|
362 |
),
|
363 |
'rewrite' => $venue_rewrite
|
364 |
);
|
@@ -629,21 +631,24 @@ class ECWD_Cpt {
|
|
629 |
*/
|
630 |
public function display_events_meta() {
|
631 |
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
632 |
-
|
633 |
-
|
634 |
-
|
|
|
|
|
|
|
635 |
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
$lat = '';
|
642 |
-
$long = '';
|
643 |
|
644 |
-
|
645 |
-
|
646 |
-
|
|
|
|
|
647 |
}
|
648 |
$args = array(
|
649 |
'post_type' => ECWD_PLUGIN_PREFIX . '_venue',
|
@@ -681,88 +686,87 @@ class ECWD_Cpt {
|
|
681 |
*/
|
682 |
public function display_theme_meta() {
|
683 |
global $post;
|
684 |
-
$post_id
|
685 |
$default_theme = array(
|
686 |
//general
|
687 |
-
ECWD_PLUGIN_PREFIX . '_width'=>'100%',
|
688 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_color'=>'',
|
689 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_width'=>'',
|
690 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_radius'=>'',
|
691 |
//header
|
692 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_color'=>'#168fb5',
|
693 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_border_color'=>'#91CEDF',
|
694 |
-
ECWD_PLUGIN_PREFIX . '_current_year_color'=>'#ffffff',
|
695 |
-
ECWD_PLUGIN_PREFIX . '_current_year_font_size'=>28,
|
696 |
-
ECWD_PLUGIN_PREFIX . '_current_month_color'=>'#ffffff',
|
697 |
-
ECWD_PLUGIN_PREFIX . '_current_month_font_size'=>16,
|
698 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_color'=>'#ffffff',
|
699 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_font_size'=>18,
|
700 |
//views
|
701 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color'=>'#10738B',
|
702 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color'=>'#91CEDF',
|
703 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color'=>'#ffffff',
|
704 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color'=>'#ffffff',
|
705 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size'=>16,
|
706 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color'=>'#10738B',
|
707 |
//search
|
708 |
-
ECWD_PLUGIN_PREFIX . '_search_bg_color'=>'#10738B',
|
709 |
-
ECWD_PLUGIN_PREFIX . '_search_icon_color'=>'#ffffff',
|
710 |
//filter
|
711 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color'=>'#10738B',
|
712 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color'=>'#ffffff',
|
713 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_text_color'=>'#ffffff',
|
714 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color'=>'#10738B',
|
715 |
-
ECWD_PLUGIN_PREFIX . '_filter_bg_color'=>'#ECECEC',
|
716 |
-
ECWD_PLUGIN_PREFIX . '_filter_border_color'=>'#ffffff',
|
717 |
-
ECWD_PLUGIN_PREFIX . '_filter_arrow_color'=>'#10738B',
|
718 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color'=>'#10738B',
|
719 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size'=>15,
|
720 |
-
ECWD_PLUGIN_PREFIX . '_filter_text_color'=>'#10738B',
|
721 |
-
ECWD_PLUGIN_PREFIX . '_filter_font_size'=>16,
|
722 |
-
|
723 |
-
ECWD_PLUGIN_PREFIX . '
|
724 |
-
ECWD_PLUGIN_PREFIX . '
|
725 |
-
ECWD_PLUGIN_PREFIX . '
|
726 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_font_size'=>15,
|
727 |
//week days
|
728 |
-
ECWD_PLUGIN_PREFIX . '_week_days_bg_color'=>'#F9F9F9',
|
729 |
-
ECWD_PLUGIN_PREFIX . '_week_days_border_color'=>'#B6B6B6',
|
730 |
-
ECWD_PLUGIN_PREFIX . '_week_days_text_color'=>'#585858',
|
731 |
-
ECWD_PLUGIN_PREFIX . '_week_days_font_size'=>17,
|
732 |
//days
|
733 |
-
ECWD_PLUGIN_PREFIX . '_cell_bg_color'=>'#ffffff',
|
734 |
-
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color'=>'#EDEDED',
|
735 |
-
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color'=>'#F9F9F9',
|
736 |
-
ECWD_PLUGIN_PREFIX . '_cell_border_color'=>'#B6B6B6',
|
737 |
-
ECWD_PLUGIN_PREFIX . '_day_number_bg_color'=>'#E0E0E0',
|
738 |
-
ECWD_PLUGIN_PREFIX . '_day_text_color'=>'#5C5C5C',
|
739 |
-
ECWD_PLUGIN_PREFIX . '_day_font_size'=>14,
|
740 |
-
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color'=>'#ffffff',
|
741 |
-
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color'=>'#0071A0',
|
742 |
-
ECWD_PLUGIN_PREFIX . '_current_day_text_color'=>'#ffffff',
|
743 |
//events
|
744 |
-
ECWD_PLUGIN_PREFIX . '_event_title_color'=>'',
|
745 |
-
ECWD_PLUGIN_PREFIX . '_event_title_font_size'=>18,
|
746 |
-
ECWD_PLUGIN_PREFIX . '_event_details_bg_color'=>'#ffffff',
|
747 |
-
ECWD_PLUGIN_PREFIX . '_event_details_border_color'=>'#bfbfbf',
|
748 |
-
ECWD_PLUGIN_PREFIX . '_event_details_text_color'=>'#000000',
|
749 |
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
750 |
//events list view
|
751 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color'=>'#10738B',
|
752 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color'=>'#ffffff',
|
753 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size'=>15,
|
754 |
//posterboard
|
755 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color'=>'#585858',
|
756 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color'=>'#ffffff',
|
757 |
//pagination
|
758 |
-
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color'=>'#ffffff',
|
759 |
-
ECWD_PLUGIN_PREFIX . '_current_page_bg_color'=>'#10738B',
|
760 |
-
ECWD_PLUGIN_PREFIX . '_page_number_color'=>'#A5A5A5',
|
761 |
);
|
762 |
|
763 |
-
if(isset($_REQUEST['theme']) && $_REQUEST['theme']=='reset'){
|
764 |
$data = json_encode( $default_theme );
|
765 |
-
update_post_meta( $post_id, self::THEME_POST_TYPE.'_params', $data );
|
766 |
//wp_redirect('post.php?post='.$post_id.'&action=edit');
|
767 |
}
|
768 |
|
@@ -784,22 +788,22 @@ class ECWD_Cpt {
|
|
784 |
*/
|
785 |
public function display_venue_meta() {
|
786 |
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
$geoplugin = unserialize( file_get_contents( 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr ) );
|
794 |
-
set_transient( ECWD_PLUGIN_PREFIX . '_ip_' . $ip_addr, $geoplugin, 12 * 60 * 60 );
|
795 |
-
}
|
796 |
-
$lat = '';
|
797 |
-
$long = '';
|
798 |
-
$geoplugin = unserialize( file_get_contents( 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr ) );
|
799 |
|
800 |
-
|
801 |
-
$
|
802 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
}
|
804 |
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
805 |
}
|
@@ -958,7 +962,6 @@ class ECWD_Cpt {
|
|
958 |
ECWD_PLUGIN_PREFIX . '_filter_font_size',
|
959 |
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color',
|
960 |
ECWD_PLUGIN_PREFIX . '_filter_item_border_color',
|
961 |
-
|
962 |
ECWD_PLUGIN_PREFIX . '_filter_item_text_color',
|
963 |
ECWD_PLUGIN_PREFIX . '_filter_item_font_size',
|
964 |
//week days
|
@@ -1005,14 +1008,14 @@ class ECWD_Cpt {
|
|
1005 |
$ecwd_post_meta_fields[ $post_type ] = apply_filters( $post_type . '_meta', $ecwd_post_meta_fields[ $post_type ] );
|
1006 |
|
1007 |
if ( current_user_can( 'edit_post', $post_id ) ) {
|
1008 |
-
if ( $post_type == ECWD_PLUGIN_PREFIX . '_event' && !isset($_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ])) {
|
1009 |
$_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ] = 'no';
|
1010 |
}
|
1011 |
// Loop through our array and make sure it is posted and not empty in order to update it, otherwise we delete it
|
1012 |
if ( $post_type == ECWD_PLUGIN_PREFIX . '_theme' ) {
|
1013 |
$values = array();
|
1014 |
-
$data
|
1015 |
-
update_post_meta( $post_id, $post_type.'_params', $data );
|
1016 |
} else {
|
1017 |
foreach ( $ecwd_post_meta_fields[ $post_type ] as $pmf ) {
|
1018 |
if ( isset( $_POST[ $pmf ] ) && ! empty( $_POST[ $pmf ] ) ) {
|
@@ -1098,12 +1101,12 @@ class ECWD_Cpt {
|
|
1098 |
public function event_column_content( $column_name, $post_ID ) {
|
1099 |
switch ( $column_name ) {
|
1100 |
case 'event-id':
|
1101 |
-
$start = get_post_meta($post_ID, ECWD_PLUGIN_PREFIX . '_event_date_from', true);
|
1102 |
-
$end
|
1103 |
-
if($start) {
|
1104 |
echo date( 'Y/m/d', strtotime( $start ) );
|
1105 |
echo ' - ' . date( 'Y/m/d', strtotime( $end ) );
|
1106 |
-
}else{
|
1107 |
echo 'No dates';
|
1108 |
}
|
1109 |
break;
|
@@ -1269,6 +1272,7 @@ class ECWD_Cpt {
|
|
1269 |
)
|
1270 |
);
|
1271 |
}
|
|
|
1272 |
public function get_ecwd_calendars() {
|
1273 |
$args = array(
|
1274 |
'numberposts' => - 1,
|
@@ -1280,8 +1284,8 @@ class ECWD_Cpt {
|
|
1280 |
|
1281 |
}
|
1282 |
|
1283 |
-
public function ecwd_templates($template){
|
1284 |
-
$post_types = array( self::EVENT_POST_TYPE);
|
1285 |
if ( is_singular( $post_types ) && ! file_exists( get_stylesheet_directory() . '/single-event.php' ) ) {
|
1286 |
$template = ECWD_DIR . '/views/single-event.php';
|
1287 |
}
|
@@ -1313,7 +1317,7 @@ class ECWD_Cpt {
|
|
1313 |
return false;
|
1314 |
}
|
1315 |
}
|
1316 |
-
|
1317 |
public static function get_instance() {
|
1318 |
if ( null == self::$instance ) {
|
1319 |
self::$instance = new self;
|
17 |
|
18 |
|
19 |
//actions
|
20 |
+
add_action( 'init', array( $this, 'setup_cpt' ) );
|
21 |
|
22 |
add_action( 'pre_get_posts', array( $this, 'add_custom_post_type_to_query' ) );
|
23 |
add_action( 'add_meta_boxes', array( $this, 'calendars_cpt_meta' ) );
|
64 |
$this,
|
65 |
'taxonomy_column'
|
66 |
), 10, 3 );
|
67 |
+
add_filter( 'generate_rewrite_rules', array( $this, 'filterRewriteRules' ), 2 );
|
68 |
|
69 |
|
70 |
add_action( 'wp_ajax_manage_calendar_events', array( $this, 'save_events' ) );
|
80 |
) );
|
81 |
add_filter( 'manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_columns', array( $this, 'add_column_headers' ) );
|
82 |
|
83 |
+
add_filter( 'template_include', array( $this, 'ecwd_templates' ) );
|
84 |
|
85 |
//category filter
|
86 |
+
add_filter( 'init', array( $this, 'event_restrict_manage' ) );
|
87 |
+
|
88 |
}
|
89 |
|
90 |
|
177 |
*/
|
178 |
public function setup_cpt() {
|
179 |
global $ecwd_options;
|
180 |
+
$rewrite = false;
|
181 |
+
$venue_rewrite = false;
|
182 |
$organizer_rewrite = false;
|
183 |
+
$event_supports = array();
|
184 |
if ( isset( $ecwd_options['event_comments'] ) && $ecwd_options['event_comments'] == 1 ) {
|
185 |
$event_supports[] = 'comments';
|
186 |
}
|
204 |
|
205 |
$this->rewriteSlug = ( isset( $ecwd_options['events_slug'] ) && $ecwd_options['events_slug'] !== '' ) ? $ecwd_options['events_slug'] : $defaultSlug . 's';
|
206 |
$this->rewriteSlugSingular = ( isset( $ecwd_options['event_slug'] ) && $ecwd_options['event_slug'] !== '' ) ? $ecwd_options['event_slug'] : $defaultSlug;
|
207 |
+
$rewrite = array( 'slug' => $this->rewriteSlugSingular );
|
208 |
+
$venue_rewrite = array( 'slug' => 'venue' );
|
209 |
+
$organizer_rewrite = array( 'slug' => 'organizer' );
|
210 |
}
|
211 |
//calendars
|
212 |
$calendar_labels = array(
|
245 |
register_post_type( self::CALENDAR_POST_TYPE, $calendar_args );
|
246 |
|
247 |
|
248 |
+
//events organizers
|
249 |
+
$organizers_labels = array(
|
250 |
+
'name' => __( 'Organizers', 'ecwd' ),
|
251 |
+
'singular_name' => __( 'Organizer', 'ecwd' ),
|
252 |
+
'name_admin_bar' => __( 'Organizer', 'ecwd' ),
|
253 |
+
'add_new' => __( 'Add New', 'ecwd' ),
|
254 |
+
'add_new_item' => __( 'Add New Organizer', 'ecwd' ),
|
255 |
+
'new_item' => __( 'New Organizer', 'ecwd' ),
|
256 |
+
'edit_item' => __( 'Edit Organizer', 'ecwd' ),
|
257 |
+
'view_item' => __( 'View Organizer', 'ecwd' ),
|
258 |
+
'all_items' => __( 'All Organizers', 'ecwd' ),
|
259 |
+
'search_items' => __( 'Search Organizer', 'ecwd' ),
|
260 |
+
'not_found' => __( 'No Organizers found.', 'ecwd' ),
|
261 |
+
'not_found_in_trash' => __( 'No Organizers found in Trash.', 'ecwd' )
|
262 |
+
);
|
263 |
+
|
264 |
+
$organizers_args = array(
|
265 |
+
'labels' => $organizers_labels,
|
266 |
+
'public' => true,
|
267 |
+
'publicly_queryable' => true,
|
268 |
+
'show_ui' => true,
|
269 |
+
'show_in_menu' => true,
|
270 |
+
//'edit.php?post_type=ecwd_calendar',
|
271 |
+
'query_var' => true,
|
272 |
+
'capability_type' => 'post',
|
273 |
+
'taxonomies' => array(),
|
274 |
+
'has_archive' => true,
|
275 |
+
'hierarchical' => false,
|
276 |
+
'menu_icon' => plugins_url( '/assets/organizer-icon.png', ECWD_MAIN_FILE ),
|
277 |
+
'supports' => array(
|
278 |
+
'title',
|
279 |
+
'editor', 'thumbnail'
|
280 |
+
),
|
281 |
+
'rewrite' => $organizer_rewrite
|
282 |
+
);
|
283 |
+
|
284 |
+
register_post_type( self::ORGANIZER_POST_TYPE, $organizers_args );
|
285 |
+
|
286 |
+
|
287 |
//events
|
288 |
$labels = array(
|
289 |
'name' => __( 'Events', 'ecwd' ),
|
328 |
register_post_type( self::EVENT_POST_TYPE, $args );
|
329 |
|
330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
|
332 |
//venues
|
333 |
$venues_labels = array(
|
360 |
'menu_icon' => plugins_url( '/assets/venue-icon.png', ECWD_MAIN_FILE ),
|
361 |
'supports' => array(
|
362 |
'title',
|
363 |
+
'editor', 'thumbnail'
|
364 |
),
|
365 |
'rewrite' => $venue_rewrite
|
366 |
);
|
631 |
*/
|
632 |
public function display_events_meta() {
|
633 |
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
634 |
+
$long = '';
|
635 |
+
$lat = '';
|
636 |
+
if ( ini_get( 'allow_url_fopen' ) ) {
|
637 |
+
if ( $ip_addr == '127.0.0.1' ) {
|
638 |
+
$ip_addr = '37.157.218.77';
|
639 |
+
}
|
640 |
|
641 |
+
$url = 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr;
|
642 |
+
if ( false === $geoplugin = get_transient( ECWD_PLUGIN_PREFIX . '_ip_' . $ip_addr ) ) {
|
643 |
+
$geoplugin = unserialize( file_get_contents( 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr ) );
|
644 |
+
set_transient( ECWD_PLUGIN_PREFIX . '_ip_' . $ip_addr, $geoplugin, 12 * 60 * 60 );
|
645 |
+
}
|
|
|
|
|
646 |
|
647 |
+
|
648 |
+
if ( $geoplugin['geoplugin_latitude'] && $geoplugin['geoplugin_longitude'] ) {
|
649 |
+
$lat = $geoplugin['geoplugin_latitude'];
|
650 |
+
$long = $geoplugin['geoplugin_longitude'];
|
651 |
+
}
|
652 |
}
|
653 |
$args = array(
|
654 |
'post_type' => ECWD_PLUGIN_PREFIX . '_venue',
|
686 |
*/
|
687 |
public function display_theme_meta() {
|
688 |
global $post;
|
689 |
+
$post_id = $post->ID;
|
690 |
$default_theme = array(
|
691 |
//general
|
692 |
+
ECWD_PLUGIN_PREFIX . '_width' => '100%',
|
693 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_color' => '',
|
694 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_width' => '',
|
695 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_radius' => '',
|
696 |
//header
|
697 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_color' => '#168fb5',
|
698 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_border_color' => '#91CEDF',
|
699 |
+
ECWD_PLUGIN_PREFIX . '_current_year_color' => '#ffffff',
|
700 |
+
ECWD_PLUGIN_PREFIX . '_current_year_font_size' => 28,
|
701 |
+
ECWD_PLUGIN_PREFIX . '_current_month_color' => '#ffffff',
|
702 |
+
ECWD_PLUGIN_PREFIX . '_current_month_font_size' => 16,
|
703 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_color' => '#ffffff',
|
704 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_font_size' => 18,
|
705 |
//views
|
706 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color' => '#10738B',
|
707 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color' => '#91CEDF',
|
708 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color' => '#ffffff',
|
709 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color' => '#ffffff',
|
710 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size' => 16,
|
711 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color' => '#10738B',
|
712 |
//search
|
713 |
+
ECWD_PLUGIN_PREFIX . '_search_bg_color' => '#10738B',
|
714 |
+
ECWD_PLUGIN_PREFIX . '_search_icon_color' => '#ffffff',
|
715 |
//filter
|
716 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color' => '#10738B',
|
717 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color' => '#ffffff',
|
718 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_text_color' => '#ffffff',
|
719 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color' => '#10738B',
|
720 |
+
ECWD_PLUGIN_PREFIX . '_filter_bg_color' => '#ECECEC',
|
721 |
+
ECWD_PLUGIN_PREFIX . '_filter_border_color' => '#ffffff',
|
722 |
+
ECWD_PLUGIN_PREFIX . '_filter_arrow_color' => '#10738B',
|
723 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color' => '#10738B',
|
724 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size' => 15,
|
725 |
+
ECWD_PLUGIN_PREFIX . '_filter_text_color' => '#10738B',
|
726 |
+
ECWD_PLUGIN_PREFIX . '_filter_font_size' => 16,
|
727 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color' => '#ffffff',
|
728 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_border_color' => '#DEE3E8',
|
729 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_text_color' => '#6E6E6E',
|
730 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_font_size' => 15,
|
|
|
731 |
//week days
|
732 |
+
ECWD_PLUGIN_PREFIX . '_week_days_bg_color' => '#F9F9F9',
|
733 |
+
ECWD_PLUGIN_PREFIX . '_week_days_border_color' => '#B6B6B6',
|
734 |
+
ECWD_PLUGIN_PREFIX . '_week_days_text_color' => '#585858',
|
735 |
+
ECWD_PLUGIN_PREFIX . '_week_days_font_size' => 17,
|
736 |
//days
|
737 |
+
ECWD_PLUGIN_PREFIX . '_cell_bg_color' => '#ffffff',
|
738 |
+
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color' => '#EDEDED',
|
739 |
+
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color' => '#F9F9F9',
|
740 |
+
ECWD_PLUGIN_PREFIX . '_cell_border_color' => '#B6B6B6',
|
741 |
+
ECWD_PLUGIN_PREFIX . '_day_number_bg_color' => '#E0E0E0',
|
742 |
+
ECWD_PLUGIN_PREFIX . '_day_text_color' => '#5C5C5C',
|
743 |
+
ECWD_PLUGIN_PREFIX . '_day_font_size' => 14,
|
744 |
+
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color' => '#ffffff',
|
745 |
+
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color' => '#0071A0',
|
746 |
+
ECWD_PLUGIN_PREFIX . '_current_day_text_color' => '#ffffff',
|
747 |
//events
|
748 |
+
ECWD_PLUGIN_PREFIX . '_event_title_color' => '',
|
749 |
+
ECWD_PLUGIN_PREFIX . '_event_title_font_size' => 18,
|
750 |
+
ECWD_PLUGIN_PREFIX . '_event_details_bg_color' => '#ffffff',
|
751 |
+
ECWD_PLUGIN_PREFIX . '_event_details_border_color' => '#bfbfbf',
|
752 |
+
ECWD_PLUGIN_PREFIX . '_event_details_text_color' => '#000000',
|
753 |
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
754 |
//events list view
|
755 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color' => '#10738B',
|
756 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color' => '#ffffff',
|
757 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size' => 15,
|
758 |
//posterboard
|
759 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color' => '#585858',
|
760 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color' => '#ffffff',
|
761 |
//pagination
|
762 |
+
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color' => '#ffffff',
|
763 |
+
ECWD_PLUGIN_PREFIX . '_current_page_bg_color' => '#10738B',
|
764 |
+
ECWD_PLUGIN_PREFIX . '_page_number_color' => '#A5A5A5',
|
765 |
);
|
766 |
|
767 |
+
if ( isset( $_REQUEST['theme'] ) && $_REQUEST['theme'] == 'reset' ) {
|
768 |
$data = json_encode( $default_theme );
|
769 |
+
update_post_meta( $post_id, self::THEME_POST_TYPE . '_params', $data );
|
770 |
//wp_redirect('post.php?post='.$post_id.'&action=edit');
|
771 |
}
|
772 |
|
788 |
*/
|
789 |
public function display_venue_meta() {
|
790 |
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
791 |
+
$lat = '';
|
792 |
+
$long = '';
|
793 |
+
if ( ini_get( 'allow_url_fopen' ) ) {
|
794 |
+
if ( $ip_addr == '127.0.0.1' ) {
|
795 |
+
$ip_addr = '37.157.218.77';
|
796 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
|
798 |
+
$url = 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr;
|
799 |
+
if ( false == $geoplugin = get_transient( ECWD_PLUGIN_PREFIX . '_ip_' . $ip_addr ) ) {
|
800 |
+
$geoplugin = unserialize( file_get_contents( 'http://www.geoplugin.net/php.gp?ip=' . $ip_addr ) );
|
801 |
+
set_transient( ECWD_PLUGIN_PREFIX . '_ip_' . $ip_addr, $geoplugin, 12 * 60 * 60 );
|
802 |
+
}
|
803 |
+
if ( is_numeric( $geoplugin['geoplugin_latitude'] ) && is_numeric( $geoplugin['geoplugin_longitude'] ) ) {
|
804 |
+
$lat = $geoplugin['geoplugin_latitude'];
|
805 |
+
$long = $geoplugin['geoplugin_longitude'];
|
806 |
+
}
|
807 |
}
|
808 |
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
809 |
}
|
962 |
ECWD_PLUGIN_PREFIX . '_filter_font_size',
|
963 |
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color',
|
964 |
ECWD_PLUGIN_PREFIX . '_filter_item_border_color',
|
|
|
965 |
ECWD_PLUGIN_PREFIX . '_filter_item_text_color',
|
966 |
ECWD_PLUGIN_PREFIX . '_filter_item_font_size',
|
967 |
//week days
|
1008 |
$ecwd_post_meta_fields[ $post_type ] = apply_filters( $post_type . '_meta', $ecwd_post_meta_fields[ $post_type ] );
|
1009 |
|
1010 |
if ( current_user_can( 'edit_post', $post_id ) ) {
|
1011 |
+
if ( $post_type == ECWD_PLUGIN_PREFIX . '_event' && ! isset( $_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ] ) ) {
|
1012 |
$_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ] = 'no';
|
1013 |
}
|
1014 |
// Loop through our array and make sure it is posted and not empty in order to update it, otherwise we delete it
|
1015 |
if ( $post_type == ECWD_PLUGIN_PREFIX . '_theme' ) {
|
1016 |
$values = array();
|
1017 |
+
$data = json_encode( $values );
|
1018 |
+
update_post_meta( $post_id, $post_type . '_params', $data );
|
1019 |
} else {
|
1020 |
foreach ( $ecwd_post_meta_fields[ $post_type ] as $pmf ) {
|
1021 |
if ( isset( $_POST[ $pmf ] ) && ! empty( $_POST[ $pmf ] ) ) {
|
1101 |
public function event_column_content( $column_name, $post_ID ) {
|
1102 |
switch ( $column_name ) {
|
1103 |
case 'event-id':
|
1104 |
+
$start = get_post_meta( $post_ID, ECWD_PLUGIN_PREFIX . '_event_date_from', true );
|
1105 |
+
$end = get_post_meta( $post_ID, ECWD_PLUGIN_PREFIX . '_event_date_to', true );
|
1106 |
+
if ( $start ) {
|
1107 |
echo date( 'Y/m/d', strtotime( $start ) );
|
1108 |
echo ' - ' . date( 'Y/m/d', strtotime( $end ) );
|
1109 |
+
} else {
|
1110 |
echo 'No dates';
|
1111 |
}
|
1112 |
break;
|
1272 |
)
|
1273 |
);
|
1274 |
}
|
1275 |
+
|
1276 |
public function get_ecwd_calendars() {
|
1277 |
$args = array(
|
1278 |
'numberposts' => - 1,
|
1284 |
|
1285 |
}
|
1286 |
|
1287 |
+
public function ecwd_templates( $template ) {
|
1288 |
+
$post_types = array( self::EVENT_POST_TYPE );
|
1289 |
if ( is_singular( $post_types ) && ! file_exists( get_stylesheet_directory() . '/single-event.php' ) ) {
|
1290 |
$template = ECWD_DIR . '/views/single-event.php';
|
1291 |
}
|
1317 |
return false;
|
1318 |
}
|
1319 |
}
|
1320 |
+
|
1321 |
public static function get_instance() {
|
1322 |
if ( null == self::$instance ) {
|
1323 |
self::$instance = new self;
|
readme.txt
CHANGED
@@ -4,20 +4,53 @@ Donate link: https://web-dorado.com/products/wordpress-event-calendar-wd.html
|
|
4 |
Tags: calendar, calendars, event, event calendar, event manager, events calendar, calendar widget, event registration, event management,events, agenda, holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.2
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Organize and publish your events in an easy and elegant way using Event Calendar WD.
|
12 |
|
13 |
== Description ==
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
[WordPress Event Calendar WD](http://web-dorado.com/products/wordpress-event-calendar-wd.html)
|
18 |
[Demo](http://wpdemo.web-dorado.com/event-calendar-wd/)
|
19 |
[User Guide](https://web-dorado.com/wordpress-event-calendar-wd/installing.html)
|
20 |
-
[Support Forum](https://web-dorado.com/forum/wordpress-event-calendar-wd.html)
|
|
|
|
|
|
|
21 |
|
22 |
Looking for an enhanced tool for displaying and managing various events within the site? Whether you have a single event you want to display on a calendar or multiple events per day, the Event Calendar plugin will help you to organize the events using elegant views.
|
23 |
|
@@ -39,29 +72,7 @@ Need to mention the hosts of the event? The Event Calendar WD plugin uses organi
|
|
39 |
|
40 |
The Event Calendar WD can be also used as an integral part of your site, not simply as a plugin. Since the event calendars are being created as a custom post, there is a possibility to display the event calendars among the standard post listings such as related posts or latest posts.
|
41 |
|
42 |
-
= Features of Event Calendar WD: =
|
43 |
|
44 |
-
* SEO-friendly
|
45 |
-
* Responsive design
|
46 |
-
* Unlimited number of calendars/events
|
47 |
-
* Structured event markup (microdata)
|
48 |
-
* Event categories
|
49 |
-
* Event tag
|
50 |
-
* Support for venues
|
51 |
-
* Support for organizers
|
52 |
-
* Google Maps integration
|
53 |
-
* Event search
|
54 |
-
* Social media integration
|
55 |
-
* Recurring events
|
56 |
-
* Month, week, day, list views
|
57 |
-
|
58 |
-
Upgrade to [WordPress Event Calendar Pro](http://web-dorado.com/products/wordpress-event-calendar-wd.html) to add features:
|
59 |
-
|
60 |
-
* 5 beautiful customizable themes
|
61 |
-
* Posterboard view
|
62 |
-
* 4 days view
|
63 |
-
* Map view
|
64 |
-
* Add ons support
|
65 |
|
66 |
###IMPORTANT:
|
67 |
If you think you found a bug in Event Calendar WD or have any problem/question concerning the plugin, please check out [Support Forum](https://web-dorado.com/forum/wordpress-event-calendar-wd.html) in our website. If you do not find a solution here, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
|
@@ -116,6 +127,11 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
= 1.0.8 =
|
120 |
Changed: Event page
|
121 |
Added: Portuguese language
|
4 |
Tags: calendar, calendars, event, event calendar, event manager, events calendar, calendar widget, event registration, event management,events, agenda, holiday calendar , scheduling, free calendar, Calender, upcoming events , event widget , event list, calendar localization, Organizer, editorial calendar, Interactive Calendar, news calendar, meeting , appointment, event tracking, event organizer, upcoming events widget, event page, event bookings, recurring, recurring events, conference, date, dates, schedule, times, venue, AJAX, responsive, shortcode, seminar, summit
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.2
|
7 |
+
Stable tag: 1.0.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
Organize and publish your events in an easy and elegant way using Event Calendar WD.
|
12 |
|
13 |
== Description ==
|
14 |
+
|
15 |
+
= Features of Event Calendar WD: =
|
16 |
+
|
17 |
+
* SEO-friendly
|
18 |
+
* Responsive design
|
19 |
+
* Unlimited number of calendars/events
|
20 |
+
* Structured event markup (microdata)
|
21 |
+
* Event categories
|
22 |
+
* Event tag
|
23 |
+
* Support for venues
|
24 |
+
* Support for organizers
|
25 |
+
* Google Maps integration
|
26 |
+
* Event search
|
27 |
+
* Social media integration
|
28 |
+
* Recurring events
|
29 |
+
* Month, week, day, list views
|
30 |
+
|
31 |
+
Upgrade to [WordPress Event Calendar Pro](http://web-dorado.com/products/wordpress-event-calendar-wd.html) to add features:
|
32 |
+
|
33 |
+
* 5 beautiful customizable themes
|
34 |
+
* Posterboard view
|
35 |
+
* 4 days view
|
36 |
+
* Map view
|
37 |
+
* Add-ons support
|
38 |
+
* Pro support
|
39 |
+
|
40 |
+
= Event Calendar WD Add-ons: =
|
41 |
+
[Filter Add-on](https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons/filter.html)
|
42 |
+
[Countdown](https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons/countdown.html)
|
43 |
+
[Upcoming Events](https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons/upcoming-events.html)
|
44 |
+
|
45 |
+
|
46 |
|
47 |
[WordPress Event Calendar WD](http://web-dorado.com/products/wordpress-event-calendar-wd.html)
|
48 |
[Demo](http://wpdemo.web-dorado.com/event-calendar-wd/)
|
49 |
[User Guide](https://web-dorado.com/wordpress-event-calendar-wd/installing.html)
|
50 |
+
[Support Forum](https://web-dorado.com/forum/wordpress-event-calendar-wd.html)
|
51 |
+
|
52 |
+
|
53 |
+
https://www.youtube.com/watch?v=htmdAkRuIzw
|
54 |
|
55 |
Looking for an enhanced tool for displaying and managing various events within the site? Whether you have a single event you want to display on a calendar or multiple events per day, the Event Calendar plugin will help you to organize the events using elegant views.
|
56 |
|
72 |
|
73 |
The Event Calendar WD can be also used as an integral part of your site, not simply as a plugin. Since the event calendars are being created as a custom post, there is a possibility to display the event calendars among the standard post listings such as related posts or latest posts.
|
74 |
|
|
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
###IMPORTANT:
|
78 |
If you think you found a bug in Event Calendar WD or have any problem/question concerning the plugin, please check out [Support Forum](https://web-dorado.com/forum/wordpress-event-calendar-wd.html) in our website. If you do not find a solution here, do not hesitate to contact us at [info@web-dorado.com](mailto:info@web-dorado.com).
|
127 |
|
128 |
== Changelog ==
|
129 |
|
130 |
+
= 1.0.9 =
|
131 |
+
Fixed: show google maps conflict with other plugins
|
132 |
+
Fixed: geolocation bug
|
133 |
+
Fixed: save organizer featured image issue
|
134 |
+
|
135 |
= 1.0.8 =
|
136 |
Changed: Event page
|
137 |
Added: Portuguese language
|
views/admin/addons.php
CHANGED
@@ -15,9 +15,15 @@ if (!defined('ABSPATH')) {
|
|
15 |
|
16 |
<div class="wrap">
|
17 |
<?php settings_errors(); ?>
|
|
|
18 |
<div id="ecwd-settings">
|
19 |
<div id="ecwd-settings-content">
|
20 |
<h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
|
|
|
|
|
|
|
|
|
|
|
21 |
<?php
|
22 |
if($addons){
|
23 |
foreach ($addons as $addon) {
|
15 |
|
16 |
<div class="wrap">
|
17 |
<?php settings_errors(); ?>
|
18 |
+
|
19 |
<div id="ecwd-settings">
|
20 |
<div id="ecwd-settings-content">
|
21 |
<h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
|
22 |
+
<div>
|
23 |
+
<p>
|
24 |
+
<span style="color: #ba281e; font-size: 20px;">Attention:</span> Add-ons are supported by premium version of Event Calendar WD
|
25 |
+
</p>
|
26 |
+
</div>
|
27 |
<?php
|
28 |
if($addons){
|
29 |
foreach ($addons as $addon) {
|