Version Description
Added: Config page
Changed: Spanish Translation
Changed: German Translation
Changed: Featured plugins/themes page
Changed: Event details popup direction for 4th day
Fixed: Scroll issue in mobile
Download this release
Release Info
| Developer | webdorado |
| Plugin | |
| Version | 1.0.51 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.50 to 1.0.51
- config/config.json +12 -0
- css/admin/featured_plugins.css +150 -59
- css/admin/featured_themes.css +162 -78
- css/images/featured/arrow3.png +0 -0
- css/images/featured/calendar.png +0 -0
- css/images/featured/calendar1.png +0 -0
- css/images/featured/calendar_hover.png +0 -0
- css/images/featured/calendar_menu.png +0 -0
- css/images/featured/catalog.png +0 -0
- css/images/featured/contact-form.png +0 -0
- css/images/featured/contact.builder.png +0 -0
- css/images/featured/contacts.png +0 -0
- css/images/featured/copy_cal.gif +0 -0
- css/images/featured/delete_el.png +0 -0
- css/images/featured/down.png +0 -0
- css/images/featured/downarrow.png +0 -0
- css/images/featured/events_wd.png +0 -0
- css/images/featured/facebook.png +0 -0
- css/images/featured/faq.png +0 -0
- css/images/featured/faq_wd.png +0 -0
- css/images/featured/featured_plugins_bg.png +0 -0
- css/images/featured/flash.calendar.png +0 -0
- css/images/featured/folder.menu.png +0 -0
- css/images/featured/form.png +0 -0
- css/images/featured/header.png +0 -0
- css/images/featured/instagram_feed.png +0 -0
- css/images/featured/loadingAnimation.gif +0 -0
- css/images/featured/minus.png +0 -0
- css/images/featured/photo-gallery.png +0 -0
- css/images/featured/player.png +0 -0
- css/images/featured/portfolio.jpg +0 -0
- css/images/featured/post-slider.png +0 -0
- css/images/featured/random.post.png +0 -0
- css/images/featured/slider.png +0 -0
- css/images/featured/spider.calendar.png +0 -0
- css/images/featured/spiderCalendar.png +0 -0
- css/images/featured/spider_calendar_themes.png +0 -0
- css/images/featured/spider_calendar_widget_themes.png +0 -0
- css/images/featured/tb-close.png +0 -0
- css/images/featured/twittertools.png +0 -0
- css/images/featured/up.png +0 -0
- css/images/featured/zoom.png +0 -0
- css/style.css +4 -1
- ecwd.php +1 -1
- ecwd_admin_class.php +71 -15
- ecwd_class.php +1 -1
- includes/calendar-class.php +1181 -1217
- includes/ecwd-cpt-class.php +1343 -1363
- includes/ecwd_config.php +132 -0
- includes/register-settings.php +6 -6
- js/scripts.js +506 -500
- languages/ecwd-de_DE.mo +0 -0
- languages/ecwd-de_DE.po +21 -21
- languages/ecwd-es_ES.mo +0 -0
- languages/ecwd-es_ES.po +24 -36
- readme.txt +9 -1
- views/admin/ecwd-config.php +33 -0
- views/admin/ecwd-featured-plugins.php +202 -194
- views/admin/ecwd-featured-themes.php +132 -135
config/config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"featured_image_for_themes": {
|
| 3 |
+
"name": "Featured image for themes",
|
| 4 |
+
"description": "Featured image for posts and pages if it does not function by default",
|
| 5 |
+
"value": "0"
|
| 6 |
+
},
|
| 7 |
+
"flush_rewrite_rules": {
|
| 8 |
+
"name": "Flush rewrite rules",
|
| 9 |
+
"description": "flush rewrite rules",
|
| 10 |
+
"value": "1"
|
| 11 |
+
}
|
| 12 |
+
}
|
css/admin/featured_plugins.css
CHANGED
|
@@ -1,44 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
#main_featured_plugins_page #featured-plugins-list {
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
}
|
| 11 |
|
| 12 |
#main_featured_plugins_page #featured-plugins-list li {
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
| 19 |
}
|
| 20 |
|
| 21 |
#main_featured_plugins_page #featured-plugins-list li .product {
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
border-radius: 3px;
|
| 29 |
}
|
| 30 |
|
| 31 |
#main_featured_plugins_page #featured-plugins-list li .title {
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
margin: 0 auto;
|
| 36 |
}
|
| 37 |
|
| 38 |
#main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url(../images/featured/form.png) left center no-repeat;}
|
| 39 |
-
#main_featured_plugins_page #featured-plugins-list li.
|
|
|
|
|
|
|
| 40 |
#main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url(../images/featured/catalog.png) left center no-repeat;}
|
| 41 |
-
#main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url(../images/featured/contact.
|
| 42 |
#main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url(../images/featured/contacts.png) left center no-repeat;}
|
| 43 |
#main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url(../images/featured/facebook.png) left center no-repeat;}
|
| 44 |
#main_featured_plugins_page #featured-plugins-list li.faq .product {background:url(../images/featured/faq.png) left center no-repeat;}
|
|
@@ -46,57 +53,141 @@
|
|
| 46 |
#main_featured_plugins_page #featured-plugins-list li.player .product {background:url(../images/featured/player.png) left center no-repeat; }
|
| 47 |
#main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url(../images/featured/spider.calendar.png) left center no-repeat;}
|
| 48 |
|
| 49 |
-
#main_featured_plugins_page #featured-plugins-list li.contact_form_bulder .product {background:url(../images/featured/contact.builder.png) left center no-repeat;
|
| 50 |
#main_featured_plugins_page #featured-plugins-list li.random_post .product {background:url(../images/featured/random.post.png) left center no-repeat;}
|
| 51 |
-
#main_featured_plugins_page #featured-plugins-list li.slider_wd .product {background:url(../images/featured/slider.png) left center no-repeat;
|
| 52 |
#main_featured_plugins_page #featured-plugins-list li.folder_menu .product {background:url(../images/featured/folder.menu.png) left center no-repeat;}
|
| 53 |
|
| 54 |
-
#main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url(../images/featured/zoom.png) left center no-repeat;
|
| 55 |
#main_featured_plugins_page #featured-plugins-list li.photo-gallery .product {background:url(../images/featured/photo-gallery.png) left center no-repeat #CACACA;
|
| 56 |
-
border-top-left-radius: 5px;
|
| 57 |
-
border-bottom-left-radius: 5px;
|
| 58 |
-
background-position-x: 7px;
|
| 59 |
-
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
#main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url(../images/featured/twittertools.png) left center no-repeat #CACACA;
|
| 62 |
-
background-size: 85px;
|
| 63 |
-
background-position-x: 12px;
|
| 64 |
-
border-top-left-radius: 5px;
|
| 65 |
-
border-bottom-left-radius: 5px;}
|
| 66 |
|
| 67 |
#main_featured_plugins_page #featured-plugins-list li .title .heading {
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
}
|
| 75 |
|
| 76 |
#main_featured_plugins_page #featured-plugins-list li .title p {
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
}
|
| 81 |
|
| 82 |
#main_featured_plugins_page #featured-plugins-list li .description {
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
}
|
| 87 |
|
| 88 |
#main_featured_plugins_page #featured-plugins-list li .description p {
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
| 91 |
}
|
| 92 |
|
| 93 |
#featured-plugins-list li a.download {
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 1 |
+
@import url(http://fonts.googleapis.com/css?family=Oswald);
|
| 2 |
+
|
| 3 |
+
#main_featured_plugins_page{
|
| 4 |
+
font-family: Oswald;
|
| 5 |
+
}
|
| 6 |
|
| 7 |
#main_featured_plugins_page #featured-plugins-list {
|
| 8 |
+
position:relative;
|
| 9 |
+
margin:0px auto;
|
| 10 |
+
height:auto;
|
| 11 |
+
display:table;
|
| 12 |
+
list-style:none;
|
| 13 |
+
text-align: center;
|
| 14 |
+
width: 100%;
|
| 15 |
}
|
| 16 |
|
| 17 |
#main_featured_plugins_page #featured-plugins-list li {
|
| 18 |
+
display: inline-table;
|
| 19 |
+
width: 200px;
|
| 20 |
+
margin: 20px 10px 0px 10px;
|
| 21 |
+
background: #FFFFFF;
|
| 22 |
+
border-right: 3px solid #E5E5E5;
|
| 23 |
+
height: 335px;
|
| 24 |
+
border-bottom: 3px solid #E5E5E5;
|
| 25 |
+
position: relative;
|
| 26 |
}
|
| 27 |
|
| 28 |
#main_featured_plugins_page #featured-plugins-list li .product {
|
| 29 |
+
position:relative;
|
| 30 |
+
height:113px;
|
| 31 |
+
background-color: transparent !important;
|
| 32 |
+
background-position-x: 50% !important;
|
| 33 |
+
margin: 7px;
|
| 34 |
+
border-radius: 3px;
|
|
|
|
| 35 |
}
|
| 36 |
|
| 37 |
#main_featured_plugins_page #featured-plugins-list li .title {
|
| 38 |
+
width: 90%;
|
| 39 |
+
text-align: center;
|
| 40 |
+
margin: 0 auto;
|
|
|
|
| 41 |
}
|
| 42 |
|
| 43 |
#main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url(../images/featured/form.png) left center no-repeat;}
|
| 44 |
+
#main_featured_plugins_page #featured-plugins-list li.events-wd .product {background:url(../images/featured/faq_wd.png) left center no-repeat;}
|
| 45 |
+
#main_featured_plugins_page #featured-plugins-list li.instagram-wd .product {background:url(../images/featured/instagram_feed.png) left center no-repeat;}
|
| 46 |
+
#main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url(../images/featured/spiderCalendar.png) left center no-repeat;}
|
| 47 |
#main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url(../images/featured/catalog.png) left center no-repeat;}
|
| 48 |
+
#main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url(../images/featured/contact-form.png) left center no-repeat;}
|
| 49 |
#main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url(../images/featured/contacts.png) left center no-repeat;}
|
| 50 |
#main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url(../images/featured/facebook.png) left center no-repeat;}
|
| 51 |
#main_featured_plugins_page #featured-plugins-list li.faq .product {background:url(../images/featured/faq.png) left center no-repeat;}
|
| 53 |
#main_featured_plugins_page #featured-plugins-list li.player .product {background:url(../images/featured/player.png) left center no-repeat; }
|
| 54 |
#main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url(../images/featured/spider.calendar.png) left center no-repeat;}
|
| 55 |
|
| 56 |
+
#main_featured_plugins_page #featured-plugins-list li.contact_form_bulder .product {background:url(../images/featured/contact.builder.png) left center no-repeat;}
|
| 57 |
#main_featured_plugins_page #featured-plugins-list li.random_post .product {background:url(../images/featured/random.post.png) left center no-repeat;}
|
| 58 |
+
#main_featured_plugins_page #featured-plugins-list li.slider_wd .product {background:url(../images/featured/slider.png) left center no-repeat;}
|
| 59 |
#main_featured_plugins_page #featured-plugins-list li.folder_menu .product {background:url(../images/featured/folder.menu.png) left center no-repeat;}
|
| 60 |
|
| 61 |
+
#main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url(../images/featured/zoom.png) left center no-repeat;}
|
| 62 |
#main_featured_plugins_page #featured-plugins-list li.photo-gallery .product {background:url(../images/featured/photo-gallery.png) left center no-repeat #CACACA;
|
| 63 |
+
border-top-left-radius: 5px;
|
| 64 |
+
border-bottom-left-radius: 5px;
|
| 65 |
+
background-position-x: 7px;
|
| 66 |
+
}
|
| 67 |
+
#main_featured_plugins_page #featured-plugins-list li .product {
|
| 68 |
+
background-size: 115px !important;
|
| 69 |
}
|
| 70 |
#main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url(../images/featured/twittertools.png) left center no-repeat #CACACA;
|
| 71 |
+
background-size: 85px;
|
| 72 |
+
background-position-x: 12px;
|
| 73 |
+
border-top-left-radius: 5px;
|
| 74 |
+
border-bottom-left-radius: 5px;}
|
| 75 |
|
| 76 |
#main_featured_plugins_page #featured-plugins-list li .title .heading {
|
| 77 |
+
display: block;
|
| 78 |
+
position: relative;
|
| 79 |
+
font-size: 17px;
|
| 80 |
+
color: #767676;
|
| 81 |
+
margin: 13px 0px 13px 0px;
|
| 82 |
+
text-transform: uppercase;
|
| 83 |
}
|
| 84 |
|
| 85 |
#main_featured_plugins_page #featured-plugins-list li .title p {
|
| 86 |
+
font-size:14px;
|
| 87 |
+
color:#444;
|
| 88 |
+
margin-left:20px;
|
| 89 |
}
|
| 90 |
|
| 91 |
#main_featured_plugins_page #featured-plugins-list li .description {
|
| 92 |
+
height: 127px;
|
| 93 |
+
width: 90%;
|
| 94 |
+
margin: 0 auto;
|
| 95 |
}
|
| 96 |
|
| 97 |
#main_featured_plugins_page #featured-plugins-list li .description p {
|
| 98 |
+
text-align: center;
|
| 99 |
+
width: 100%;
|
| 100 |
+
color: #9A9A9A;
|
| 101 |
+
font-family: "Open Sans",sans-serif;
|
| 102 |
}
|
| 103 |
|
| 104 |
#featured-plugins-list li a.download {
|
| 105 |
+
display: block;
|
| 106 |
+
border-top: 1px solid #CACACA;
|
| 107 |
+
outline: none;
|
| 108 |
+
width: 90%;
|
| 109 |
+
margin: 0 auto;
|
| 110 |
+
font-size: 14px;
|
| 111 |
+
line-height: 40px;
|
| 112 |
+
text-decoration: none;
|
| 113 |
+
font-weight: bolder;
|
| 114 |
+
text-align: center;
|
| 115 |
+
color: #134D68;
|
| 116 |
+
position: absolute;
|
| 117 |
+
text-transform: uppercase;
|
| 118 |
+
bottom: 0;
|
| 119 |
+
left: 10px;
|
| 120 |
+
font-family: "Open Sans",sans-serif;
|
| 121 |
+
text-shadow: 1px 0;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
#featured-plugins-list li a.download:hover {
|
| 125 |
+
color: #F47629;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.featured_header > div{
|
| 129 |
+
background: #FFFFFF;
|
| 130 |
+
border-right: 3px solid #E5E5E5;
|
| 131 |
+
border-bottom: 3px solid #E5E5E5;
|
| 132 |
+
padding: 20px 0;
|
| 133 |
+
}
|
| 134 |
+
.featured_header {
|
| 135 |
+
position: relative;
|
| 136 |
+
width: 90%;
|
| 137 |
+
margin: 15px auto 0px auto;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.featured_header .old_price{
|
| 141 |
+
color: rgba(180, 180, 180, 0.3);
|
| 142 |
+
text-decoration: line-through;
|
| 143 |
+
font-family: Oswald;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.featured_header h1.get_plugins{
|
| 147 |
+
color: #FFFFFF;
|
| 148 |
+
background:url(../images/featured/featured_plugins_bg.png) no-repeat;
|
| 149 |
+
height: 85px;
|
| 150 |
+
margin: 0;
|
| 151 |
+
background-size: 85% 100%;
|
| 152 |
+
background-position: center;
|
| 153 |
+
line-height: 60px;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.featured_header h1{
|
| 157 |
+
font-size: 50px;
|
| 158 |
+
text-align: center;
|
| 159 |
+
color: #F47629;
|
| 160 |
+
letter-spacing: 3px;
|
| 161 |
+
line-height: 10px;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.featured_header a{
|
| 165 |
+
text-decoration: none;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
@media screen and (max-width: 1105px) {
|
| 169 |
+
.featured_header h1{
|
| 170 |
+
font-size: 37px;
|
| 171 |
+
line-height: 0;
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
@media screen and (max-width: 835px) {
|
| 177 |
+
.get_plugins span{
|
| 178 |
+
display: none;
|
| 179 |
+
}
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
@media screen and (max-width: 700px){
|
| 183 |
+
.featured_header h1{
|
| 184 |
+
line-height: 40px;
|
| 185 |
+
}
|
| 186 |
+
}
|
| 187 |
+
|
| 188 |
+
@media screen and (max-width: 435px) {
|
| 189 |
+
.featured_header h1 {
|
| 190 |
+
font-size: 20px;
|
| 191 |
+
line-height: 25px;
|
| 192 |
+
}
|
| 193 |
}
|
css/admin/featured_themes.css
CHANGED
|
@@ -1,79 +1,163 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
#main_featured_themes_page
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
#main_featured_themes_page #featured-
|
| 42 |
-
#main_featured_themes_page #featured-
|
| 43 |
-
#main_featured_themes_page #featured-
|
| 44 |
-
|
| 45 |
-
#main_featured_themes_page #featured-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
#main_featured_themes_page #featured-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
}
|
| 1 |
+
@import url(http://fonts.googleapis.com/css?family=Oswald);
|
| 2 |
+
|
| 3 |
+
#main_featured_themes_page #featured-plugins-list {
|
| 4 |
+
position:relative;
|
| 5 |
+
margin:0px auto;
|
| 6 |
+
height:auto;
|
| 7 |
+
display:table;
|
| 8 |
+
list-style:none;
|
| 9 |
+
text-align: center;
|
| 10 |
+
width: 100%;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
#main_featured_themes_page #featured-plugins-list li {
|
| 14 |
+
display: inline-table;
|
| 15 |
+
width: 245px;
|
| 16 |
+
margin: 20px 10px 0px 10px;
|
| 17 |
+
background: #FFFFFF;
|
| 18 |
+
border-right: 3px solid #E5E5E5;
|
| 19 |
+
height: 405px;
|
| 20 |
+
border-bottom: 3px solid #E5E5E5;
|
| 21 |
+
position: relative;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
#main_featured_themes_page #featured-plugins-list li .product {
|
| 25 |
+
position:relative;
|
| 26 |
+
height: 168px;
|
| 27 |
+
background-color: #F1F1F1 !important;
|
| 28 |
+
background-size: 100% !important;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
#main_featured_themes_page #featured-plugins-list li .title {
|
| 32 |
+
width: 91%;
|
| 33 |
+
text-align: center;
|
| 34 |
+
margin: 0 auto;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
#main_featured_themes_page {
|
| 38 |
+
font-family: Oswald;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
#main_featured_themes_page #featured-plugins-list li.sauron .product {background:url(../images/featured/sauron.png) left center no-repeat;}
|
| 42 |
+
#main_featured_themes_page #featured-plugins-list li.portfolio .product {background:url(../images/featured/portfolio.jpg) left center no-repeat;}
|
| 43 |
+
#main_featured_themes_page #featured-plugins-list li.business_elite .product {background:url(../images/featured/business_elite.png) left center no-repeat;}
|
| 44 |
+
#main_featured_themes_page #featured-plugins-list li.mottomag .product {background:url(../images/featured/mottomag.png) left center no-repeat; }
|
| 45 |
+
#main_featured_themes_page #featured-plugins-list li.business_world .product {background:url(../images/featured/business_world.png) left center no-repeat;}
|
| 46 |
+
#main_featured_themes_page #featured-plugins-list li.best_magazine .product {background:url(../images/featured/best_magazine.png) left center no-repeat;}
|
| 47 |
+
#main_featured_themes_page #featured-plugins-list li.wedding_style .product {background:url(../images/featured/wedding_style.png) left center no-repeat;}
|
| 48 |
+
#main_featured_themes_page #featured-plugins-list li.magazine .product {background:url(../images/featured/magazine.png) left center no-repeat;}
|
| 49 |
+
#main_featured_themes_page #featured-plugins-list li.weddings .product {background:url(../images/featured/wedding.png) left center no-repeat;}
|
| 50 |
+
#main_featured_themes_page #featured-plugins-list li.exclusive .product {background:url(../images/featured/exclusive.png) left center no-repeat;}
|
| 51 |
+
#main_featured_themes_page #featured-plugins-list li.expert .product {background:url(../images/featured/expert.png) left center no-repeat; background-size: 80%;}
|
| 52 |
+
|
| 53 |
+
#main_featured_themes_page #featured-plugins-list li .title .heading {
|
| 54 |
+
display: block;
|
| 55 |
+
position: relative;
|
| 56 |
+
font-size: 17px;
|
| 57 |
+
color: #767676;
|
| 58 |
+
margin: 13px 0px 13px 0px;
|
| 59 |
+
text-transform: uppercase;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
#main_featured_themes_page #featured-plugins-list li .title p {
|
| 63 |
+
font-size:14px;
|
| 64 |
+
color:#444;
|
| 65 |
+
margin-left:20px;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
#main_featured_themes_page #featured-plugins-list li .description {
|
| 69 |
+
height:130px;
|
| 70 |
+
width: 90%;
|
| 71 |
+
margin: 0 auto;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
#main_featured_themes_page #featured-plugins-list li .description p {
|
| 75 |
+
text-align: center;
|
| 76 |
+
width: 100%;
|
| 77 |
+
color: #9A9A9A;
|
| 78 |
+
font-family: "Open Sans",sans-serif;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
#featured-plugins-list li a.download {
|
| 82 |
+
display: block;
|
| 83 |
+
border-top: 1px solid #CACACA;
|
| 84 |
+
outline: none;
|
| 85 |
+
width: 90%;
|
| 86 |
+
margin: 0 auto;
|
| 87 |
+
font-size: 14px;
|
| 88 |
+
line-height: 40px;
|
| 89 |
+
text-decoration: none;
|
| 90 |
+
font-weight: bolder;
|
| 91 |
+
text-align: center;
|
| 92 |
+
color: #134D68;
|
| 93 |
+
position: absolute;
|
| 94 |
+
text-transform: uppercase;
|
| 95 |
+
bottom: 0;
|
| 96 |
+
left: 10px;
|
| 97 |
+
font-family: "Open Sans",sans-serif;
|
| 98 |
+
text-shadow: 1px 0;
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
#featured-plugins-list li a.download:hover {
|
| 102 |
+
color: #F47629;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.featured_header > div{
|
| 106 |
+
background: #FFFFFF;
|
| 107 |
+
border-right: 3px solid #E5E5E5;
|
| 108 |
+
border-bottom: 3px solid #E5E5E5;
|
| 109 |
+
padding: 20px 0;
|
| 110 |
+
}
|
| 111 |
+
.featured_header {
|
| 112 |
+
position: relative;
|
| 113 |
+
width: 90%;
|
| 114 |
+
margin: 15px auto 0px auto;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.featured_header .old_price{
|
| 118 |
+
color: rgba(180, 180, 180, 0.3);
|
| 119 |
+
text-decoration: line-through;
|
| 120 |
+
font-family: Oswald;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.featured_header h1.get_plugins{
|
| 124 |
+
color: #FFFFFF;
|
| 125 |
+
background:url(../images/featured/featured_plugins_bg.png) no-repeat;
|
| 126 |
+
height: 85px;
|
| 127 |
+
margin: 0;
|
| 128 |
+
background-size: 95% 100%;
|
| 129 |
+
background-position: center;
|
| 130 |
+
line-height: 60px;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.featured_header h1{
|
| 134 |
+
font-size: 45px;
|
| 135 |
+
text-align: center;
|
| 136 |
+
color: #F47629;
|
| 137 |
+
letter-spacing: 3px;
|
| 138 |
+
line-height: 10px;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.featured_header a{
|
| 142 |
+
text-decoration: none;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
@media screen and (max-width: 1035px) {
|
| 146 |
+
.featured_header h1{
|
| 147 |
+
font-size: 37px;
|
| 148 |
+
line-height: 0;
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
@media screen and (max-width: 835px) {
|
| 153 |
+
.get_plugins span{
|
| 154 |
+
display: none;
|
| 155 |
+
}
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
@media screen and (max-width: 435px) {
|
| 159 |
+
.featured_header h1 {
|
| 160 |
+
font-size: 20px;
|
| 161 |
+
line-height: 17px;
|
| 162 |
+
}
|
| 163 |
}
|
css/images/featured/arrow3.png
ADDED
|
Binary file
|
css/images/featured/calendar.png
ADDED
|
Binary file
|
css/images/featured/calendar1.png
ADDED
|
Binary file
|
css/images/featured/calendar_hover.png
ADDED
|
Binary file
|
css/images/featured/calendar_menu.png
ADDED
|
Binary file
|
css/images/featured/catalog.png
CHANGED
|
Binary file
|
css/images/featured/contact-form.png
ADDED
|
Binary file
|
css/images/featured/contact.builder.png
CHANGED
|
Binary file
|
css/images/featured/contacts.png
CHANGED
|
Binary file
|
css/images/featured/copy_cal.gif
ADDED
|
Binary file
|
css/images/featured/delete_el.png
ADDED
|
Binary file
|
css/images/featured/down.png
ADDED
|
Binary file
|
css/images/featured/downarrow.png
ADDED
|
Binary file
|
css/images/featured/events_wd.png
ADDED
|
Binary file
|
css/images/featured/facebook.png
CHANGED
|
Binary file
|
css/images/featured/faq.png
CHANGED
|
Binary file
|
css/images/featured/faq_wd.png
ADDED
|
Binary file
|
css/images/featured/featured_plugins_bg.png
ADDED
|
Binary file
|
css/images/featured/flash.calendar.png
CHANGED
|
Binary file
|
css/images/featured/folder.menu.png
CHANGED
|
Binary file
|
css/images/featured/form.png
CHANGED
|
Binary file
|
css/images/featured/header.png
ADDED
|
Binary file
|
css/images/featured/instagram_feed.png
CHANGED
|
Binary file
|
css/images/featured/loadingAnimation.gif
ADDED
|
Binary file
|
css/images/featured/minus.png
ADDED
|
Binary file
|
css/images/featured/photo-gallery.png
CHANGED
|
Binary file
|
css/images/featured/player.png
CHANGED
|
Binary file
|
css/images/featured/portfolio.jpg
ADDED
|
Binary file
|
css/images/featured/post-slider.png
ADDED
|
Binary file
|
css/images/featured/random.post.png
CHANGED
|
Binary file
|
css/images/featured/slider.png
CHANGED
|
Binary file
|
css/images/featured/spider.calendar.png
ADDED
|
Binary file
|
css/images/featured/spiderCalendar.png
ADDED
|
Binary file
|
css/images/featured/spider_calendar_themes.png
ADDED
|
Binary file
|
css/images/featured/spider_calendar_widget_themes.png
ADDED
|
Binary file
|
css/images/featured/tb-close.png
ADDED
|
Binary file
|
css/images/featured/twittertools.png
CHANGED
|
Binary file
|
css/images/featured/up.png
ADDED
|
Binary file
|
css/images/featured/zoom.png
CHANGED
|
Binary file
|
css/style.css
CHANGED
|
@@ -284,16 +284,19 @@ div.ecwd-page-month table.cal_blue div.event-details-container, div.ecwd-page-fu
|
|
| 284 |
left: 100%;
|
| 285 |
top: 0;
|
| 286 |
}
|
|
|
|
| 287 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container,
|
| 288 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container {
|
| 289 |
left: auto;
|
| 290 |
right: 100%;
|
| 291 |
margin-right: 11px;
|
| 292 |
}
|
|
|
|
| 293 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container .ecwd-event-arrow-right,
|
| 294 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container .ecwd-event-arrow-right{
|
| 295 |
display:block;
|
| 296 |
}
|
|
|
|
| 297 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container .ecwd-event-arrow,
|
| 298 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container .ecwd-event-arrow{
|
| 299 |
display:none;
|
|
@@ -1689,7 +1692,7 @@ div[class^="ecwd-page-"].ecwd_calendar .ecwd-week-date.resp{
|
|
| 1689 |
list-style: none !important;
|
| 1690 |
list-style-type: none !important;
|
| 1691 |
padding-left:0 !important;
|
| 1692 |
-
width: 500
|
| 1693 |
margin: 0 !important;
|
| 1694 |
}
|
| 1695 |
|
| 284 |
left: 100%;
|
| 285 |
top: 0;
|
| 286 |
}
|
| 287 |
+
div.ecwd-page-month table.cal_blue tr td:nth-child(5) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(5) div.event-details-container,
|
| 288 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container,
|
| 289 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container {
|
| 290 |
left: auto;
|
| 291 |
right: 100%;
|
| 292 |
margin-right: 11px;
|
| 293 |
}
|
| 294 |
+
div.ecwd-page-month table.cal_blue tr td:nth-child(5) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(5) div.event-details-container .ecwd-event-arrow-right,
|
| 295 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container .ecwd-event-arrow-right,
|
| 296 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container .ecwd-event-arrow-right{
|
| 297 |
display:block;
|
| 298 |
}
|
| 299 |
+
div.ecwd-page-month table.cal_blue tr td:nth-child(5) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(5) div.event-details-container .ecwd-event-arrow,
|
| 300 |
div.ecwd-page-month table.cal_blue tr td:nth-child(6) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(6) div.event-details-container .ecwd-event-arrow,
|
| 301 |
div.ecwd-page-month table.cal_blue tr td:nth-child(7) div.event-details-container, div.ecwd-page-full table.cal_blue tr td:nth-child(7) div.event-details-container .ecwd-event-arrow{
|
| 302 |
display:none;
|
| 1692 |
list-style: none !important;
|
| 1693 |
list-style-type: none !important;
|
| 1694 |
padding-left:0 !important;
|
| 1695 |
+
/*width: 500%;*/
|
| 1696 |
margin: 0 !important;
|
| 1697 |
}
|
| 1698 |
|
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.51
|
| 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 |
protected $notices = null;
|
| 12 |
|
|
@@ -19,7 +19,7 @@ class ECWD_Admin {
|
|
| 19 |
$this,
|
| 20 |
'add_action_links'
|
| 21 |
));
|
| 22 |
-
|
| 23 |
// Setup admin stants
|
| 24 |
add_action('init', array($this, 'define_admin_constants'));
|
| 25 |
add_action('init', array($this, ECWD_PLUGIN_PREFIX . '_shortcode_button'));
|
|
@@ -39,7 +39,7 @@ class ECWD_Admin {
|
|
| 39 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
| 40 |
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
| 41 |
add_action('admin_notices', array($this, 'ecwd_admin_notices'));
|
| 42 |
-
add_action('admin_init', array($this,'include_ecwd_pointer_class'));
|
| 43 |
}
|
| 44 |
|
| 45 |
/**
|
|
@@ -70,13 +70,16 @@ class ECWD_Admin {
|
|
| 70 |
'order' => 'DESC',
|
| 71 |
'post_type' => 'ecwd_event',
|
| 72 |
'post_status' => 'any'
|
| 73 |
-
|
| 74 |
if ($old_event && isset($old_event[0]->post_date)) {
|
| 75 |
add_option('ecwd_old_events', 1);
|
| 76 |
} else {
|
| 77 |
add_option('ecwd_old_events', 0);
|
| 78 |
}
|
| 79 |
}
|
|
|
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
public static function uninstall() {
|
|
@@ -84,6 +87,7 @@ class ECWD_Admin {
|
|
| 84 |
}
|
| 85 |
|
| 86 |
public function add_plugin_admin_menu() {
|
|
|
|
| 87 |
$this->ecwd_page[] = add_submenu_page(
|
| 88 |
'edit.php?post_type=ecwd_calendar', __('Settings', 'ecwd'), __('Settings', 'ecwd'), 'manage_options', $this->prefix . '_general_settings', array(
|
| 89 |
$this,
|
|
@@ -98,6 +102,7 @@ class ECWD_Admin {
|
|
| 98 |
'display_license_page'
|
| 99 |
)
|
| 100 |
);
|
|
|
|
| 101 |
$this->ecwd_page[] = add_submenu_page(
|
| 102 |
'edit.php?post_type=ecwd_calendar', __('Featured plugins', 'ecwd'), __('Featured plugins', 'ecwd'), 'manage_options', $this->prefix . '_featured_plugins', array(
|
| 103 |
$this,
|
|
@@ -122,14 +127,21 @@ class ECWD_Admin {
|
|
| 122 |
'display_themes_page'
|
| 123 |
), plugins_url('/assets/themes-icon.png', ECWD_MAIN_FILE), '26,18'
|
| 124 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
}
|
| 126 |
-
|
| 127 |
public function include_ecwd_pointer_class() {
|
| 128 |
include_once ('includes/ecwd_pointers.php');
|
| 129 |
$ecwd_pointer = new Ecwd_pointers();
|
| 130 |
}
|
| 131 |
|
| 132 |
-
|
| 133 |
public function display_addons_page() {
|
| 134 |
|
| 135 |
$addons = array(
|
|
@@ -216,11 +228,11 @@ class ECWD_Admin {
|
|
| 216 |
'image' => plugins_url('assets/add_ical.jpg', __FILE__)
|
| 217 |
),
|
| 218 |
'tickets' => array(
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
),
|
| 225 |
)
|
| 226 |
);
|
|
@@ -247,6 +259,42 @@ class ECWD_Admin {
|
|
| 247 |
include_once( 'views/admin/admin.php' );
|
| 248 |
}
|
| 249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
/**
|
| 251 |
* Enqueue styles for the admin area
|
| 252 |
*/
|
|
@@ -271,6 +319,7 @@ class ECWD_Admin {
|
|
| 271 |
*/
|
| 272 |
public function enqueue_admin_scripts() {
|
| 273 |
if ($this->ecwd_page()) {
|
|
|
|
| 274 |
wp_enqueue_script($this->prefix . '-gmap-public-admin', plugins_url('js/gmap/gmap3.js', __FILE__), array('jquery'), $this->version, true);
|
| 275 |
wp_enqueue_script($this->prefix . '-admin-datetimepicker', plugins_url('js/admin/jquery.datetimepicker.js', __FILE__), array(
|
| 276 |
'jquery',
|
|
@@ -309,6 +358,7 @@ class ECWD_Admin {
|
|
| 309 |
'loadingText' => __('Loading...', 'ecwd'),
|
| 310 |
'plugin_url' => ECWD_URL
|
| 311 |
));
|
|
|
|
| 312 |
wp_enqueue_script($this->prefix . '-admin-scripts');
|
| 313 |
}
|
| 314 |
}
|
|
@@ -357,10 +407,10 @@ class ECWD_Admin {
|
|
| 357 |
],
|
| 358 |
'ecwd_views': [
|
| 359 |
{text: 'None', value: 'none'},
|
| 360 |
-
{text: 'Month', value: 'month'},
|
| 361 |
{text: 'List', value: 'list'},
|
| 362 |
{text: 'Week', value: 'week'},
|
| 363 |
-
{text: 'Day', value: 'day'},
|
| 364 |
]
|
| 365 |
};
|
| 366 |
</script>
|
|
@@ -369,6 +419,7 @@ class ECWD_Admin {
|
|
| 369 |
}
|
| 370 |
|
| 371 |
public function ecwd_shortcode_button() {
|
|
|
|
| 372 |
// Don't bother doing this stuff if the current user lacks permissions
|
| 373 |
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
|
| 374 |
return;
|
|
@@ -385,7 +436,6 @@ class ECWD_Admin {
|
|
| 385 |
// registers the buttons for use
|
| 386 |
function register_buttons($buttons) {
|
| 387 |
// inserts a separator between existing buttons and our new one
|
| 388 |
-
// "friendly_button" is the ID of our button
|
| 389 |
if (!$this->ecwd_page()) {
|
| 390 |
array_push($buttons, "|", ECWD_PLUGIN_PREFIX);
|
| 391 |
}
|
|
@@ -446,6 +496,11 @@ class ECWD_Admin {
|
|
| 446 |
}
|
| 447 |
}
|
| 448 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 449 |
/**
|
| 450 |
* Set Web Dorado Logo in admin pages
|
| 451 |
*/
|
|
@@ -461,7 +516,7 @@ class ECWD_Admin {
|
|
| 461 |
alt="https://web-dorado.com/files/fromEventCalendarWD.php" width="215">
|
| 462 |
</a>
|
| 463 |
</div>
|
| 464 |
-
|
| 465 |
}
|
| 466 |
}
|
| 467 |
|
|
@@ -473,6 +528,7 @@ class ECWD_Admin {
|
|
| 473 |
self::$instance = new self;
|
| 474 |
}
|
| 475 |
|
|
|
|
| 476 |
return self::$instance;
|
| 477 |
}
|
| 478 |
|
| 6 |
class ECWD_Admin {
|
| 7 |
|
| 8 |
protected static $instance = null;
|
| 9 |
+
protected $version = '1.0.51';
|
| 10 |
protected $ecwd_page = null;
|
| 11 |
protected $notices = null;
|
| 12 |
|
| 19 |
$this,
|
| 20 |
'add_action_links'
|
| 21 |
));
|
| 22 |
+
$this->ecwd_config();
|
| 23 |
// Setup admin stants
|
| 24 |
add_action('init', array($this, 'define_admin_constants'));
|
| 25 |
add_action('init', array($this, ECWD_PLUGIN_PREFIX . '_shortcode_button'));
|
| 39 |
// Runs the admin notice ignore function incase a dismiss button has been clicked
|
| 40 |
add_action('admin_init', array($this, 'admin_notice_ignore'));
|
| 41 |
add_action('admin_notices', array($this, 'ecwd_admin_notices'));
|
| 42 |
+
add_action('admin_init', array($this, 'include_ecwd_pointer_class'));
|
| 43 |
}
|
| 44 |
|
| 45 |
/**
|
| 70 |
'order' => 'DESC',
|
| 71 |
'post_type' => 'ecwd_event',
|
| 72 |
'post_status' => 'any'
|
| 73 |
+
));
|
| 74 |
if ($old_event && isset($old_event[0]->post_date)) {
|
| 75 |
add_option('ecwd_old_events', 1);
|
| 76 |
} else {
|
| 77 |
add_option('ecwd_old_events', 0);
|
| 78 |
}
|
| 79 |
}
|
| 80 |
+
include_once ECWD_DIR . '/includes/ecwd_config.php';
|
| 81 |
+
$conf = ECWD_Config::get_instance();
|
| 82 |
+
$conf->update_conf_file();
|
| 83 |
}
|
| 84 |
|
| 85 |
public static function uninstall() {
|
| 87 |
}
|
| 88 |
|
| 89 |
public function add_plugin_admin_menu() {
|
| 90 |
+
global $ecwd_config;
|
| 91 |
$this->ecwd_page[] = add_submenu_page(
|
| 92 |
'edit.php?post_type=ecwd_calendar', __('Settings', 'ecwd'), __('Settings', 'ecwd'), 'manage_options', $this->prefix . '_general_settings', array(
|
| 93 |
$this,
|
| 102 |
'display_license_page'
|
| 103 |
)
|
| 104 |
);
|
| 105 |
+
|
| 106 |
$this->ecwd_page[] = add_submenu_page(
|
| 107 |
'edit.php?post_type=ecwd_calendar', __('Featured plugins', 'ecwd'), __('Featured plugins', 'ecwd'), 'manage_options', $this->prefix . '_featured_plugins', array(
|
| 108 |
$this,
|
| 127 |
'display_themes_page'
|
| 128 |
), plugins_url('/assets/themes-icon.png', ECWD_MAIN_FILE), '26,18'
|
| 129 |
);
|
| 130 |
+
if ($ecwd_config['show_config_submenu']) {
|
| 131 |
+
$this->ecwd_page[] = add_submenu_page(
|
| 132 |
+
'edit.php?post_type=ecwd_calendar', __('Config', 'ecwd'), __('Config', 'ecwd'), 'manage_options', $this->prefix . '_config', array(
|
| 133 |
+
$this,
|
| 134 |
+
'display_config_page'
|
| 135 |
+
)
|
| 136 |
+
);
|
| 137 |
+
}
|
| 138 |
}
|
| 139 |
+
|
| 140 |
public function include_ecwd_pointer_class() {
|
| 141 |
include_once ('includes/ecwd_pointers.php');
|
| 142 |
$ecwd_pointer = new Ecwd_pointers();
|
| 143 |
}
|
| 144 |
|
|
|
|
| 145 |
public function display_addons_page() {
|
| 146 |
|
| 147 |
$addons = array(
|
| 228 |
'image' => plugins_url('assets/add_ical.jpg', __FILE__)
|
| 229 |
),
|
| 230 |
'tickets' => array(
|
| 231 |
+
'name' => 'ECWD Event Tickets',
|
| 232 |
+
'url' => 'https://web-dorado.com/products/wordpress-event-calendar-wd/add-ons/event-tickets.html',
|
| 233 |
+
'description' => 'Event Tickets Add-on is an easy set up tool for integrating ECWD with WooCommerce to sell tickets for your events.',
|
| 234 |
+
'icon' => '',
|
| 235 |
+
'image' => plugins_url('assets/ticketing_addon.png', __FILE__)
|
| 236 |
),
|
| 237 |
)
|
| 238 |
);
|
| 259 |
include_once( 'views/admin/admin.php' );
|
| 260 |
}
|
| 261 |
|
| 262 |
+
public function display_config_page() {
|
| 263 |
+
$post_type = (isset($_GET['post_type']) && $_GET['post_type'] == 'ecwd_calendar');
|
| 264 |
+
$page = (isset($_GET['page']) && $_GET['page'] == 'ecwd_config');
|
| 265 |
+
$save_config = (isset($_GET['ecwd_save_config']) && $_GET['ecwd_save_config'] == '1');
|
| 266 |
+
|
| 267 |
+
$config_obj = ECWD_Config::get_instance();
|
| 268 |
+
|
| 269 |
+
if ($post_type && $page && $save_config) {
|
| 270 |
+
$config_obj->save_new_config($_POST);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
$configs = $config_obj->get_config();
|
| 274 |
+
$response = $config_obj->get_response();
|
| 275 |
+
$action = $_SERVER['REQUEST_URI'] . '&ecwd_save_config=1';
|
| 276 |
+
|
| 277 |
+
include(ECWD_DIR . '/views/admin/ecwd-config.php');
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
public function ecwd_edit_template($type) {
|
| 281 |
+
$option = $this->mail_template[$type]['option_name'];
|
| 282 |
+
$name = $this->mail_template[$type]['name'];
|
| 283 |
+
|
| 284 |
+
if (isset($_POST['mail_content']) && isset($_POST['ecwd_edit_template']) && check_admin_referer($type, 'ecwd_edit_template')) {
|
| 285 |
+
update_option($option, $_POST['mail_content']);
|
| 286 |
+
}
|
| 287 |
+
$html = get_option($option);
|
| 288 |
+
if ($html !== false) {
|
| 289 |
+
$ajax_action = (isset($_GET['action'])) ? $_GET['action'] : "";
|
| 290 |
+
$events = array();
|
| 291 |
+
if (isset($_GET['ecwd_event_list']) && $_GET['ecwd_event_list'] == true) {
|
| 292 |
+
$events = get_posts(array('numberposts' => -1, 'post_type' => 'ecwd_event', 'post_status' => 'publish'));
|
| 293 |
+
}
|
| 294 |
+
include_once('views/admin/ecwd-mail-template.php');
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
/**
|
| 299 |
* Enqueue styles for the admin area
|
| 300 |
*/
|
| 319 |
*/
|
| 320 |
public function enqueue_admin_scripts() {
|
| 321 |
if ($this->ecwd_page()) {
|
| 322 |
+
|
| 323 |
wp_enqueue_script($this->prefix . '-gmap-public-admin', plugins_url('js/gmap/gmap3.js', __FILE__), array('jquery'), $this->version, true);
|
| 324 |
wp_enqueue_script($this->prefix . '-admin-datetimepicker', plugins_url('js/admin/jquery.datetimepicker.js', __FILE__), array(
|
| 325 |
'jquery',
|
| 358 |
'loadingText' => __('Loading...', 'ecwd'),
|
| 359 |
'plugin_url' => ECWD_URL
|
| 360 |
));
|
| 361 |
+
|
| 362 |
wp_enqueue_script($this->prefix . '-admin-scripts');
|
| 363 |
}
|
| 364 |
}
|
| 407 |
],
|
| 408 |
'ecwd_views': [
|
| 409 |
{text: 'None', value: 'none'},
|
| 410 |
+
{text: 'Month', value: 'month'},
|
| 411 |
{text: 'List', value: 'list'},
|
| 412 |
{text: 'Week', value: 'week'},
|
| 413 |
+
{text: 'Day', value: 'day'},
|
| 414 |
]
|
| 415 |
};
|
| 416 |
</script>
|
| 419 |
}
|
| 420 |
|
| 421 |
public function ecwd_shortcode_button() {
|
| 422 |
+
|
| 423 |
// Don't bother doing this stuff if the current user lacks permissions
|
| 424 |
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
|
| 425 |
return;
|
| 436 |
// registers the buttons for use
|
| 437 |
function register_buttons($buttons) {
|
| 438 |
// inserts a separator between existing buttons and our new one
|
|
|
|
| 439 |
if (!$this->ecwd_page()) {
|
| 440 |
array_push($buttons, "|", ECWD_PLUGIN_PREFIX);
|
| 441 |
}
|
| 496 |
}
|
| 497 |
}
|
| 498 |
|
| 499 |
+
public function ecwd_config() {
|
| 500 |
+
include_once ECWD_DIR . '/includes/ecwd_config.php';
|
| 501 |
+
ECWD_Config::get_instance();
|
| 502 |
+
}
|
| 503 |
+
|
| 504 |
/**
|
| 505 |
* Set Web Dorado Logo in admin pages
|
| 506 |
*/
|
| 516 |
alt="https://web-dorado.com/files/fromEventCalendarWD.php" width="215">
|
| 517 |
</a>
|
| 518 |
</div>
|
| 519 |
+
<?php
|
| 520 |
}
|
| 521 |
}
|
| 522 |
|
| 528 |
self::$instance = new self;
|
| 529 |
}
|
| 530 |
|
| 531 |
+
|
| 532 |
return self::$instance;
|
| 533 |
}
|
| 534 |
|
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 static $instance = null;
|
| 6 |
*/
|
| 7 |
class ECWD {
|
| 8 |
|
| 9 |
+
protected $version = '1.0.51';
|
| 10 |
protected $plugin_name = 'event-calendar-wd';
|
| 11 |
protected $prefix = 'ecwd';
|
| 12 |
protected static $instance = null;
|
includes/calendar-class.php
CHANGED
|
@@ -2,1150 +2,1122 @@
|
|
| 2 |
|
| 3 |
class Calendar {
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
//--------------------------------------------------------------------------------------------
|
| 38 |
// Weekday names/abbreviations (array must start with Sunday=0)
|
| 39 |
//--------------------------------------------------------------------------------------------
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
//--------------------------------------------------------------------------------------------
|
| 70 |
// Other publics used. (No need to edit below here)
|
| 71 |
//--------------------------------------------------------------------------------------------
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
// static displaytype
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
}
|
| 104 |
if ($preview == false) {
|
| 105 |
if (isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == '1') {
|
| 106 |
$this->event_popup = "yes";
|
| 107 |
}
|
| 108 |
}
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
// calendar display type
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
|
| 137 |
// calendar date
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
// make sure we have year/month/day as int
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
|
| 174 |
// find out the number of days in the month
|
| 175 |
-
|
| 176 |
|
| 177 |
// create a calendar object
|
| 178 |
-
|
| 179 |
|
| 180 |
// get the month start day as an int (0 = Sunday, 1 = Monday, etc)
|
| 181 |
-
|
| 182 |
|
| 183 |
// get the month as a name
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
}
|
| 212 |
|
| 213 |
// header area for all displaytypes
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
|
| 218 |
|
| 219 |
-
|
| 220 |
-
|
| 221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
|
| 223 |
-
|
| 224 |
-
if ( is_array( $terms ) ) {
|
| 225 |
-
$this->$type = $terms;
|
| 226 |
-
}
|
| 227 |
-
}
|
| 228 |
-
|
| 229 |
-
public function addEvent( $arr ) {
|
| 230 |
|
| 231 |
|
| 232 |
-
|
| 233 |
-
|
| 234 |
|
| 235 |
// next month link
|
| 236 |
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
|
| 247 |
|
| 248 |
-
|
| 249 |
-
|
| 250 |
|
| 251 |
-
|
| 252 |
-
|
| 253 |
|
| 254 |
// previous month link
|
| 255 |
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
$html .= '
|
| 270 |
<tr>';
|
| 271 |
|
| 272 |
// render week number on left
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
|
| 277 |
// render previous month cells
|
| 278 |
-
|
| 279 |
|
| 280 |
-
|
| 281 |
|
| 282 |
// adjust for weekstartdays
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
|
| 303 |
// render days
|
| 304 |
-
|
| 305 |
-
|
| 306 |
|
| 307 |
-
|
| 308 |
|
| 309 |
-
|
| 310 |
// render week number on left
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
// render week number on right
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
|
| 331 |
// render next month cells
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
|
| 344 |
// render week number on right
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
$html .= '</tr>';
|
| 350 |
-
|
| 351 |
-
} elseif ( $this->displaytype == 'week' ) {
|
| 352 |
-
$html .= '<ul class="week-event-list">';
|
| 353 |
-
$currentWeek = $this->rangeWeek( $this->year . '-' . $this->month . '-' . $this->day );
|
| 354 |
-
$date = $currentWeek['start'];
|
| 355 |
-
|
| 356 |
-
while ( strtotime( $date ) <= strtotime( $currentWeek['end'] ) ) {
|
| 357 |
-
$html .= '<li>' . $this->calendar_cell( date( 'd', strtotime( $date ) ), 'day-with-date', date( 'Y-n-j', strtotime( $date ) ) ) . '</li>';
|
| 358 |
-
$date = date( "Y-m-d", strtotime( "+1 day", strtotime( $date ) ) );
|
| 359 |
-
}
|
| 360 |
-
$html .= '</ul>';
|
| 361 |
-
|
| 362 |
-
} elseif ( $this->displaytype == 'day' ) {
|
| 363 |
-
$html .= '<ul class="day-event-list">';
|
| 364 |
-
$html .= '<li>' . $this->calendar_cell( date( 'd', strtotime( $this->year . '-' . $this->month . '-' . $this->day ) ), 'day-with-date', date( 'Y-n-j', strtotime( $this->year . '-' . $this->month . '-' . $this->day ) ) ) . '</li>';
|
| 365 |
-
$html .= '</ul>';
|
| 366 |
-
} elseif ( $this->displaytype == '4day' ) {
|
| 367 |
-
$html .= '<ul class="day4-event-list">';
|
| 368 |
-
$days = $this->range4Days( $this->year . '-' . $this->month . '-' . $this->day );
|
| 369 |
-
$date = $days['start'];
|
| 370 |
-
while ( strtotime( $date ) <= strtotime( $days['end'] ) ) {
|
| 371 |
-
$html .= '<li>' . $this->calendar_cell( date( 'd', strtotime( $date ) ), 'day-with-date', date( 'Y-n-j', strtotime( $date ) ) ) . '</li>';
|
| 372 |
-
//$this->
|
| 373 |
-
$date = date( "Y-m-d", strtotime( "+1 day", strtotime( $date ) ) );
|
| 374 |
-
}
|
| 375 |
-
$html .= '</ul>';
|
| 376 |
-
|
| 377 |
-
} else { // event list and map
|
| 378 |
-
if ( count( $this->events ) > 0 ) {
|
| 379 |
-
//$this->events = $this->arraySort($this->events, 'from');
|
| 380 |
-
}
|
| 381 |
-
if ( $this->displaytype == 'map' ) {
|
| 382 |
-
|
| 383 |
-
} else {
|
| 384 |
-
$pages = 0;
|
| 385 |
-
$page = $this->page;
|
| 386 |
-
$html .= '<ul class="ecwd_list">';
|
| 387 |
-
if ( $this->listlimit !== false && $this->listlimit != 0) {
|
| 388 |
-
$offset = ( $page - 1 ) * $this->listlimit;
|
| 389 |
-
$pages = ceil( count( $this->events ) / $this->listlimit );
|
| 390 |
-
$this->events = array_slice( $this->events, $offset, $this->listlimit );
|
| 391 |
-
}
|
| 392 |
-
foreach ( $this->events as $event ) {
|
| 393 |
-
if ( strtotime( $event['from'] ) >= strtotime( $this->year . '-' . $this->month . '-1' ) &&
|
| 394 |
-
strtotime( $event['from'] ) <= strtotime( date( 'Y-m-t', strtotime( $this->date ) ) ) ) {
|
| 395 |
-
if ( $this->displaytype == 'list' ) { // full event list
|
| 396 |
-
$image_class = '';
|
| 397 |
-
$image = $this->getAndReplaceFirstImage( $event['details'] );
|
| 398 |
-
if ( ! has_post_thumbnail( $event['id'] ) && $event['image'] == "" ) {
|
| 399 |
-
$image_class = "ecwd-no-image";
|
| 400 |
-
}
|
| 401 |
-
$html .= '<li class="' . $image_class . '" itemscope itemtype="http://schema.org/Event">';
|
| 402 |
-
if ( ! $this->widget ) {
|
| 403 |
-
|
| 404 |
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 410 |
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 433 |
$html .= '<h3 class="event-title" itemprop="name"><span class="ecwd_open_event_popup event' . $event['id'] . '" style="color:' . $event['color'] . ';">' . $event['title'] . '</span></h3>';
|
| 434 |
} else if ($event['permalink'] != '') {
|
| 435 |
$html .= '<h3 class="event-title" itemprop="name"><a href="' . $event['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url" style="color:' . $event['color'] . ';">' . $event['title'] . '</a></h3>';
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place"><div class="ecwd-org-cont">
|
| 477 |
<span itemprop="name">';
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
$html .= $event['location'] ;
|
| 483 |
-
|
| 484 |
-
}
|
| 485 |
-
$html .= '</span>
|
| 486 |
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
| 487 |
' . ( $event['location'] ? $event['location'] : "" ) . '
|
| 488 |
</div>
|
| 489 |
</div>
|
| 490 |
</div>';
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
}
|
| 546 |
-
$html .= $this->calendar_foot();
|
| 547 |
|
| 548 |
// remove tabs, line breaks, vertical tabs, null-byte
|
| 549 |
-
|
| 550 |
|
| 551 |
-
|
| 552 |
-
|
| 553 |
|
| 554 |
// month/year select box
|
| 555 |
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
<a href="?date=' . $previous_dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow"><</a>
|
| 573 |
' . $this->year . '
|
| 574 |
<a href="?date=' . $next_dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow">></a>
|
| 575 |
<div>';
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
|
| 593 |
|
| 594 |
-
|
| 595 |
</div>';
|
| 596 |
|
| 597 |
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
|
| 602 |
-
|
| 603 |
-
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
<table class="ecwd_calendar_container ' . $this->displaytype . ' cal_' . $this->color . '" cellpadding="0" cellspacing="0" border="0">
|
| 611 |
|
| 612 |
<tr>';
|
| 613 |
// render week number on left
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
|
| 618 |
// render week number on right
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
</tr>
|
| 624 |
<tr>';
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
</tr>
|
| 644 |
';
|
| 645 |
-
|
| 646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 647 |
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
$html .= '<h2 class="list-title">' . $this->listtitle . '</h2>';
|
| 651 |
-
}
|
| 652 |
|
| 653 |
-
|
| 654 |
-
//$this->day = ;
|
| 655 |
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 660 |
|
| 661 |
-
|
| 662 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 663 |
|
| 664 |
-
|
| 665 |
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
$previous = $this->calcDate( $this->year . '-' . $this->month, '-1', 'month' );
|
| 669 |
-
$dateparam = $previous['year'] . '-' . $previous['month'];
|
| 670 |
-
$prev_date = '';
|
| 671 |
-
if ( $this->displaytype == 'day' ) {
|
| 672 |
-
$previous = $this->calcDate( $this->year . '-' . $this->month . '-' . $this->day, '-1', 'day' );
|
| 673 |
-
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 674 |
-
$prev_date = $previous['day'];
|
| 675 |
-
} elseif ( $this->displaytype == '4day' ) {
|
| 676 |
-
$previous = $this->calcDate( $this->year . '-' . $this->month . '-' . $this->day, '-4', 'day' );
|
| 677 |
-
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 678 |
-
$prev_date = $previous['day'];
|
| 679 |
-
} elseif ( $this->displaytype == 'week' ) {
|
| 680 |
-
$previous = $this->calcDate( $this->year . '-' . $this->month . '-' . $this->day, '-1', 'week' );
|
| 681 |
-
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 682 |
-
$prev_date = $previous['day'];
|
| 683 |
-
}
|
| 684 |
-
|
| 685 |
-
$this->previousmonth = ( $this->getMonth( $previous['year'] . '-' . $previous['month'], $this->monthnames ) );
|
| 686 |
-
if ( $this->widget == 1 ) {
|
| 687 |
-
$previoustext = '<span><</span>';
|
| 688 |
-
} else {
|
| 689 |
-
$previoustext = '<span><</span><span class="month-name"> ' . __( $this->previousmonth, 'ecwd' ) . ' ' . $prev_date . '</span>';
|
| 690 |
-
}
|
| 691 |
-
|
| 692 |
-
$html = '<div class="previous"><a href="?date=' . $dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow">' . $previoustext . '</a></div>';
|
| 693 |
-
|
| 694 |
-
return $html;
|
| 695 |
-
}
|
| 696 |
|
| 697 |
// calendar footer for all displaytypes
|
| 698 |
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 702 |
}
|
| 703 |
-
$date = date("Y-n-j", strtotime(date("Y-n-j", strtotime($startdate)) . " " . $increment . " " . $unit));
|
| 704 |
-
$date = explode('-', $date);
|
| 705 |
-
$newdate = array(
|
| 706 |
-
'year' => $date[0],
|
| 707 |
-
'month' => $date[1],
|
| 708 |
-
'day' => $date[2]
|
| 709 |
-
);
|
| 710 |
-
|
| 711 |
-
return $newdate;
|
| 712 |
}
|
|
|
|
| 713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
|
| 725 |
-
|
| 726 |
-
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
|
| 730 |
-
|
| 731 |
-
}
|
| 732 |
-
}
|
| 733 |
-
|
| 734 |
-
public function getMonthDate( $date ) {
|
| 735 |
-
if ( $this->displaytype == 'week' && strtotime( $date ) !== strtotime( date( 'Y-m-d' ) ) ) {
|
| 736 |
-
return date( 'Y-n-j', strtotime( "+1 week", strtotime( $date ) ) );
|
| 737 |
-
} elseif ( $this->displaytype == '4day' && strtotime( $date ) !== strtotime( date( 'Y-m-d' ) ) ) {
|
| 738 |
-
return date( 'Y-n-j', strtotime( "+3 day", strtotime( $date ) ) );
|
| 739 |
-
}
|
| 740 |
-
|
| 741 |
-
return $date;
|
| 742 |
-
}
|
| 743 |
-
|
| 744 |
-
public function getDayDate( $date ) {
|
| 745 |
-
if ( strtotime( $date ) == strtotime( date( 'Y-m-d' ) ) ) {
|
| 746 |
-
return $date;
|
| 747 |
-
} else {
|
| 748 |
-
if ( $this->displaytype == 'full' || $this->displaytype == 'month' || $this->displaytype == 'mini' || $this->displaytype == 'list' ) {
|
| 749 |
-
return date( 'Y-n-j', strtotime( date( 'Y-m-1' ), strtotime( $date ) ) );
|
| 750 |
-
} elseif ( $this->displaytype == 'week' ) {
|
| 751 |
-
return date( 'Y-n-j', strtotime( strtolower( $this->weekdays[ $this->weekstartday ] ) . " this week", strtotime( $date ) ) );
|
| 752 |
-
} else {
|
| 753 |
-
return $date;
|
| 754 |
-
}
|
| 755 |
-
}
|
| 756 |
-
|
| 757 |
-
}
|
| 758 |
|
| 759 |
// add an event to the events array
|
| 760 |
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
|
| 766 |
-
|
| 767 |
-
|
| 768 |
|
| 769 |
// pulls everything together and returns the calendar for all displaytypes
|
| 770 |
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
}
|
| 804 |
|
| 805 |
//--------------------------------------------------------------------------------------------
|
| 806 |
// Helper Functions
|
| 807 |
//--------------------------------------------------------------------------------------------
|
| 808 |
//
|
| 809 |
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
if ( $this->widget == 1 ) {
|
| 814 |
-
$html = ' <div class="ecwd_calendar_view_dropdown cal_tabs_' . $this->color . '" ><a class="ecwd-dropdown-toggle" data-toggle="ecwd-dropdown">';
|
| 815 |
-
$html .= $this->displaysName[ $this->displaytype ]['name'];
|
| 816 |
-
$html .= '</a>';
|
| 817 |
|
| 818 |
-
|
|
|
|
|
|
|
|
|
|
| 819 |
|
| 820 |
-
|
| 821 |
-
foreach ( $widgetDisplays as $display ) {
|
| 822 |
-
if ( $display !== 'none' && isset( $this->displaysName[ $display ] ) ) {
|
| 823 |
-
$html .= '<div class="type">' . '<a href="?date=' . $this->displaysName[ $display ]['date'] . '&t=' . $display . '" rel="noindex, nofollow">' . $this->displaysName[ $display ]['name'] . '</a>' . '</div>';
|
| 824 |
-
}
|
| 825 |
-
}
|
| 826 |
-
$html .= '</div></div>';
|
| 827 |
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 831 |
<div class="filter-arrow-left">«</div>
|
| 832 |
<div class="filter-arrow-right">»</div>';
|
| 833 |
|
| 834 |
|
| 835 |
-
|
| 836 |
-
|
| 837 |
-
|
| 838 |
-
|
| 839 |
-
|
| 840 |
-
|
| 841 |
-
|
| 842 |
-
|
| 843 |
-
|
| 844 |
-
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
<input class="ecwd-search" name="search" type="text" value="' . $svalue . '">'
|
| 858 |
-
|
| 859 |
</div>';
|
| 860 |
-
|
| 861 |
-
|
|
|
|
| 862 |
|
| 863 |
-
|
|
|
|
| 864 |
|
| 865 |
-
|
| 866 |
-
}
|
| 867 |
|
|
|
|
|
|
|
| 868 |
|
| 869 |
-
|
| 870 |
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
|
| 888 |
-
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
| 892 |
-
|
| 893 |
-
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
|
| 909 |
-
|
| 910 |
-
|
| 911 |
-
|
| 912 |
-
|
| 913 |
-
|
| 914 |
-
|
| 915 |
-
|
| 916 |
-
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
|
| 921 |
-
|
| 922 |
-
|
| 923 |
-
|
| 924 |
-
|
| 925 |
-
|
| 926 |
-
'image' => $image,
|
| 927 |
-
);
|
| 928 |
-
}
|
| 929 |
-
}
|
| 930 |
-
}
|
| 931 |
|
| 932 |
// sort by starttime for the cell
|
| 933 |
-
|
| 934 |
-
|
| 935 |
-
|
| 936 |
|
| 937 |
-
|
| 938 |
-
|
| 939 |
-
|
| 940 |
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
| 944 |
-
|
| 945 |
-
|
| 946 |
-
|
| 947 |
|
| 948 |
-
|
| 949 |
-
|
| 950 |
-
|
| 951 |
|
| 952 |
-
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
|
| 957 |
|
| 958 |
-
|
| 959 |
|
| 960 |
-
|
| 961 |
|
| 962 |
// check/set links for mini calendar
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
$month_name = date('F', strtotime($date));
|
| 984 |
$event_date = str_replace($month_name, __($month_name, 'ecwd'), $event_date);
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
| 988 |
-
|
| 989 |
-
|
| 990 |
-
|
| 991 |
-
|
| 992 |
-
|
| 993 |
-
|
| 994 |
-
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
| 998 |
-
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
-
|
| 1004 |
-
|
| 1005 |
-
|
| 1006 |
-
|
| 1007 |
-
|
| 1008 |
-
|
| 1009 |
-
|
| 1010 |
-
|
| 1011 |
-
|
| 1012 |
-
|
| 1013 |
-
|
| 1014 |
-
|
| 1015 |
-
|
| 1016 |
-
|
| 1017 |
-
|
| 1018 |
-
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
-
}
|
| 1023 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1024 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '" itemprop="name">' . $cellevent['title'] . '</span>';
|
| 1025 |
} elseif ($cellevent['permalink']) {
|
| 1026 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span itemprop="name">' . $cellevent['title'] . '</span></a>';
|
| 1027 |
-
|
| 1028 |
-
|
| 1029 |
-
|
| 1030 |
-
|
| 1031 |
-
|
| 1032 |
-
$this->seted_days[ $cellevent['id'] ] = $date;
|
| 1033 |
|
| 1034 |
-
|
| 1035 |
|
| 1036 |
-
|
| 1037 |
-
|
| 1038 |
|
| 1039 |
-
|
| 1040 |
-
|
| 1041 |
<h5 style="color:' . $cellevent['color'] . '" itemprop="name">';
|
| 1042 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1043 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '" style="color: ' . $cellevent['color'] . '">' . $cellevent['title'] . '</span>';
|
| 1044 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
| 1045 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . '">' . $cellevent['title'] . '</a>';
|
| 1046 |
-
|
| 1047 |
-
|
| 1048 |
-
|
| 1049 |
-
|
| 1050 |
';
|
| 1051 |
-
|
| 1052 |
-
|
| 1053 |
<h5 itemprop="name">';
|
| 1054 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1055 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
| 1056 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
| 1057 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '>' . $cellevent['title'] . '</a>';
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
| 1061 |
-
|
| 1062 |
-
|
| 1063 |
-
|
| 1064 |
-
|
| 1065 |
-
|
| 1066 |
-
|
| 1067 |
-
|
| 1068 |
-
|
| 1069 |
-
|
| 1070 |
-
|
| 1071 |
-
|
| 1072 |
-
|
| 1073 |
-
|
| 1074 |
-
|
| 1075 |
-
|
| 1076 |
-
|
| 1077 |
-
|
| 1078 |
-
|
| 1079 |
-
|
| 1080 |
-
|
| 1081 |
-
|
| 1082 |
-
|
| 1083 |
-
|
| 1084 |
-
|
| 1085 |
-
|
| 1086 |
-
|
| 1087 |
-
|
| 1088 |
-
|
| 1089 |
-
|
| 1090 |
-
|
| 1091 |
-
|
| 1092 |
-
|
| 1093 |
-
|
| 1094 |
-
|
| 1095 |
-
|
| 1096 |
-
|
| 1097 |
-
|
| 1098 |
-
|
| 1099 |
-
|
| 1100 |
-
|
| 1101 |
-
|
| 1102 |
-
|
| 1103 |
-
|
| 1104 |
-
|
| 1105 |
-
|
| 1106 |
-
|
| 1107 |
-
|
| 1108 |
-
|
| 1109 |
-
|
| 1110 |
-
|
| 1111 |
-
|
| 1112 |
-
|
| 1113 |
-
|
| 1114 |
-
|
| 1115 |
-
|
| 1116 |
-
|
| 1117 |
-
|
| 1118 |
-
|
| 1119 |
-
|
| 1120 |
-
|
| 1121 |
-
|
| 1122 |
-
|
| 1123 |
-
|
| 1124 |
-
|
| 1125 |
-
|
| 1126 |
-
|
| 1127 |
-
|
| 1128 |
-
|
| 1129 |
-
|
| 1130 |
-
|
| 1131 |
-
|
| 1132 |
-
|
| 1133 |
-
|
| 1134 |
-
|
| 1135 |
-
|
| 1136 |
-
$eventcontent .= '</li> ';
|
| 1137 |
|
| 1138 |
|
| 1139 |
// } else {
|
| 1140 |
// //$eventcontent .= $cellevent['title'];
|
| 1141 |
// }
|
|
|
|
| 1142 |
|
| 1143 |
-
|
| 1144 |
-
|
| 1145 |
-
$content .= $eventcontent;
|
| 1146 |
|
| 1147 |
-
|
| 1148 |
-
|
| 1149 |
<span class="ecwd-calendar-event-add">
|
| 1150 |
<span class="more_events_link">' . __('More events', 'ecwd') . '</span>
|
| 1151 |
</span>
|
|
@@ -1154,291 +1126,283 @@ class Calendar {
|
|
| 1154 |
<input type="hidden" class="ecwd-more-event-title" value="' . date($this->dateformat, strtotime($date)) . '" />
|
| 1155 |
</div>
|
| 1156 |
</li>';
|
| 1157 |
-
|
| 1158 |
-
|
| 1159 |
-
$content .= '</ul>';
|
| 1160 |
-
|
| 1161 |
|
| 1162 |
-
|
| 1163 |
-
|
| 1164 |
-
|
| 1165 |
-
|
| 1166 |
-
|
| 1167 |
-
|
| 1168 |
-
|
| 1169 |
-
|
| 1170 |
-
|
| 1171 |
-
|
| 1172 |
-
|
| 1173 |
-
|
| 1174 |
-
|
| 1175 |
-
|
| 1176 |
-
|
| 1177 |
-
|
| 1178 |
-
|
| 1179 |
-
|
| 1180 |
-
|
| 1181 |
-
|
| 1182 |
-
|
| 1183 |
-
|
| 1184 |
-
|
| 1185 |
-
|
| 1186 |
-
|
| 1187 |
-
|
| 1188 |
-
|
| 1189 |
-
|
| 1190 |
-
|
| 1191 |
-
|
| 1192 |
-
|
| 1193 |
-
|
| 1194 |
-
|
| 1195 |
-
|
| 1196 |
-
|
| 1197 |
-
|
| 1198 |
-
|
| 1199 |
-
|
| 1200 |
-
|
| 1201 |
-
|
| 1202 |
-
|
| 1203 |
-
|
| 1204 |
-
|
| 1205 |
-
|
| 1206 |
-
|
| 1207 |
-
|
|
|
|
|
|
|
| 1208 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1209 |
$html .= '<h3 class="event-title" itemprop="name"><span class="ecwd_open_event_popup event' . $cellevent['id'] . '"';
|
| 1210 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1211 |
-
|
| 1212 |
-
|
| 1213 |
-
|
| 1214 |
} else if ($cellevent['permalink'] != '') {
|
| 1215 |
$html .= '<h3 class="event-title" itemprop="name"> <a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget;
|
| 1216 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1217 |
-
|
| 1218 |
-
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
|
| 1222 |
-
$html .= '<h3 class="event-title" itemprop="name"';
|
| 1223 |
-
|
| 1224 |
-
if ( isset( $cellevent['color'] ) && $cellevent['color'] !== '' ) {
|
| 1225 |
-
$html .= 'style="color:' . $cellevent['color'] . ';"';
|
| 1226 |
-
}
|
| 1227 |
-
$html .= '>' . $cellevent['title'] . '</h3>';
|
| 1228 |
-
}
|
| 1229 |
-
$html .= '<div class="ecwd-list-date-cont">';
|
| 1230 |
-
if ( isset( $cellevent['all_day_event'] ) && $cellevent['all_day_event'] == 1 ) {
|
| 1231 |
-
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time" itemprop="startDate" content="' . date( 'Y-m-d', $cellevent['from'] ) . 'T' . date( 'H:i', strtotime( $cellevent['starttime'] ) ) . '"> ' . __( 'All day', 'ecwd' );
|
| 1232 |
-
$eventtime .= '</span>';
|
| 1233 |
-
$eventtime .= '</div>';
|
| 1234 |
-
$html .= $eventtime;
|
| 1235 |
-
} else {
|
| 1236 |
-
|
| 1237 |
-
if ( $cellevent['starttime'] != '' ) { // event details - hidden until clicked (full)
|
| 1238 |
-
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time" itemprop="startDate" content="' . date( 'Y-m-d', $cellevent['from'] ) . 'T' . date( 'H:i', strtotime( $cellevent['starttime'] ) ) . '"> ' . date( $this->timeformat, strtotime( $cellevent['starttime'] ) );
|
| 1239 |
-
if ( $cellevent['endtime'] != '' && $cellevent['endtime'] != $cellevent['starttime'] ) {
|
| 1240 |
-
$eventtime .= "-" . date( $this->timeformat, strtotime( $cellevent['endtime'] ) );
|
| 1241 |
-
}
|
| 1242 |
-
$eventtime .= '</span>';
|
| 1243 |
-
$eventtime .= '</div>';
|
| 1244 |
-
$html .= $eventtime;
|
| 1245 |
-
}
|
| 1246 |
-
}
|
| 1247 |
-
if ( $cellevent['from'] != '' ) {
|
| 1248 |
-
$eventdate = '<div class="ecwd-date"><span class="metainfo" itemprop="startDate" content="' . date( 'Y-m-d', $cellevent['from'] ) . 'T' . date( 'H:i', strtotime( $cellevent['starttime'] ) ) . '"> ' . date( $this->dateformat, $cellevent['from'] );
|
| 1249 |
-
if ( $cellevent['to'] != '' && $cellevent['to'] != $cellevent['from'] ) {
|
| 1250 |
-
$eventdate .= "-" . date( $this->dateformat, $cellevent['to'] );
|
| 1251 |
-
}
|
| 1252 |
-
$eventdate .= '</span>';
|
| 1253 |
-
$eventdate .= '</div>';
|
| 1254 |
-
$html .= $eventdate;
|
| 1255 |
-
}
|
| 1256 |
-
$html .= '</div>';
|
| 1257 |
-
if ( isset( $cellevent['organizers'] ) && count( $cellevent['organizers'] ) > 0 ) {
|
| 1258 |
-
$html .= '<div class="event-organizers">';
|
| 1259 |
-
foreach ( $cellevent['organizers'] as $organizer ) {
|
| 1260 |
-
$html .= '<div class="event-organizer" itemprop="organizer"> <a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
| 1261 |
-
}
|
| 1262 |
-
$html .= '</div>';
|
| 1263 |
-
}
|
| 1264 |
-
if ( $cellevent['location'] != '' ) {
|
| 1265 |
-
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">
|
| 1266 |
-
<span itemprop="name">';
|
| 1267 |
-
if ( isset( $cellevent['venue']['name'] ) ) {
|
| 1268 |
-
$html .= '<a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a>';
|
| 1269 |
-
}
|
| 1270 |
-
else{
|
| 1271 |
-
$html .= $cellevent['location'] ;
|
| 1272 |
|
| 1273 |
-
|
| 1274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1275 |
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
| 1276 |
<span itemprop="streetAddress">' . $cellevent['location'] . '</span>
|
| 1277 |
</div>
|
| 1278 |
</div>';
|
| 1279 |
-
|
| 1280 |
-
|
| 1281 |
-
|
| 1282 |
-
|
| 1283 |
-
|
| 1284 |
-
return $html;
|
| 1285 |
-
}
|
| 1286 |
-
}
|
| 1287 |
|
| 1288 |
-
|
| 1289 |
-
|
| 1290 |
-
|
| 1291 |
-
|
| 1292 |
-
|
| 1293 |
-
|
| 1294 |
-
|
|
|
|
| 1295 |
|
| 1296 |
-
|
| 1297 |
-
}
|
| 1298 |
|
|
|
|
|
|
|
| 1299 |
|
| 1300 |
-
|
| 1301 |
-
|
| 1302 |
-
|
| 1303 |
-
|
| 1304 |
-
|
| 1305 |
-
|
| 1306 |
-
|
| 1307 |
-
|
| 1308 |
|
| 1309 |
-
|
| 1310 |
-
|
| 1311 |
|
| 1312 |
// add/subtract day,week,month,days from startdate
|
| 1313 |
|
| 1314 |
-
|
| 1315 |
-
|
| 1316 |
-
|
| 1317 |
-
|
| 1318 |
|
| 1319 |
-
|
| 1320 |
-
|
| 1321 |
|
| 1322 |
// recursive array search returns the key of occurance (int) or false if not found
|
| 1323 |
|
| 1324 |
-
|
| 1325 |
-
|
| 1326 |
-
|
| 1327 |
-
|
| 1328 |
-
|
| 1329 |
-
|
| 1330 |
-
|
| 1331 |
-
|
| 1332 |
-
|
| 1333 |
-
|
| 1334 |
-
|
| 1335 |
-
|
| 1336 |
-
|
| 1337 |
-
|
| 1338 |
-
|
| 1339 |
-
|
| 1340 |
-
|
| 1341 |
-
|
| 1342 |
-
|
| 1343 |
-
|
| 1344 |
-
|
| 1345 |
-
|
| 1346 |
-
|
| 1347 |
-
|
| 1348 |
-
|
| 1349 |
-
|
| 1350 |
-
|
| 1351 |
-
|
| 1352 |
-
|
| 1353 |
-
|
| 1354 |
-
|
| 1355 |
-
|
| 1356 |
-
|
| 1357 |
-
|
| 1358 |
-
|
| 1359 |
-
|
| 1360 |
-
|
| 1361 |
-
|
| 1362 |
-
|
| 1363 |
-
|
| 1364 |
-
|
| 1365 |
-
|
| 1366 |
-
|
| 1367 |
-
|
| 1368 |
-
|
| 1369 |
-
|
| 1370 |
-
|
| 1371 |
-
|
| 1372 |
-
|
| 1373 |
-
|
| 1374 |
-
|
| 1375 |
-
|
| 1376 |
-
|
| 1377 |
|
| 1378 |
// Removes tabs, line breaks, vertical tabs, null-byte. Everything but a regular space.
|
| 1379 |
|
| 1380 |
-
|
| 1381 |
-
|
| 1382 |
-
|
| 1383 |
-
|
| 1384 |
-
|
| 1385 |
-
|
| 1386 |
-
|
| 1387 |
-
|
| 1388 |
|
| 1389 |
-
|
| 1390 |
-
|
| 1391 |
|
| 1392 |
// sorts an associative array by values of passed key
|
| 1393 |
|
| 1394 |
-
|
| 1395 |
-
|
| 1396 |
-
|
| 1397 |
-
|
| 1398 |
-
|
| 1399 |
-
|
| 1400 |
-
|
| 1401 |
-
|
| 1402 |
-
|
| 1403 |
-
|
| 1404 |
-
|
| 1405 |
-
|
| 1406 |
-
|
| 1407 |
-
|
| 1408 |
-
|
| 1409 |
|
| 1410 |
// returns the rgb string or the associative array
|
| 1411 |
-
|
| 1412 |
-
|
| 1413 |
-
|
| 1414 |
-
|
| 1415 |
-
|
| 1416 |
-
|
| 1417 |
-
|
| 1418 |
-
|
| 1419 |
-
|
| 1420 |
-
|
| 1421 |
-
|
| 1422 |
-
|
| 1423 |
-
|
| 1424 |
-
|
| 1425 |
-
|
| 1426 |
-
|
| 1427 |
-
|
| 1428 |
-
|
| 1429 |
-
|
| 1430 |
-
|
| 1431 |
-
|
| 1432 |
-
|
| 1433 |
-
|
| 1434 |
-
|
| 1435 |
-
|
| 1436 |
-
|
| 1437 |
-
|
| 1438 |
-
|
| 1439 |
-
return $content;
|
| 1440 |
-
}
|
| 1441 |
-
}
|
| 1442 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1443 |
|
| 1444 |
// end class
|
| 2 |
|
| 3 |
class Calendar {
|
| 4 |
|
| 5 |
+
public $weekstartday = 0; // week start day (0-6 e.g. 0 = Sunday, 1 = Monday, etc.)
|
| 6 |
+
public $monthselector = true; // month/year select box (true=show selector,false=show month name)
|
| 7 |
+
public $yearoffset = 5; // monthselector range of years (int)
|
| 8 |
+
public $weeknumbers = false; // adds a column for week numbers (left,right,false)
|
| 9 |
+
public $weeknumrotate = true; // rotate weeknumbers 90 degrees *currently only firefox is supported* (true,false)
|
| 10 |
+
public $weeknames = 2; // controls how weekdays are displayed. (1=full,2=abbrev,3=single char)
|
| 11 |
+
public $monthnames = 1; // controls how months are displayed. (1=full,2=abbrev)
|
| 12 |
+
public $basecolor = '7D9AC0'; // base color for color scheme (hex)
|
| 13 |
+
public $color = 'blue'; // color for color scheme (hex)
|
| 14 |
+
public $minilinkbase = ''; // base url for links on mini calendar (blank=disabled)
|
| 15 |
+
public $eventlistbg = '10738B'; // event list view bg color (hex)
|
| 16 |
+
public $eventemptytext = 'No additional details for this event.'; // default text in event view when details is empty (string)
|
| 17 |
+
public $dateformat = 'Y.m.d'; // default date format (passed to php date() public function)
|
| 18 |
+
public $list_date_format = 'd.F.l'; // default date format (passed to php date() public function)
|
| 19 |
+
public $timeformat = 'H:i'; // default time format (passed to php date() public function)
|
| 20 |
+
public $font = '"Lucida Grande","Lucida Sans Unicode",sans-serif'; // font used to display the calendar (any css supported value)
|
| 21 |
+
public $linktarget = 'parent'; // link target frame or window (e.g. 'parent.frameName'. Use '_blank' for new window/tab)
|
| 22 |
+
public $listlimit = false; // limit the number of events in list and mini-list (false or int e.g. 10)
|
| 23 |
+
public $listtitle = ''; //'Event List'; // Title shown when displaying full event list
|
| 24 |
+
public $widget = 0;
|
| 25 |
+
public $search_params = array();
|
| 26 |
+
public $categories = array();
|
| 27 |
+
public $tags = array();
|
| 28 |
+
public $venues = array();
|
| 29 |
+
public $organizers = array();
|
| 30 |
+
public $displays = array('full', 'list', 'week', 'day');
|
| 31 |
+
public $filters = array('categories', 'tags', 'venues', 'organizers');
|
| 32 |
+
public $event_search = 'yes';
|
| 33 |
+
public $displaysName;
|
| 34 |
+
public $eventlinktarget;
|
| 35 |
+
public $event_popup = "no";
|
|
|
|
| 36 |
//--------------------------------------------------------------------------------------------
|
| 37 |
// Weekday names/abbreviations (array must start with Sunday=0)
|
| 38 |
//--------------------------------------------------------------------------------------------
|
| 39 |
|
| 40 |
+
public $weekdate;
|
| 41 |
+
public $weekdays = array(
|
| 42 |
+
"Sunday",
|
| 43 |
+
"Monday",
|
| 44 |
+
"Tuesday",
|
| 45 |
+
"Wednesday",
|
| 46 |
+
"Thursday",
|
| 47 |
+
"Friday",
|
| 48 |
+
"Saturday"
|
| 49 |
+
);
|
| 50 |
+
public $abbrevweekdays = array(
|
| 51 |
+
"Sun",
|
| 52 |
+
"Mon",
|
| 53 |
+
"Tue",
|
| 54 |
+
"Wed",
|
| 55 |
+
"Thu",
|
| 56 |
+
"Fri",
|
| 57 |
+
"Sat"
|
| 58 |
+
);
|
| 59 |
+
public $weekdayschar = array(
|
| 60 |
+
"Su",
|
| 61 |
+
"Mo",
|
| 62 |
+
"Tu",
|
| 63 |
+
"We",
|
| 64 |
+
"Th",
|
| 65 |
+
"Fr",
|
| 66 |
+
"Sa"
|
| 67 |
+
);
|
| 68 |
//--------------------------------------------------------------------------------------------
|
| 69 |
// Other publics used. (No need to edit below here)
|
| 70 |
//--------------------------------------------------------------------------------------------
|
| 71 |
|
| 72 |
+
public $jd, $year, $month, $day, $displaytype, $numdaysinmonth, $monthstartday, $monthname, $previousmonth, $nextmonth;
|
| 73 |
+
public $events = array();
|
| 74 |
|
| 75 |
+
// types: mini,full,list,mini-list,(default=full)
|
| 76 |
+
public function __construct($type = 'full', $date = '', $staticdisplaytype = false, $widget = 0, $limit = false, $page = 1, $displays = null, $filters = null, $event_search = 'yes', $ecwd_views = array(), $preview) {
|
| 77 |
// static displaytype
|
| 78 |
+
global $ecwd_options;
|
| 79 |
+
$this->eventemptytext = isset($ecwd_options['event_default_description']) ? $ecwd_options['event_default_description'] : $this->eventemptytext;
|
| 80 |
+
if (isset($ecwd_options['date_format']) && $ecwd_options['date_format'] != '') {
|
| 81 |
+
if (isset($ecwd_options['date_format'])) {
|
| 82 |
+
$this->dateformat = $ecwd_options['date_format'];
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
if (isset($ecwd_options['list_date_format']) && $ecwd_options['list_date_format'] != '') {
|
| 86 |
+
$this->list_date_format = $ecwd_options['list_date_format'];
|
| 87 |
+
}
|
| 88 |
+
if (isset($ecwd_options['time_format']) && $ecwd_options['time_format'] != '') {
|
| 89 |
+
$this->timeformat = $ecwd_options['time_format'];
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
$this->eventlinktarget .= (isset($ecwd_options['events_new_tab']) && $ecwd_options['events_new_tab'] == 1 ? ' target="_blank" ' : '');
|
| 93 |
+
|
| 94 |
+
$this->timeformat .= (isset($ecwd_options['time_type']) ? ' ' . $ecwd_options['time_type'] : '');
|
| 95 |
+
if (isset($ecwd_options['time_type']) && $ecwd_options['time_type'] != '') {
|
| 96 |
+
$this->timeformat = str_replace('H', 'g', $this->timeformat);
|
| 97 |
+
$this->timeformat = str_replace('h', 'g', $this->timeformat);
|
| 98 |
+
}
|
| 99 |
+
if (isset($ecwd_options['week_starts']) && $ecwd_options['week_starts'] != '') {
|
| 100 |
+
$this->weekstartday = $ecwd_options['week_starts'];
|
| 101 |
+
}
|
|
|
|
| 102 |
if ($preview == false) {
|
| 103 |
if (isset($ecwd_options['events_in_popup']) && $ecwd_options['events_in_popup'] == '1') {
|
| 104 |
$this->event_popup = "yes";
|
| 105 |
}
|
| 106 |
}
|
| 107 |
+
$this->widget = $widget;
|
| 108 |
+
$this->page = $page;
|
| 109 |
+
|
| 110 |
+
if ($displays && is_array($displays) && $displays[0] != '') {
|
| 111 |
+
$displays = array_unique($displays);
|
| 112 |
+
if (( $key = array_search('none', $displays) ) !== false) {
|
| 113 |
+
unset($displays[$key]);
|
| 114 |
+
}
|
| 115 |
+
$this->displays = $displays;
|
| 116 |
+
}
|
| 117 |
+
if ($filters && is_array($filters) && $filters[0] != '') {
|
| 118 |
+
$filters = array_unique($filters);
|
| 119 |
+
if (( $key = array_search('none', $filters) ) !== false) {
|
| 120 |
+
unset($filters[$key]);
|
| 121 |
+
}
|
| 122 |
+
$this->filters = $filters;
|
| 123 |
+
}
|
| 124 |
+
if ($staticdisplaytype === true) {
|
| 125 |
+
$this->displaytype = $type;
|
| 126 |
+
} else {
|
| 127 |
// calendar display type
|
| 128 |
+
if ($type != '' && !isset($_REQUEST['t'])) {
|
| 129 |
+
$this->displaytype = $type; // if type is not set in querystring set type to passed value
|
| 130 |
+
} else {
|
| 131 |
+
$this->displaytype = $_REQUEST['t']; // else set to type passed in querystring
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
|
| 135 |
// calendar date
|
| 136 |
+
if ($date == '' && !isset($_REQUEST['date'])) {
|
| 137 |
+
$date = date('Y-n-j');
|
| 138 |
+
} // set to todays date if no value is set
|
| 139 |
+
if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {
|
| 140 |
+
$date = $_REQUEST['date'];
|
| 141 |
+
} // check if date is in the querystring
|
| 142 |
+
$date = date('Y-n-j', strtotime($date)); // format the date for parsing
|
| 143 |
+
$date_part = explode('-', $date); // separate year/month/day
|
| 144 |
+
$year = $date_part[0];
|
| 145 |
+
$month = $date_part[1];
|
| 146 |
+
$day = $date_part[2];
|
| 147 |
+
if (!is_archive() && isset($_REQUEST['y']) && $_REQUEST['y'] != '') {
|
| 148 |
+
$year = $_REQUEST['y'];
|
| 149 |
+
} // if year is set in querystring it takes precedence
|
| 150 |
+
if (!is_archive() && isset($_REQUEST['m']) && $_REQUEST['m'] != '') {
|
| 151 |
+
$month = $_REQUEST['m'];
|
| 152 |
+
} // if month is set in querystring it takes precedence
|
| 153 |
+
if (!is_archive() && isset($_REQUEST['d']) && $_REQUEST['d'] != '') {
|
| 154 |
+
$day = $_REQUEST['d'];
|
| 155 |
+
} // if day is set in querystring it takes precedence
|
| 156 |
// make sure we have year/month/day as int
|
| 157 |
+
if ($year == '') {
|
| 158 |
+
$year = date('Y');
|
| 159 |
+
}
|
| 160 |
+
if ($month == '') {
|
| 161 |
+
$month = date('n'); // set to january if year is known
|
| 162 |
+
}
|
| 163 |
+
if ($day == '') {
|
| 164 |
+
$day = date('j'); // set to the 1st is year and month is known
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
$this->date = $date;
|
| 168 |
+
$this->month = (int) $month;
|
| 169 |
+
$this->year = (int) $year;
|
| 170 |
+
$this->day = (int) $day;
|
| 171 |
|
| 172 |
// find out the number of days in the month
|
| 173 |
+
$this->numdaysinmonth = cal_days_in_month(CAL_GREGORIAN, $this->month, $this->year);
|
| 174 |
|
| 175 |
// create a calendar object
|
| 176 |
+
$this->jd = cal_to_jd(CAL_GREGORIAN, $this->month, date(1), $this->year);
|
| 177 |
|
| 178 |
// get the month start day as an int (0 = Sunday, 1 = Monday, etc)
|
| 179 |
+
$this->monthstartday = jddayofweek($this->jd, 0);
|
| 180 |
|
| 181 |
// get the month as a name
|
| 182 |
+
$this->monthname = __(Date('F', strtotime($this->date)), 'ecwd');
|
| 183 |
+
|
| 184 |
+
//get weekdate
|
| 185 |
+
$this->weekdate = $this->getWeekFirstDayDate($this->date);
|
| 186 |
+
|
| 187 |
+
//get month date
|
| 188 |
+
$this->monthdate = $this->getMonthDate($this->date);
|
| 189 |
+
|
| 190 |
+
//get day date
|
| 191 |
+
$this->daydate = $this->getDayDate($this->date);
|
| 192 |
+
|
| 193 |
+
$this->displaysName = array(
|
| 194 |
+
'full' => array('name' => __('Month', 'ecwd'), 'date' => $this->monthdate),
|
| 195 |
+
'mini' => array('name' => __('Month', 'ecwd'), 'date' => $this->monthdate),
|
| 196 |
+
'list' => array('name' => __('List', 'ecwd'), 'date' => $this->monthdate),
|
| 197 |
+
'week' => array(
|
| 198 |
+
'name' => __('Week', 'ecwd'),
|
| 199 |
+
'date' => $this->weekdate
|
| 200 |
+
),
|
| 201 |
+
'day' => array(
|
| 202 |
+
'name' => __('Day', 'ecwd'),
|
| 203 |
+
'date' => $this->daydate
|
| 204 |
+
),
|
| 205 |
+
);
|
| 206 |
+
$this->event_search = $event_search;
|
| 207 |
+
$this->listlimit = $limit;
|
| 208 |
+
}
|
|
|
|
| 209 |
|
| 210 |
// header area for all displaytypes
|
| 211 |
|
| 212 |
+
public function month_selector() {
|
| 213 |
+
$html = '';
|
| 214 |
|
| 215 |
|
| 216 |
+
return $html;
|
| 217 |
+
}
|
| 218 |
|
| 219 |
+
public function add_terms($type = 'categories', $terms) {
|
| 220 |
+
if (is_array($terms)) {
|
| 221 |
+
$this->$type = $terms;
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
|
| 225 |
+
public function addEvent($arr) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
|
| 228 |
+
$this->events[] = $arr;
|
| 229 |
+
}
|
| 230 |
|
| 231 |
// next month link
|
| 232 |
|
| 233 |
+
public function dateDiff($beginDate, $endDate) {
|
| 234 |
+
if ($endDate == '') {
|
| 235 |
+
return 0;
|
| 236 |
+
}
|
| 237 |
+
$fromDate = date('Y-n-j', strtotime($beginDate));
|
| 238 |
+
$toDate = date('Y-n-j', strtotime($endDate));
|
| 239 |
+
// echo $fromDate.'----'.$toDate.'<br />';
|
| 240 |
+
$date_parts1 = explode('-', $fromDate);
|
| 241 |
+
$date_parts2 = explode('-', $toDate);
|
| 242 |
|
| 243 |
|
| 244 |
+
$start_date = gregoriantojd($date_parts1[1], $date_parts1[2], $date_parts1[0]);
|
| 245 |
+
$end_date = gregoriantojd($date_parts2[1], $date_parts2[2], $date_parts2[0]);
|
| 246 |
|
| 247 |
+
return $end_date - $start_date;
|
| 248 |
+
}
|
| 249 |
|
| 250 |
// previous month link
|
| 251 |
|
| 252 |
+
public function showcal() {
|
| 253 |
+
global $cal_ID;
|
| 254 |
+
$html = '';
|
| 255 |
+
$html .= $this->calendar_head(); // set table head
|
| 256 |
+
$this->seted_days = array();
|
| 257 |
+
if (!in_array($this->displaytype, array(
|
| 258 |
+
"list",
|
| 259 |
+
"mini-list",
|
| 260 |
+
"week",
|
| 261 |
+
'day',
|
| 262 |
+
))
|
| 263 |
+
) { // mini and full cal
|
| 264 |
+
$html .= '
|
|
|
|
| 265 |
<tr>';
|
| 266 |
|
| 267 |
// render week number on left
|
| 268 |
+
if ($this->weeknumbers == 'left' && $this->monthstartday != $this->weekstartday) {
|
| 269 |
+
$html .= '<td class="week-number"><span>' . date('W', strtotime($this->year . '-' . $this->month)) . '</span></td>';
|
| 270 |
+
}
|
| 271 |
|
| 272 |
// render previous month cells
|
| 273 |
+
$emptycells = 0;
|
| 274 |
|
| 275 |
+
$numinrow = 7;
|
| 276 |
|
| 277 |
// adjust for weekstartdays
|
| 278 |
+
$weekstartadjust = $this->monthstartday - $this->weekstartday;
|
| 279 |
+
if ($weekstartadjust < 0) {
|
| 280 |
+
$weekstartadjust = $weekstartadjust + $numinrow;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
for ($counter = 0; $counter < $weekstartadjust; $counter ++) {
|
| 284 |
+
if ($counter == 0) {
|
| 285 |
+
$thisclass = 'day-without-date week-start';
|
| 286 |
+
} // only on first
|
| 287 |
+
else {
|
| 288 |
+
$thisclass = 'day-without-date';
|
| 289 |
+
}
|
| 290 |
+
if ($this->displaytype == 'full') {
|
| 291 |
+
$html .= $this->calendar_cell(__($this->previousmonth, 'ecwd'), $thisclass);
|
| 292 |
+
} else {
|
| 293 |
+
$html .= $this->calendar_cell(' ', $thisclass);
|
| 294 |
+
}
|
| 295 |
+
$emptycells ++;
|
| 296 |
+
}
|
| 297 |
|
| 298 |
// render days
|
| 299 |
+
$rowcounter = $emptycells;
|
| 300 |
+
$weeknumadjust = $numinrow - ( $this->monthstartday - $this->weekstartday );
|
| 301 |
|
| 302 |
+
for ($counter = 1; $counter <= $this->numdaysinmonth; $counter ++) {
|
| 303 |
|
| 304 |
+
$date = $this->year . '-' . $this->month . '-' . $counter;
|
| 305 |
// render week number on left
|
| 306 |
+
if ($this->weeknumbers == 'left' && $this->weekstartday == $this->getDay($date, 0)) {
|
| 307 |
+
$adjustweek = $this->calcDate($date, '+' . $weeknumadjust, 'day');
|
| 308 |
+
$adjustweek = $adjustweek['year'] . '-' . $adjustweek['month'] . '-' . $adjustweek['day'];
|
| 309 |
+
$html .= '<td class="week-number"><span>' . date('W', strtotime($adjustweek)) . '</span></td>';
|
| 310 |
+
}
|
| 311 |
+
$rowcounter ++;
|
| 312 |
+
$html .= $this->calendar_cell($counter, 'day-with-date', $date);
|
| 313 |
+
if ($rowcounter % $numinrow == 0) {
|
| 314 |
// render week number on right
|
| 315 |
+
if ($this->weeknumbers == 'right') {
|
| 316 |
+
$html .= '<td class="week-number"><span>' . date('W', strtotime($date)) . '</span></td>';
|
| 317 |
+
}
|
| 318 |
+
$html .= "</tr>";
|
| 319 |
+
if ($counter < $this->numdaysinmonth) {
|
| 320 |
+
$html .= "<tr>";
|
| 321 |
+
}
|
| 322 |
+
$rowcounter = 0;
|
| 323 |
+
}
|
| 324 |
+
}
|
| 325 |
|
| 326 |
// render next month cells
|
| 327 |
+
$numcellsleft = $numinrow - $rowcounter;
|
| 328 |
+
if ($numcellsleft != $numinrow) {
|
| 329 |
+
for ($counter = 0; $counter < $numcellsleft; $counter ++) {
|
| 330 |
+
if ($this->displaytype == 'full') {
|
| 331 |
+
$html .= $this->calendar_cell($this->nextmonth, 'day-without-date');
|
| 332 |
+
} else {
|
| 333 |
+
$html .= $this->calendar_cell(' ', 'day-without-date');
|
| 334 |
+
}
|
| 335 |
+
$emptycells ++;
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
|
| 339 |
// render week number on right
|
| 340 |
+
if ($this->weeknumbers == 'right' && $numcellsleft != 7) {
|
| 341 |
+
$html .= '<td class="week-number" style="border-bottom:1px solid #' . $this->bordercolor . ';"><span>' . date('W', strtotime($date)) . '</span></td>';
|
| 342 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
|
| 344 |
+
$html .= '</tr>';
|
| 345 |
+
} elseif ($this->displaytype == 'week') {
|
| 346 |
+
$html .= '<ul class="week-event-list">';
|
| 347 |
+
$currentWeek = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
| 348 |
+
$date = $currentWeek['start'];
|
| 349 |
+
|
| 350 |
+
while (strtotime($date) <= strtotime($currentWeek['end'])) {
|
| 351 |
+
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
| 352 |
+
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
| 353 |
+
}
|
| 354 |
+
$html .= '</ul>';
|
| 355 |
+
} elseif ($this->displaytype == 'day') {
|
| 356 |
+
$html .= '<ul class="day-event-list">';
|
| 357 |
+
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($this->year . '-' . $this->month . '-' . $this->day)), 'day-with-date', date('Y-n-j', strtotime($this->year . '-' . $this->month . '-' . $this->day))) . '</li>';
|
| 358 |
+
$html .= '</ul>';
|
| 359 |
+
} elseif ($this->displaytype == '4day') {
|
| 360 |
+
$html .= '<ul class="day4-event-list">';
|
| 361 |
+
$days = $this->range4Days($this->year . '-' . $this->month . '-' . $this->day);
|
| 362 |
+
$date = $days['start'];
|
| 363 |
+
while (strtotime($date) <= strtotime($days['end'])) {
|
| 364 |
+
$html .= '<li>' . $this->calendar_cell(date('d', strtotime($date)), 'day-with-date', date('Y-n-j', strtotime($date))) . '</li>';
|
| 365 |
+
//$this->
|
| 366 |
+
$date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
|
| 367 |
+
}
|
| 368 |
+
$html .= '</ul>';
|
| 369 |
+
} else { // event list and map
|
| 370 |
+
if (count($this->events) > 0) {
|
| 371 |
+
//$this->events = $this->arraySort($this->events, 'from');
|
| 372 |
+
}
|
| 373 |
+
if ($this->displaytype == 'map') {
|
| 374 |
|
| 375 |
+
} else {
|
| 376 |
+
$pages = 0;
|
| 377 |
+
$page = $this->page;
|
| 378 |
+
$html .= '<ul class="ecwd_list">';
|
| 379 |
+
if ($this->listlimit !== false && $this->listlimit != 0) {
|
| 380 |
+
$offset = ( $page - 1 ) * $this->listlimit;
|
| 381 |
+
$pages = ceil(count($this->events) / $this->listlimit);
|
| 382 |
+
$this->events = array_slice($this->events, $offset, $this->listlimit);
|
| 383 |
+
}
|
| 384 |
+
foreach ($this->events as $event) {
|
| 385 |
+
if (strtotime($event['from']) >= strtotime($this->year . '-' . $this->month . '-1') &&
|
| 386 |
+
strtotime($event['from']) <= strtotime(date('Y-m-t', strtotime($this->date)))) {
|
| 387 |
+
if ($this->displaytype == 'list') { // full event list
|
| 388 |
+
$image_class = '';
|
| 389 |
+
$image = $this->getAndReplaceFirstImage($event['details']);
|
| 390 |
+
if (!has_post_thumbnail($event['id']) && $event['image'] == "") {
|
| 391 |
+
$image_class = "ecwd-no-image";
|
| 392 |
+
}
|
| 393 |
+
$html .= '<li class="' . $image_class . '" itemscope itemtype="http://schema.org/Event">';
|
| 394 |
+
if (!$this->widget) {
|
| 395 |
+
|
| 396 |
+
|
| 397 |
+
$html .= '<div class="ecwd-list-date resp" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', strtotime($event['starttime'])) . '">' . __(date('d', strtotime($event['from'])), 'ecwd') . '</div>';
|
| 398 |
+
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, strtotime($event['from'])) : (date('d', strtotime($event['from'])) . '.' . __(date('F', strtotime($event['from'])), 'ecwd') . '.' . __(date('l', strtotime($event['from'])), 'ecwd')));
|
| 399 |
+
if ($this->list_date_format !== 'd.F.l') {
|
| 400 |
+
$month_name = date('F', strtotime($event['from']));
|
| 401 |
+
$event_date = str_replace($month_name, __($month_name, 'ecwd'), $event_date);
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container"><div class="ecwd-list-date web">' . $event_date . '</div>';
|
| 406 |
+
|
| 407 |
+
$html .= '<div class="ecwd-img">';
|
| 408 |
+
if (get_the_post_thumbnail($event['id']) || $event['image']) {
|
| 409 |
+
if (get_the_post_thumbnail($event['id'])) {
|
| 410 |
+
$html .= get_the_post_thumbnail($event['id']);
|
| 411 |
+
} else {
|
| 412 |
+
$html .= '<img src="' . $event['image'] . '" />';
|
| 413 |
+
}
|
| 414 |
+
} elseif ($image['image'] != null) {
|
| 415 |
+
$html .= '<img src="' . $image['image'] . '" />';
|
| 416 |
+
$event['details'] = $image['content'];
|
| 417 |
+
}
|
| 418 |
+
$html .= '</div></div></div>';
|
| 419 |
+
} else {
|
| 420 |
+
$html .= '<div class="ecwd-list-date" itemprop="startDate" content="' . date('Y-m-d', strtotime($event['from'])) . 'T' . date('H:i', strtotime($event['starttime'])) . '">' . __(date('d', strtotime($event['from'])), 'ecwd') . '</div>';
|
| 421 |
+
}
|
| 422 |
+
$html .= '<div class="event-main-content">';
|
| 423 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 424 |
$html .= '<h3 class="event-title" itemprop="name"><span class="ecwd_open_event_popup event' . $event['id'] . '" style="color:' . $event['color'] . ';">' . $event['title'] . '</span></h3>';
|
| 425 |
} else if ($event['permalink'] != '') {
|
| 426 |
$html .= '<h3 class="event-title" itemprop="name"><a href="' . $event['permalink'] . '" ' . $this->eventlinktarget . ' itemprop="url" style="color:' . $event['color'] . ';">' . $event['title'] . '</a></h3>';
|
| 427 |
+
} else {
|
| 428 |
+
$html .= '<h3 class="event-title" style="color:' . $event['color'] . ';" itemprop="name">' . $event['title'] . '</h3>';
|
| 429 |
+
}
|
| 430 |
+
$html .= '<div class="ecwd-list-date-cont">';
|
| 431 |
+
|
| 432 |
+
if (isset($event['all_day_event']) && $event['all_day_event'] == 1) {
|
| 433 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . __('All day', 'ecwd');
|
| 434 |
+
$eventtime .= '</span>';
|
| 435 |
+
$eventtime .= '</div>';
|
| 436 |
+
} else {
|
| 437 |
+
if ($event['starttime'] != '') { // event details - hidden until clicked (full)
|
| 438 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo"> ' . date($this->timeformat, strtotime($event['starttime']));
|
| 439 |
+
if ($event['endtime'] != '' && strtotime($event['endtime']) != strtotime($event['starttime'])) {
|
| 440 |
+
$eventtime .= "-" . date($this->timeformat, strtotime($event['endtime']));
|
| 441 |
+
}
|
| 442 |
+
$eventtime .= '</span>';
|
| 443 |
+
$eventtime .= '</div>';
|
| 444 |
+
}
|
| 445 |
+
}
|
| 446 |
+
$html .= $eventtime;
|
| 447 |
+
if ($event['from'] != '') { // event details - hidden until clicked (full)
|
| 448 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo"> ' . date($this->dateformat, strtotime($event['from']));
|
| 449 |
+
if ($event['to'] != '' && strtotime($event['to']) !== strtotime($event['from'])) {
|
| 450 |
+
$eventdate .= "-" . date($this->dateformat, strtotime($event['to']));
|
| 451 |
+
}
|
| 452 |
+
$eventdate .= '</span>';
|
| 453 |
+
$eventdate .= '</div>';
|
| 454 |
+
$html .= $eventdate;
|
| 455 |
+
}
|
| 456 |
+
$html .= '</div>';
|
| 457 |
+
if (isset($event['organizers']) && count($event['organizers']) > 0) {
|
| 458 |
+
$html .= '<div class="event-organizers"><div class="ecwd-org-cont">';
|
| 459 |
+
foreach ($event['organizers'] as $organizer) {
|
| 460 |
+
$html .= '<div class="event-organizer" itemprop="organizer"> <a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
| 461 |
+
}
|
| 462 |
+
$html .= '</div></div>';
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
if ($event['location'] !== '') {
|
| 466 |
+
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place"><div class="ecwd-org-cont">
|
|
|
|
| 467 |
<span itemprop="name">';
|
| 468 |
+
if (isset($event['venue']['name'])) {
|
| 469 |
+
$html .= '<a href="' . $event['venue']['permalink'] . '">' . $event['venue']['name'] . '</a>';
|
| 470 |
+
}
|
| 471 |
+
$html .= '</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
| 473 |
' . ( $event['location'] ? $event['location'] : "" ) . '
|
| 474 |
</div>
|
| 475 |
</div>
|
| 476 |
</div>';
|
| 477 |
+
}
|
| 478 |
+
$html .= '<div class="event-content" itemprop="description">' . ( $event['details'] ? $event['details'] : $this->eventemptytext ) . '</div></div>';
|
| 479 |
+
} else { // mini event list
|
| 480 |
+
$html .= '<li style="background:' . $event['color'] . ';"';
|
| 481 |
+
if ($this->minilinkbase !== false) { // enable link (good for linking to full calendar)
|
| 482 |
+
$html .= ' class="event-link"';
|
| 483 |
+
if ($this->linktarget == '_blank') {
|
| 484 |
+
$html .= ' onClick="window.open(\'' . $this->minilinkbase . '\', \'_blank\')"';
|
| 485 |
+
} else {
|
| 486 |
+
$html .= ' onClick="' . $this->linktarget . '.location=\'' . $this->minilinkbase . '\'"';
|
| 487 |
+
}
|
| 488 |
+
} else if ($event['link'] != '') { // enable link (links to event url)
|
| 489 |
+
$html .= ' class="event-link"';
|
| 490 |
+
if ($this->linktarget == '_blank') {
|
| 491 |
+
$html .= 'onClick="window.open(\'' . $event['link'] . '\', \'_blank\')"';
|
| 492 |
+
} else {
|
| 493 |
+
$html .= ' onClick="' . $this->linktarget . '.location=\'' . $event['link'] . '\'"';
|
| 494 |
+
}
|
| 495 |
+
}
|
| 496 |
+
}
|
| 497 |
+
$html .= '</li>';
|
| 498 |
+
}
|
| 499 |
+
}
|
| 500 |
+
if (count($this->events) <= 0) { // if events array is empty
|
| 501 |
+
$html .= '<li >';
|
| 502 |
+
$html .= '<div class="event-content">' . __('No Events', 'ecwd') . '</div>';
|
| 503 |
+
$html .= '</li>';
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
$html .= '</ul>';
|
| 507 |
+
|
| 508 |
+
///PAGINATION////
|
| 509 |
+
if ($pages > 1) {
|
| 510 |
+
$html .= '<div class="ecwd-pagination">';
|
| 511 |
+
if ($this->page > 1) {
|
| 512 |
+
$html .= '<span class="cpage-span"><a href="?date=' . $this->year . '-' . $this->month . '&t=' . $this->displaytype . '&cpage=' . ( $this->page - 1 ) . '" class="cpage" rel="noindex, nofollow">...</a></span>';
|
| 513 |
+
}
|
| 514 |
+
for ($i = ( $this->page - 3 ); $i < ( $this->page + 4 ); $i ++) {
|
| 515 |
+
if ($i <= $pages and $i >= 1) {
|
| 516 |
+
if ($this->page == $i) {
|
| 517 |
+
$html .= '<span class="cpage-span"><span class="page">' . $i . '</span></span>';
|
| 518 |
+
} else {
|
| 519 |
+
$html .= '<span class="cpage-span"><a href="?date=' . $this->year . '-' . $this->month . '&t=' . $this->displaytype . '&cpage=' . $i . '" class="cpage" rel="noindex, nofollow">' . $i . '</a></span>';
|
| 520 |
+
}
|
| 521 |
+
}
|
| 522 |
+
}
|
| 523 |
+
if ($this->page < $pages) {
|
| 524 |
+
$html .= '<span class="cpage-span"><a href="?date=' . $this->year . '-' . $this->month . '&t=' . $this->displaytype . '&cpage=' . ( $this->page + 1 ) . '" class="cpage" rel="noindex, nofollow">...</a></span>';
|
| 525 |
+
}
|
| 526 |
+
$html .= '</div>';
|
| 527 |
+
}
|
| 528 |
+
}
|
| 529 |
+
}
|
| 530 |
+
$html .= $this->calendar_foot();
|
|
|
|
|
|
|
| 531 |
|
| 532 |
// remove tabs, line breaks, vertical tabs, null-byte
|
| 533 |
+
$html = $this->stripWhitespace($html);
|
| 534 |
|
| 535 |
+
return $html;
|
| 536 |
+
}
|
| 537 |
|
| 538 |
// month/year select box
|
| 539 |
|
| 540 |
+
public function calendar_head($content = '') {
|
| 541 |
+
global $cal_ID;
|
| 542 |
+
|
| 543 |
+
$html = '';
|
| 544 |
+
$html .= '<div class="calendar-head ecwd_calendar_prev_next">';
|
| 545 |
+
$html .= $this->cal_previous(); // previous month link
|
| 546 |
+
$previous_year = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '-1', 'year');
|
| 547 |
+
$previous_dateparam = $previous_year['year'] . '-' . $previous_year['month'] . '-' . $previous_year['day'];
|
| 548 |
+
|
| 549 |
+
$next_year = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '+1', 'year');
|
| 550 |
+
$next_dateparam = $next_year['year'] . '-' . $next_year['month'] . '-' . $next_year['day'];
|
| 551 |
+
if ($this->displaytype == 'week') {
|
| 552 |
+
$previous_dateparam = $this->getWeekFirstDayDate($previous_year['year'] . '-' . $previous_year['month'] . '-' . $previous_year['day']);
|
| 553 |
+
$next_dateparam = $this->getWeekFirstDayDate($next_year['year'] . '-' . $next_year['month'] . '-' . $next_year['day']);
|
| 554 |
+
}
|
| 555 |
+
$html .= '<div class="current-month">
|
| 556 |
<a href="?date=' . $previous_dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow"><</a>
|
| 557 |
' . $this->year . '
|
| 558 |
<a href="?date=' . $next_dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow">></a>
|
| 559 |
<div>';
|
| 560 |
+
if ($this->displaytype !== 'week' && $this->displaytype !== '4day' && $this->displaytype !== 'day') {
|
| 561 |
+
|
| 562 |
+
$html .= __($this->monthname, 'ecwd');
|
| 563 |
+
} else {
|
| 564 |
+
if ($this->displaytype !== 'day') {
|
| 565 |
+
if ($this->displaytype == 'week') {
|
| 566 |
+
$currentDays = $this->rangeWeek($this->year . '-' . $this->month . '-' . $this->day);
|
| 567 |
+
} else {
|
| 568 |
+
$currentDays = $this->range4Days($this->year . '-' . $this->month . '-' . $this->day);
|
| 569 |
+
}
|
| 570 |
|
| 571 |
+
$html .= __($this->getMonth($currentDays['start']), 'ecwd') . ' ' . date('d', strtotime($currentDays['start'])) . ' - ' . __($this->getMonth($currentDays['end']), 'ecwd') . ' ' . date('d', strtotime($currentDays['end']));
|
| 572 |
+
} else {
|
| 573 |
+
$html .= __($this->monthname, 'ecwd') . ' ' . $this->day;
|
| 574 |
+
}
|
| 575 |
+
}
|
| 576 |
|
| 577 |
|
| 578 |
+
$html .= ' </div>
|
| 579 |
</div>';
|
| 580 |
|
| 581 |
|
| 582 |
+
$html .= $this->cal_next(); // next month link
|
| 583 |
+
$html .= '</div>';
|
| 584 |
+
$html .= $this->cal_viewmode();
|
| 585 |
|
| 586 |
+
if (!in_array($this->displaytype, array(
|
| 587 |
+
"list",
|
| 588 |
+
"mini-list",
|
| 589 |
+
'day',
|
| 590 |
+
'week'
|
| 591 |
+
))
|
| 592 |
+
) { // mini and full cal
|
| 593 |
+
$html .= '
|
| 594 |
<table class="ecwd_calendar_container ' . $this->displaytype . ' cal_' . $this->color . '" cellpadding="0" cellspacing="0" border="0">
|
| 595 |
|
| 596 |
<tr>';
|
| 597 |
// render week number on left
|
| 598 |
+
if ($this->weeknumbers == 'left') {
|
| 599 |
+
$html .= '<td rowspan="2" class="week-number"> </td>';
|
| 600 |
+
}
|
| 601 |
|
| 602 |
// render week number on right
|
| 603 |
+
if ($this->weeknumbers == 'right') {
|
| 604 |
+
$html .= '<td rowspan="2" class="week-number"> </td>';
|
| 605 |
+
}
|
| 606 |
+
$html .= '
|
| 607 |
</tr>
|
| 608 |
<tr>';
|
| 609 |
+
if ($this->weeknames == 1) {
|
| 610 |
+
$weekdays = $this->weekdays; // full
|
| 611 |
+
} else if ($this->weeknames == 3 || $this->displaytype == 'mini') {
|
| 612 |
+
$weekdays = $this->weekdayschar; // single char
|
| 613 |
+
} else {
|
| 614 |
+
$weekdays = $this->abbrevweekdays; // 3 char
|
| 615 |
+
}
|
| 616 |
+
for ($i = 0; $i < count($weekdays); $i ++) {
|
| 617 |
+
$di = ( $i + $this->weekstartday ) % 7;
|
| 618 |
+
$weekday = $weekdays[$di];
|
| 619 |
+
if ($i == 0) {
|
| 620 |
+
$thisclass = 'normal-day-heading week-start';
|
| 621 |
+
} else {
|
| 622 |
+
$thisclass = 'normal-day-heading';
|
| 623 |
+
}
|
| 624 |
+
$html .= $this->calendar_cell(__($weekday, 'ecwd'), $thisclass); // calendar cells for full & mini
|
| 625 |
+
}
|
| 626 |
+
$html .= '
|
| 627 |
</tr>
|
| 628 |
';
|
| 629 |
+
} else { // event list
|
| 630 |
+
$html .= '<div class="ecwd_calendar_container ' . $this->displaytype . '">';
|
| 631 |
+
|
| 632 |
+
if ($this->displaytype == 'list') {
|
| 633 |
+
if ($this->listtitle != '') {
|
| 634 |
+
$html .= '<h2 class="list-title">' . $this->listtitle . '</h2>';
|
| 635 |
+
}
|
| 636 |
+
} elseif ($this->displaytype == 'day') {
|
| 637 |
+
//$this->day = ;
|
| 638 |
+
} elseif ($this->displaytype == 'week') {
|
| 639 |
+
|
| 640 |
+
}
|
| 641 |
+
//$html .= '</div>';
|
| 642 |
+
}
|
| 643 |
|
| 644 |
+
return $html;
|
| 645 |
+
}
|
|
|
|
|
|
|
| 646 |
|
| 647 |
+
// calendar cells for mini and full displaytypes
|
|
|
|
| 648 |
|
| 649 |
+
public function cal_previous() {
|
| 650 |
+
global $cal_ID;
|
| 651 |
+
$previous = $this->calcDate($this->year . '-' . $this->month, '-1', 'month');
|
| 652 |
+
$dateparam = $previous['year'] . '-' . $previous['month'];
|
| 653 |
+
$prev_date = '';
|
| 654 |
+
if ($this->displaytype == 'day') {
|
| 655 |
+
$previous = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '-1', 'day');
|
| 656 |
+
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 657 |
+
$prev_date = $previous['day'];
|
| 658 |
+
} elseif ($this->displaytype == '4day') {
|
| 659 |
+
$previous = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '-4', 'day');
|
| 660 |
+
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 661 |
+
$prev_date = $previous['day'];
|
| 662 |
+
} elseif ($this->displaytype == 'week') {
|
| 663 |
+
$previous = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '-1', 'week');
|
| 664 |
+
$dateparam = $previous['year'] . '-' . $previous['month'] . '-' . $previous['day'];
|
| 665 |
+
$prev_date = $previous['day'];
|
| 666 |
+
}
|
| 667 |
|
| 668 |
+
$this->previousmonth = ( $this->getMonth($previous['year'] . '-' . $previous['month'], $this->monthnames) );
|
| 669 |
+
if ($this->widget == 1) {
|
| 670 |
+
$previoustext = '<span><</span>';
|
| 671 |
+
} else {
|
| 672 |
+
$previoustext = '<span><</span><span class="month-name"> ' . __($this->previousmonth, 'ecwd') . ' ' . $prev_date . '</span>';
|
| 673 |
+
}
|
| 674 |
|
| 675 |
+
$html = '<div class="previous"><a href="?date=' . $dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow">' . $previoustext . '</a></div>';
|
| 676 |
|
| 677 |
+
return $html;
|
| 678 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 679 |
|
| 680 |
// calendar footer for all displaytypes
|
| 681 |
|
| 682 |
+
public function calcDate($startdate, $increment, $unit) {
|
| 683 |
+
if ($unit == 'month') {
|
| 684 |
+
$startdate = date('Y-m-15', strtotime($startdate));
|
| 685 |
+
}
|
| 686 |
+
$date = date("Y-n-j", strtotime(date("Y-n-j", strtotime($startdate)) . " " . $increment . " " . $unit));
|
| 687 |
+
$date = explode('-', $date);
|
| 688 |
+
$newdate = array(
|
| 689 |
+
'year' => $date[0],
|
| 690 |
+
'month' => $date[1],
|
| 691 |
+
'day' => $date[2]
|
| 692 |
+
);
|
| 693 |
+
|
| 694 |
+
return $newdate;
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
public function getWeekFirstDayDate($date) {
|
| 698 |
+
if (strtotime($date) == strtotime(date('Y-m-d'))) {
|
| 699 |
+
return date('Y-n-j', strtotime(strtolower($this->weekdays[$this->weekstartday]) . " this week", strtotime($date)));
|
| 700 |
+
} else {
|
| 701 |
+
$first_monday_of_month = strtotime('First ' . $this->weekdays[$this->weekstartday] . ' of ' . date('F o', strtotime($date)));
|
| 702 |
+
if (date('Y-n-j', $first_monday_of_month) == '1970-1-1' || date('Y-n-j', $first_monday_of_month) == '1969-12-31') {
|
| 703 |
+
$first_monday_of_month = strtotime(date('Y-m-d', strtotime(date('F o', strtotime($date)) . ' first ' . $this->weekdays[$this->weekstartday])));
|
| 704 |
+
}
|
| 705 |
+
if (date('j', $first_monday_of_month) > 1) {
|
| 706 |
+
$previous_monday = strtotime("-1 week", $first_monday_of_month);
|
| 707 |
+
|
| 708 |
+
return date('Y-n-j', $previous_monday);
|
| 709 |
+
} else {
|
| 710 |
+
return date('Y-n-j', $first_monday_of_month);
|
| 711 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 712 |
}
|
| 713 |
+
}
|
| 714 |
|
| 715 |
+
public function getMonthDate($date) {
|
| 716 |
+
if ($this->displaytype == 'week' && strtotime($date) !== strtotime(date('Y-m-d'))) {
|
| 717 |
+
return date('Y-n-j', strtotime("+1 week", strtotime($date)));
|
| 718 |
+
} elseif ($this->displaytype == '4day' && strtotime($date) !== strtotime(date('Y-m-d'))) {
|
| 719 |
+
return date('Y-n-j', strtotime("+3 day", strtotime($date)));
|
| 720 |
+
}
|
| 721 |
|
| 722 |
+
return $date;
|
| 723 |
+
}
|
| 724 |
+
|
| 725 |
+
public function getDayDate($date) {
|
| 726 |
+
if (strtotime($date) == strtotime(date('Y-m-d'))) {
|
| 727 |
+
return $date;
|
| 728 |
+
} else {
|
| 729 |
+
if ($this->displaytype == 'full' || $this->displaytype == 'month' || $this->displaytype == 'mini' || $this->displaytype == 'list') {
|
| 730 |
+
return date('Y-n-j', strtotime(date('Y-m-1'), strtotime($date)));
|
| 731 |
+
} elseif ($this->displaytype == 'week') {
|
| 732 |
+
return date('Y-n-j', strtotime(strtolower($this->weekdays[$this->weekstartday]) . " this week", strtotime($date)));
|
| 733 |
+
} else {
|
| 734 |
+
return $date;
|
| 735 |
+
}
|
| 736 |
+
}
|
| 737 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 738 |
|
| 739 |
// add an event to the events array
|
| 740 |
|
| 741 |
+
public function getMonth($date, $type = 1) {
|
| 742 |
+
$date = date('Y-n-j', strtotime($date));
|
| 743 |
+
$date_parts = explode('-', $date);
|
| 744 |
+
$jd = cal_to_jd(CAL_GREGORIAN, $date_parts[1], $date_parts[2], $date_parts[0]);
|
| 745 |
|
| 746 |
+
return __(jdmonthname($jd, $type));
|
| 747 |
+
}
|
| 748 |
|
| 749 |
// pulls everything together and returns the calendar for all displaytypes
|
| 750 |
|
| 751 |
+
public function cal_next() {
|
| 752 |
+
global $cal_ID;
|
| 753 |
+
$html = '';
|
| 754 |
+
|
| 755 |
+
$next = $this->calcDate($this->year . '-' . $this->month . '-1', '+ 1', 'month');
|
| 756 |
+
$next_date = '';
|
| 757 |
+
$dateparam = $next['year'] . '-' . $next['month'] . '-' . $next['day'];
|
| 758 |
+
if ($this->displaytype == 'day') {
|
| 759 |
+
$next = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '+1', 'day');
|
| 760 |
+
$dateparam = $next['year'] . '-' . $next['month'] . '-' . $next['day'];
|
| 761 |
+
$next_date = $next['day'];
|
| 762 |
+
} elseif ($this->displaytype == '4day') {
|
| 763 |
+
$next = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '+4', 'day');
|
| 764 |
+
$dateparam = $next['year'] . '-' . $next['month'] . '-' . $next['day'];
|
| 765 |
+
$next_date = $next['day'];
|
| 766 |
+
} elseif ($this->displaytype == 'week') {
|
| 767 |
+
$next = $this->calcDate($this->year . '-' . $this->month . '-' . $this->day, '+1', 'week');
|
| 768 |
+
$dateparam = $next['year'] . '-' . $next['month'] . '-' . $next['day'];
|
| 769 |
+
$next_date = $next['day'];
|
| 770 |
+
}
|
| 771 |
+
$this->nextmonth = ( $this->getMonth($next['year'] . '-' . $next['month'], $this->monthnames) );
|
| 772 |
+
|
| 773 |
+
if ($this->widget == 1) {
|
| 774 |
+
$nexttext = '<span>></span>';
|
| 775 |
+
} else {
|
| 776 |
+
$divider = $this->monthselector === false ? ' | ' : '';
|
| 777 |
+
$nexttext = '<span class="month-name">' . $next_date . ' ' . $divider . __($this->nextmonth, 'ecwd') . ' </span><span>></span>';
|
| 778 |
+
}
|
| 779 |
+
$html = '<div class="next"><a href="?date=' . $dateparam . '&t=' . $this->displaytype . '" rel="noindex, nofollow">' . $nexttext . '</a></div>';
|
| 780 |
+
|
| 781 |
+
return $html;
|
| 782 |
+
}
|
|
|
|
| 783 |
|
| 784 |
//--------------------------------------------------------------------------------------------
|
| 785 |
// Helper Functions
|
| 786 |
//--------------------------------------------------------------------------------------------
|
| 787 |
//
|
| 788 |
|
| 789 |
+
public function cal_viewmode() {
|
| 790 |
+
$monthType = ( $this->widget == 1 ) ? 'mini' : 'full';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 791 |
|
| 792 |
+
if ($this->widget == 1) {
|
| 793 |
+
$html = ' <div class="ecwd_calendar_view_dropdown cal_tabs_' . $this->color . '" ><a class="ecwd-dropdown-toggle" data-toggle="ecwd-dropdown">';
|
| 794 |
+
$html .= $this->displaysName[$this->displaytype]['name'];
|
| 795 |
+
$html .= '</a>';
|
| 796 |
|
| 797 |
+
$widgetDisplays = array('mini', 'list', 'week', 'day');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 798 |
|
| 799 |
+
$html .= '<div class="ecwd-dropdown-menu">';
|
| 800 |
+
foreach ($widgetDisplays as $display) {
|
| 801 |
+
if ($display !== 'none' && isset($this->displaysName[$display])) {
|
| 802 |
+
$html .= '<div class="type">' . '<a href="?date=' . $this->displaysName[$display]['date'] . '&t=' . $display . '" rel="noindex, nofollow">' . $this->displaysName[$display]['name'] . '</a>' . '</div>';
|
| 803 |
+
}
|
| 804 |
+
}
|
| 805 |
+
$html .= '</div></div>';
|
| 806 |
+
} else {
|
| 807 |
+
$html = ' <div class="ecwd_calendar_view_tabs cal_tabs_' . $this->color . '" >';
|
| 808 |
+
$html .= '<div class="filter-container">
|
| 809 |
<div class="filter-arrow-left">«</div>
|
| 810 |
<div class="filter-arrow-right">»</div>';
|
| 811 |
|
| 812 |
|
| 813 |
+
if (count($this->displays) > 1) {
|
| 814 |
+
$html .= '<ul>';
|
| 815 |
+
foreach ($this->displays as $display) {
|
| 816 |
+
if ($display !== 'none' && isset($this->displaysName[$display])) {
|
| 817 |
+
$html .= '<li class="type';
|
| 818 |
+
if ($this->displaytype == $display) {
|
| 819 |
+
$html .= ' ecwd-selected-mode';
|
| 820 |
+
$html .= '">' . '<a>' . $this->displaysName[$display]['name'] . '</a>' . '</li>';
|
| 821 |
+
} else {
|
| 822 |
+
$html .= '">' . '<a href="?date=' . $this->displaysName[$display]['date'] . '&t=' . $display . '" rel="noindex, nofollow">' . $this->displaysName[$display]['name'] . '</a>' . '</li>';
|
| 823 |
+
}
|
| 824 |
+
}
|
| 825 |
+
}
|
| 826 |
+
$html .= '</ul>';
|
| 827 |
+
}
|
| 828 |
+
$html .= '</div>';
|
| 829 |
+
if ($this->event_search == 'yes') {
|
| 830 |
+
$svalue = '';
|
| 831 |
+
if (isset($this->search_params['query']) && $this->search_params['query']) {
|
| 832 |
+
$svalue = $this->search_params['query'];
|
| 833 |
+
}
|
| 834 |
+
$html .= '<div class="ecwd-search">
|
| 835 |
<input class="ecwd-search" name="search" type="text" value="' . $svalue . '">'
|
| 836 |
+
. '<button class="btn btn-default ecwd-search-submit"><span class="glyphicon glyphicon-search"></span><i class="fa fa-search"></i></button>
|
| 837 |
</div>';
|
| 838 |
+
}
|
| 839 |
+
$html .= '</div>';
|
| 840 |
+
}
|
| 841 |
|
| 842 |
+
return $html;
|
| 843 |
+
}
|
| 844 |
|
| 845 |
+
// returns month from passed date (string), $type: 0=number,1=full(January,February,etc),2=abbreviation(Jan,Feb,etc)
|
|
|
|
| 846 |
|
| 847 |
+
public function calendar_cell($day, $class, $date = '', $style = '') {
|
| 848 |
+
global $cal_ID;
|
| 849 |
|
| 850 |
+
$addclass = '';
|
| 851 |
|
| 852 |
+
if (strpos($class, 'normal-day-heading') !== false) {
|
| 853 |
+
$tag = 'th';
|
| 854 |
+
} else {
|
| 855 |
+
$tag = 'td';
|
| 856 |
+
}
|
| 857 |
+
|
| 858 |
+
if ($day != '') {
|
| 859 |
+
$bgColor = '';
|
| 860 |
+
$cellevents = array();
|
| 861 |
+
|
| 862 |
+
if (is_array($this->events)) { // events array populated from addEvent()
|
| 863 |
+
foreach ($this->events as $event) {
|
| 864 |
+
$color = $event['color'];
|
| 865 |
+
$title = $event['title'];
|
| 866 |
+
$link = $event['link'];
|
| 867 |
+
$eventdate = $event['date'];
|
| 868 |
+
$from = strtotime($event['from']);
|
| 869 |
+
$to = strtotime($event['to']);
|
| 870 |
+
$starttime = $event['starttime'];
|
| 871 |
+
$endtime = $event['endtime'];
|
| 872 |
+
$details = $event['details'];
|
| 873 |
+
$location = $event['location'];
|
| 874 |
+
$venue = $event['venue'];
|
| 875 |
+
$organizers = $event['organizers'];
|
| 876 |
+
$terms = $event['terms'];
|
| 877 |
+
$all_day_event = $event['all_day_event'];
|
| 878 |
+
$permalink = $event['permalink'];
|
| 879 |
+
$image = $event['image'];
|
| 880 |
+
|
| 881 |
+
$id = $event['id'];
|
| 882 |
+
|
| 883 |
+
|
| 884 |
+
if ($date == date('Y-n-j', strtotime($eventdate))) {
|
| 885 |
+
$cellevents[] = array(
|
| 886 |
+
'color' => $color,
|
| 887 |
+
'title' => $title,
|
| 888 |
+
'link' => $link,
|
| 889 |
+
'date' => $eventdate,
|
| 890 |
+
'from' => $from,
|
| 891 |
+
'to' => $to,
|
| 892 |
+
'id' => $id,
|
| 893 |
+
'starttime' => $starttime,
|
| 894 |
+
'endtime' => $endtime,
|
| 895 |
+
'details' => $details,
|
| 896 |
+
'location' => $location,
|
| 897 |
+
'all_day_event' => $all_day_event,
|
| 898 |
+
'terms' => $terms,
|
| 899 |
+
'venue' => $venue,
|
| 900 |
+
'organizers' => $organizers,
|
| 901 |
+
'permalink' => $permalink,
|
| 902 |
+
'image' => $image,
|
| 903 |
+
);
|
| 904 |
+
}
|
| 905 |
+
}
|
| 906 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 907 |
|
| 908 |
// sort by starttime for the cell
|
| 909 |
+
if (count($cellevents) > 0) {
|
| 910 |
+
$cellevents = $this->arraySort($cellevents, 'starttime');
|
| 911 |
+
}
|
| 912 |
|
| 913 |
+
if ($date == date('Y-n-j')) {
|
| 914 |
+
$addclass .= ' current-day'; // if processing the current day
|
| 915 |
+
}
|
| 916 |
|
| 917 |
+
if (in_array($this->getDay($date), array(
|
| 918 |
+
'Saturday',
|
| 919 |
+
'Sunday'
|
| 920 |
+
))) {
|
| 921 |
+
$addclass .= ' weekend'; // if a weekend
|
| 922 |
+
}
|
| 923 |
|
| 924 |
+
if ($this->getDay($date, 0) == $this->weekstartday) {
|
| 925 |
+
$addclass .= ' week-start'; // if the weekstartday
|
| 926 |
+
}
|
| 927 |
|
| 928 |
+
if ($this->arraySearch($date, $cellevents) !== false) {
|
| 929 |
+
$addclass .= ' has-events'; // if the date has events
|
| 930 |
+
} else if (strpos($class, 'normal-day-heading') === false) {
|
| 931 |
+
$addclass .= ' no-events'; // no events
|
| 932 |
+
}
|
| 933 |
|
| 934 |
+
$combinedclass = $class . $addclass; // combine all classes
|
| 935 |
|
| 936 |
+
$html = '<' . $tag . ' class="' . $combinedclass . '" data-date="' . $date . '"';
|
| 937 |
|
| 938 |
// check/set links for mini calendar
|
| 939 |
+
if ($this->minilinkbase != '' && $this->displaytype == 'mini') {
|
| 940 |
+
if ($this->linktarget == '_blank') {
|
| 941 |
+
$html .= ' onClick="window.open(\'' . $this->minilinkbase . '?date=' . $date . '\', \'_blank\')"';
|
| 942 |
+
} else {
|
| 943 |
+
$html .= ' onClick="' . $this->linktarget . '.location=\'' . $this->minilinkbase . '?date=' . $date . '\'"';
|
| 944 |
+
}
|
| 945 |
+
}
|
| 946 |
+
}
|
| 947 |
+
if ($style) {
|
| 948 |
+
$html .= ' style="' . $style . '"';
|
| 949 |
+
}
|
| 950 |
+
if ($this->displaytype == 'mini') {
|
| 951 |
+
$content = $day;
|
| 952 |
+
} elseif ($this->widget && $this->displaytype != 'mini') {
|
| 953 |
+
$content = '<div class="ecwd-week-date">' . __(date('d', strtotime($date)), 'ecwd') . '</div>';
|
| 954 |
+
} elseif (( $this->displaytype == 'week' || $this->displaytype == 'day' || $this->displaytype == '4day' ) && !$this->widget) {
|
| 955 |
+
|
| 956 |
+
//here
|
| 957 |
+
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, strtotime($date)) : (date('d', strtotime($date)) . '.' . __(date('F', strtotime($date)), 'ecwd') . '.' . __(date('l', strtotime($date)), 'ecwd')));
|
| 958 |
+
if ($this->list_date_format !== 'd.F.l') {
|
| 959 |
$month_name = date('F', strtotime($date));
|
| 960 |
$event_date = str_replace($month_name, __($month_name, 'ecwd'), $event_date);
|
| 961 |
+
}
|
| 962 |
+
$content = '<div class="ecwd-week-date resp" itemprop="startDate" content="' . date('Y-m-d', strtotime($date)) . '">' . __(date('d', strtotime($date)), 'ecwd') . '</div><div class="ecwd-week-date web"">' . $event_date . '</div>';
|
| 963 |
+
} else {
|
| 964 |
+
$content = '<div class="day-number">' . $day . '</div>'; // day number or prev/next month cell content
|
| 965 |
+
}
|
| 966 |
+
|
| 967 |
+
|
| 968 |
+
if (count($cellevents) > 0) {
|
| 969 |
+
$content .= '<ul class="events">';
|
| 970 |
+
$eventcontent = '';
|
| 971 |
+
foreach ($cellevents as $i => $cellevent) {
|
| 972 |
+
//echo $cellevent['date'].'-------'.$cellevent['title'].'<br />';
|
| 973 |
+
//if (!array_key_exists($cellevent['id'], $this->seted_days)) {
|
| 974 |
+
$li_class = '';
|
| 975 |
+
if ($i > 2 && $this->displaytype !== 'mini') {
|
| 976 |
+
$li_class = 'inmore';
|
| 977 |
+
}
|
| 978 |
+
|
| 979 |
+
$eventcontent .= '<li itemscope itemtype="http://schema.org/Event" style="';
|
| 980 |
+
if (is_array($cellevent['terms'])) {
|
| 981 |
+
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 982 |
+
$eventcontent .= 'background-color: ' . $cellevent['color'] . '; ';
|
| 983 |
+
}
|
| 984 |
+
}
|
| 985 |
+
$eventcontent .= '" class="' . $li_class . ' ' . $i;
|
| 986 |
+
if (isset($cellevent['terms']['ecwd_taxonomy_image']) && $cellevent['terms']['ecwd_taxonomy_image'] == '') {
|
| 987 |
+
$eventcontent .= ' no-cat-image ';
|
| 988 |
+
}
|
| 989 |
+
$eventcontent .= '">';
|
| 990 |
+
if ($this->displaytype != 'mini') {
|
| 991 |
+
if (isset($cellevent['terms']['ecwd_taxonomy_image']) && $this->displaytype != 'mini') {
|
| 992 |
+
if ($cellevent['terms']['ecwd_taxonomy_image'] != '') {
|
| 993 |
+
$eventcontent .= '<img class="ecwd-event-cat-icon" src="' . $cellevent['terms']['ecwd_taxonomy_image'] . '" />';
|
| 994 |
+
}/* elseif (isset($cellevent['color'])){
|
| 995 |
+
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>';
|
| 996 |
+
} */
|
| 997 |
+
}
|
|
|
|
| 998 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 999 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '" itemprop="name">' . $cellevent['title'] . '</span>';
|
| 1000 |
} elseif ($cellevent['permalink']) {
|
| 1001 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '><span itemprop="name">' . $cellevent['title'] . '</span></a>';
|
| 1002 |
+
} else {
|
| 1003 |
+
$eventcontent .= '<span itemprop="name">' . $cellevent['title'] . '</span>';
|
| 1004 |
+
}
|
| 1005 |
+
}
|
| 1006 |
+
$this->seted_days[$cellevent['id']] = $date;
|
|
|
|
| 1007 |
|
| 1008 |
+
$eventcontent .= '<div class="event-details-container"><div class="ecwd-event-arrow"></div><div class="event-details">';
|
| 1009 |
|
| 1010 |
+
if ($cellevent['title'] != '') {
|
| 1011 |
+
$eventcontent .= '<div class="event-details-title">';
|
| 1012 |
|
| 1013 |
+
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1014 |
+
$eventcontent .= ' <span class="event-metalabel" style="background:' . $cellevent['color'] . '"></span>
|
| 1015 |
<h5 style="color:' . $cellevent['color'] . '" itemprop="name">';
|
| 1016 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1017 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '" style="color: ' . $cellevent['color'] . '">' . $cellevent['title'] . '</span>';
|
| 1018 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
| 1019 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . ' style="color: ' . $cellevent['color'] . '">' . $cellevent['title'] . '</a>';
|
| 1020 |
+
} else {
|
| 1021 |
+
$eventcontent .= $cellevent['title'];
|
| 1022 |
+
}
|
| 1023 |
+
$eventcontent .= '</h5>
|
| 1024 |
';
|
| 1025 |
+
} else {
|
| 1026 |
+
$eventcontent .= ' <span class="event-metalabel"></span>
|
| 1027 |
<h5 itemprop="name">';
|
| 1028 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1029 |
$eventcontent .= '<span class="ecwd_open_event_popup event' . $cellevent['id'] . '">' . $cellevent['title'] . '</span>';
|
| 1030 |
} else if (isset($cellevent['permalink']) && $cellevent['permalink'] !== '') {
|
| 1031 |
$eventcontent .= '<a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget . '>' . $cellevent['title'] . '</a>';
|
| 1032 |
+
} else {
|
| 1033 |
+
$eventcontent .= $cellevent['title'];
|
| 1034 |
+
}
|
| 1035 |
+
$eventcontent .= '</h5>';
|
| 1036 |
+
}
|
| 1037 |
+
$eventcontent .= ' </div>';
|
| 1038 |
+
}
|
| 1039 |
+
if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
|
| 1040 |
+
|
| 1041 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd');
|
| 1042 |
+
$eventtime .= '</span>';
|
| 1043 |
+
$eventtime .= '</div>';
|
| 1044 |
+
$eventcontent .= $eventtime;
|
| 1045 |
+
} else {
|
| 1046 |
+
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
| 1047 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . date($this->timeformat, strtotime($cellevent['starttime']));
|
| 1048 |
+
if ($cellevent['endtime'] != '' && strtotime($cellevent['endtime']) !== strtotime($cellevent['starttime'])) {
|
| 1049 |
+
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
| 1050 |
+
}
|
| 1051 |
+
$eventtime .= '</span>';
|
| 1052 |
+
$eventtime .= '</div>';
|
| 1053 |
+
$eventcontent .= $eventtime;
|
| 1054 |
+
}
|
| 1055 |
+
}
|
| 1056 |
+
if ($cellevent['from'] != '') { // event details - hidden until clicked (full)
|
| 1057 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo"> ' . date($this->dateformat, $cellevent['from']);
|
| 1058 |
+
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
| 1059 |
+
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
| 1060 |
+
}
|
| 1061 |
+
$eventdate .= '</span>';
|
| 1062 |
+
$eventdate .= '</div>';
|
| 1063 |
+
$eventcontent .= $eventdate;
|
| 1064 |
+
}
|
| 1065 |
+
|
| 1066 |
+
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
| 1067 |
+
$eventcontent .= '<div class="event-organizers">';
|
| 1068 |
+
foreach ($cellevent['organizers'] as $organizer) {
|
| 1069 |
+
$eventcontent .= '<div class="event-organizer" itemprop="organizer"> <a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
| 1070 |
+
}
|
| 1071 |
+
$eventcontent .= '</div>';
|
| 1072 |
+
}
|
| 1073 |
+
if ($cellevent['location'] !== '') {
|
| 1074 |
+
$eventcontent .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">';
|
| 1075 |
+
if (isset($cellevent['venue']['name'])) {
|
| 1076 |
+
$eventcontent .= '<div class="ecwd-venue" ><span itemprop="name"><a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a></span></div>';
|
| 1077 |
+
}
|
| 1078 |
+
if (isset($cellevent['location']) && $cellevent['location'] != '') {
|
| 1079 |
+
$eventcontent .= '<span class="ecwd_hidden" itemprop="name">' . $cellevent['location'] . '</span>';
|
| 1080 |
+
$eventcontent .= '<div class="ecwd-location" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span>' . $cellevent['location'] . '</span></div>';
|
| 1081 |
+
}
|
| 1082 |
+
$eventcontent .= '</div>';
|
| 1083 |
+
}
|
| 1084 |
+
|
| 1085 |
+
if (isset($cellevent['link']) && $cellevent['link'] != '') {
|
| 1086 |
+
$eventcontent .= '<div class="ecwd-link"> <a href="' . $cellevent['link'] . '" itemprop="url">' . $cellevent['link'] . '</a></div>';
|
| 1087 |
+
}
|
| 1088 |
+
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
| 1089 |
+
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
| 1090 |
+
if ($cellevent['details'] != '' || has_post_thumbnail($cellevent['id']) || $cellevent['image']) {
|
| 1091 |
+
$eventcontent .= '<div class="ecwd-detalis" itemprop="description">';
|
| 1092 |
+
if (get_the_post_thumbnail($cellevent['id']) || $cellevent['image']) {
|
| 1093 |
+
if (get_the_post_thumbnail($cellevent['id'])) {
|
| 1094 |
+
$eventcontent .= get_the_post_thumbnail($cellevent['id'], 'thumbnail');
|
| 1095 |
+
} else {
|
| 1096 |
+
$eventcontent .= '<img src="' . $cellevent['image'] . '" />';
|
| 1097 |
+
}
|
| 1098 |
+
} elseif ($image['image'] != null) {
|
| 1099 |
+
$eventcontent .= '<img src="' . $image['image'] . '" />';
|
| 1100 |
+
$cellevent['details'] = $image['content'];
|
| 1101 |
+
}
|
| 1102 |
+
$eventcontent .= $cellevent['details'] . '</div>';
|
| 1103 |
+
}
|
| 1104 |
+
|
| 1105 |
+
|
| 1106 |
+
$eventcontent .= '</div><div class="ecwd-event-arrow-right"></div>';
|
| 1107 |
+
|
| 1108 |
+
|
| 1109 |
+
$eventcontent .= '</li> ';
|
|
|
|
| 1110 |
|
| 1111 |
|
| 1112 |
// } else {
|
| 1113 |
// //$eventcontent .= $cellevent['title'];
|
| 1114 |
// }
|
| 1115 |
+
}
|
| 1116 |
|
| 1117 |
+
$content .= $eventcontent;
|
|
|
|
|
|
|
| 1118 |
|
| 1119 |
+
if ($i > 2 && $this->displaytype !== 'mini') {
|
| 1120 |
+
$content .= '<li class="ecwd-calendar-more-event">
|
| 1121 |
<span class="ecwd-calendar-event-add">
|
| 1122 |
<span class="more_events_link">' . __('More events', 'ecwd') . '</span>
|
| 1123 |
</span>
|
| 1126 |
<input type="hidden" class="ecwd-more-event-title" value="' . date($this->dateformat, strtotime($date)) . '" />
|
| 1127 |
</div>
|
| 1128 |
</li>';
|
| 1129 |
+
}
|
|
|
|
|
|
|
|
|
|
| 1130 |
|
| 1131 |
+
$content .= '</ul>';
|
| 1132 |
+
|
| 1133 |
+
|
| 1134 |
+
if ($this->displaytype == 'week' || $this->displaytype == 'day' || $this->displaytype == '4day') {
|
| 1135 |
+
|
| 1136 |
+
if (count($cellevents) > 0) {
|
| 1137 |
+
|
| 1138 |
+
$html = '';
|
| 1139 |
+
|
| 1140 |
+
if (!$this->widget) {
|
| 1141 |
+
$event_date = (($this->list_date_format !== 'd.F.l') ? date($this->list_date_format, strtotime($date)) : (date('d', strtotime($date)) . '.' . __(date('F', strtotime($date)), 'ecwd') . '.' . __(date('l', strtotime($date)), 'ecwd')));
|
| 1142 |
+
if ($this->list_date_format !== 'd.F.l') {
|
| 1143 |
+
$month_name = date('F', strtotime($date));
|
| 1144 |
+
$event_date = str_replace($month_name, __($month_name, 'ecwd'), $event_date);
|
| 1145 |
+
}
|
| 1146 |
+
|
| 1147 |
+
|
| 1148 |
+
|
| 1149 |
+
$html = '<div class="ecwd-week-date resp" style="background:#' . $this->eventlistbg . '" itemprop="startDate" content="' . date('Y-m-d', strtotime($date)) . 'T' . date('H:i', strtotime($date)) . '">' . date('d', strtotime($date)) . '</div><div class="ecwd-week-date web"">' . $event_date . '</div>';
|
| 1150 |
+
} else {
|
| 1151 |
+
$html = '<div class="ecwd-week-date">' . date('d', strtotime($date)) . '</div>';
|
| 1152 |
+
}
|
| 1153 |
+
$html .= '<div class="event-main-content">';
|
| 1154 |
+
foreach ($cellevents as $cellevent) {
|
| 1155 |
+
|
| 1156 |
+
$image_class = '';
|
| 1157 |
+
$cellevent['details'] = $cellevent['details'] == '' ? $this->eventemptytext : $cellevent['details'];
|
| 1158 |
+
$image = $this->getAndReplaceFirstImage($cellevent['details']);
|
| 1159 |
+
if (!has_post_thumbnail($cellevent['id']) && $cellevent['image'] == "") {
|
| 1160 |
+
$image_class = "ecwd-no-image";
|
| 1161 |
+
}
|
| 1162 |
+
$html .= '<div class="event-container ' . $image_class . '" itemprop="event">';
|
| 1163 |
+
if (!$this->widget) {
|
| 1164 |
+
$html .= '<div class="ecwd-list-img"><div class="ecwd-list-img-container">';
|
| 1165 |
+
$html .= '<div class="ecwd-img">';
|
| 1166 |
+
if (get_the_post_thumbnail($cellevent['id']) || $cellevent['image']) {
|
| 1167 |
+
|
| 1168 |
+
if (get_the_post_thumbnail($cellevent['id'])) {
|
| 1169 |
+
$html .= get_the_post_thumbnail($cellevent['id']);
|
| 1170 |
+
} else {
|
| 1171 |
+
$html .= '<img src="' . $cellevent['image'] . '" />';
|
| 1172 |
+
}
|
| 1173 |
+
} elseif ($image['image'] != null) {
|
| 1174 |
+
$html .= '<img src="' . $image['image'] . '" />';
|
| 1175 |
+
$cellevent['details'] = $image['content'];
|
| 1176 |
+
}
|
| 1177 |
+
$html .= '</div></div></div>';
|
| 1178 |
+
}
|
| 1179 |
if ($this->event_popup == "yes" && get_post_meta($event['id'], '', true)) {
|
| 1180 |
$html .= '<h3 class="event-title" itemprop="name"><span class="ecwd_open_event_popup event' . $cellevent['id'] . '"';
|
| 1181 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1182 |
+
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
| 1183 |
+
}
|
| 1184 |
+
$html .= '>' . $cellevent['title'] . '</span></h3>';
|
| 1185 |
} else if ($cellevent['permalink'] != '') {
|
| 1186 |
$html .= '<h3 class="event-title" itemprop="name"> <a href="' . $cellevent['permalink'] . '" ' . $this->eventlinktarget;
|
| 1187 |
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1188 |
+
$html .= ' style="color:' . $cellevent['color'] . ';"';
|
| 1189 |
+
}
|
| 1190 |
+
$html .= '>' . $cellevent['title'] . '</a></h3>';
|
| 1191 |
+
} else {
|
| 1192 |
+
$html .= '<h3 class="event-title" itemprop="name"';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1193 |
|
| 1194 |
+
if (isset($cellevent['color']) && $cellevent['color'] !== '') {
|
| 1195 |
+
$html .= 'style="color:' . $cellevent['color'] . ';"';
|
| 1196 |
+
}
|
| 1197 |
+
$html .= '>' . $cellevent['title'] . '</h3>';
|
| 1198 |
+
}
|
| 1199 |
+
$html .= '<div class="ecwd-list-date-cont">';
|
| 1200 |
+
if (isset($cellevent['all_day_event']) && $cellevent['all_day_event'] == 1) {
|
| 1201 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . __('All day', 'ecwd');
|
| 1202 |
+
$eventtime .= '</span>';
|
| 1203 |
+
$eventtime .= '</div>';
|
| 1204 |
+
$html .= $eventtime;
|
| 1205 |
+
} else {
|
| 1206 |
+
|
| 1207 |
+
if ($cellevent['starttime'] != '') { // event details - hidden until clicked (full)
|
| 1208 |
+
$eventtime = '<div class="ecwd-time"><span class="metainfo event-time" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . date($this->timeformat, strtotime($cellevent['starttime']));
|
| 1209 |
+
if ($cellevent['endtime'] != '' && $cellevent['endtime'] != $cellevent['starttime']) {
|
| 1210 |
+
$eventtime .= "-" . date($this->timeformat, strtotime($cellevent['endtime']));
|
| 1211 |
+
}
|
| 1212 |
+
$eventtime .= '</span>';
|
| 1213 |
+
$eventtime .= '</div>';
|
| 1214 |
+
$html .= $eventtime;
|
| 1215 |
+
}
|
| 1216 |
+
}
|
| 1217 |
+
if ($cellevent['from'] != '') {
|
| 1218 |
+
$eventdate = '<div class="ecwd-date"><span class="metainfo" itemprop="startDate" content="' . date('Y-m-d', $cellevent['from']) . 'T' . date('H:i', strtotime($cellevent['starttime'])) . '"> ' . date($this->dateformat, $cellevent['from']);
|
| 1219 |
+
if ($cellevent['to'] != '' && $cellevent['to'] != $cellevent['from']) {
|
| 1220 |
+
$eventdate .= "-" . date($this->dateformat, $cellevent['to']);
|
| 1221 |
+
}
|
| 1222 |
+
$eventdate .= '</span>';
|
| 1223 |
+
$eventdate .= '</div>';
|
| 1224 |
+
$html .= $eventdate;
|
| 1225 |
+
}
|
| 1226 |
+
$html .= '</div>';
|
| 1227 |
+
if (isset($cellevent['organizers']) && count($cellevent['organizers']) > 0) {
|
| 1228 |
+
$html .= '<div class="event-organizers">';
|
| 1229 |
+
foreach ($cellevent['organizers'] as $organizer) {
|
| 1230 |
+
$html .= '<div class="event-organizer" itemprop="organizer"> <a href="' . $organizer['permalink'] . '">' . $organizer['name'] . '</a></div>';
|
| 1231 |
+
}
|
| 1232 |
+
$html .= '</div>';
|
| 1233 |
+
}
|
| 1234 |
+
if ($cellevent['location'] != '') {
|
| 1235 |
+
$html .= '<div class="event-venue" itemprop="location" itemscope itemtype="http://schema.org/Place">
|
| 1236 |
+
<span itemprop="name">';
|
| 1237 |
+
if (isset($cellevent['venue']['name'])) {
|
| 1238 |
+
$html .= '<a href="' . $cellevent['venue']['permalink'] . '">' . $cellevent['venue']['name'] . '</a>';
|
| 1239 |
+
}
|
| 1240 |
+
$html .= '</span>
|
| 1241 |
<div class="address" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
| 1242 |
<span itemprop="streetAddress">' . $cellevent['location'] . '</span>
|
| 1243 |
</div>
|
| 1244 |
</div>';
|
| 1245 |
+
}
|
| 1246 |
+
$html .= '<div class="event-content" itemprop="description">' . ( $cellevent['details'] ? $cellevent['details'] : $this->eventemptytext ) . '</div></div>';
|
| 1247 |
+
}
|
| 1248 |
+
$html .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1249 |
|
| 1250 |
+
return $html;
|
| 1251 |
+
}
|
| 1252 |
+
}
|
| 1253 |
+
} else {
|
| 1254 |
+
if ($this->displaytype == 'week' || $this->displaytype == 'day' || $this->displaytype == '4day') {
|
| 1255 |
+
$content .= '<div class="event-main-content no-events">' . __('No events', 'ecwd') . '</div>';
|
| 1256 |
+
}
|
| 1257 |
+
}
|
| 1258 |
|
| 1259 |
+
$html .= '>' . $content . '</td>';
|
|
|
|
| 1260 |
|
| 1261 |
+
return $html;
|
| 1262 |
+
}
|
| 1263 |
|
| 1264 |
+
public function arraySort($a, $subkey) {
|
| 1265 |
+
foreach ($a as $k => $v) {
|
| 1266 |
+
$b[$k] = strtolower($v[$subkey]);
|
| 1267 |
+
}
|
| 1268 |
+
asort($b);
|
| 1269 |
+
foreach ($b as $key => $val) {
|
| 1270 |
+
$c[] = $a[$key];
|
| 1271 |
+
}
|
| 1272 |
|
| 1273 |
+
return $c;
|
| 1274 |
+
}
|
| 1275 |
|
| 1276 |
// add/subtract day,week,month,days from startdate
|
| 1277 |
|
| 1278 |
+
public function getDay($date, $type = 1) {
|
| 1279 |
+
$date = date('Y-n-j', strtotime($date));
|
| 1280 |
+
$date_parts = explode('-', $date);
|
| 1281 |
+
$jd = cal_to_jd(CAL_GREGORIAN, $date_parts[1], $date_parts[2], $date_parts[0]);
|
| 1282 |
|
| 1283 |
+
return jddayofweek($jd, $type);
|
| 1284 |
+
}
|
| 1285 |
|
| 1286 |
// recursive array search returns the key of occurance (int) or false if not found
|
| 1287 |
|
| 1288 |
+
public function arraySearch($needle, $haystack, $index = null) {
|
| 1289 |
+
$aIt = new RecursiveArrayIterator($haystack);
|
| 1290 |
+
$it = new RecursiveIteratorIterator($aIt);
|
| 1291 |
+
while ($it->valid()) {
|
| 1292 |
+
if (( ( isset($index) AND ( $it->key() == $index ) ) OR ( !isset($index) ) ) AND ( $it->current() == $needle )) {
|
| 1293 |
+
return $aIt->key();
|
| 1294 |
+
}
|
| 1295 |
+
$it->next();
|
| 1296 |
+
}
|
| 1297 |
+
|
| 1298 |
+
return false;
|
| 1299 |
+
}
|
| 1300 |
+
|
| 1301 |
+
public function getKey($array, $member, $value) {
|
| 1302 |
+
foreach ($array as $k => $v) {
|
| 1303 |
+
if ($v->$member == $value) {
|
| 1304 |
+
return $k;
|
| 1305 |
+
}
|
| 1306 |
+
}
|
| 1307 |
+
|
| 1308 |
+
return false;
|
| 1309 |
+
}
|
| 1310 |
+
|
| 1311 |
+
//return current week start and end dates
|
| 1312 |
+
|
| 1313 |
+
public function rangeWeek($datestr) {
|
| 1314 |
+
date_default_timezone_set(date_default_timezone_get());
|
| 1315 |
+
$res['start'] = date("Y-m-d", strtotime($datestr));
|
| 1316 |
+
$res['end'] = date("Y-m-d", strtotime("+6 day", strtotime($datestr)));
|
| 1317 |
+
|
| 1318 |
+
return $res;
|
| 1319 |
+
}
|
| 1320 |
+
|
| 1321 |
+
public function range4Days($date) {
|
| 1322 |
+
date_default_timezone_set(date_default_timezone_get());
|
| 1323 |
+
$res['start'] = date("Y-m-d", strtotime($date));
|
| 1324 |
+
$res['end'] = date("Y-m-d", strtotime("+3 day", strtotime($date)));
|
| 1325 |
+
|
| 1326 |
+
return $res;
|
| 1327 |
+
}
|
| 1328 |
+
|
| 1329 |
+
public function calendar_foot() {
|
| 1330 |
+
if (in_array($this->displaytype, array(
|
| 1331 |
+
'full',
|
| 1332 |
+
'mini'
|
| 1333 |
+
))) {
|
| 1334 |
+
$html = '</table>';
|
| 1335 |
+
} else {
|
| 1336 |
+
$html = '</div>';
|
| 1337 |
+
}
|
| 1338 |
+
|
| 1339 |
+
return $html;
|
| 1340 |
+
}
|
| 1341 |
|
| 1342 |
// Removes tabs, line breaks, vertical tabs, null-byte. Everything but a regular space.
|
| 1343 |
|
| 1344 |
+
public function stripWhitespace($c) {
|
| 1345 |
+
$c = str_replace(array(
|
| 1346 |
+
"\n",
|
| 1347 |
+
"\r",
|
| 1348 |
+
"\t",
|
| 1349 |
+
"\o",
|
| 1350 |
+
"\xOB"
|
| 1351 |
+
), '', $c);
|
| 1352 |
|
| 1353 |
+
return trim($c);
|
| 1354 |
+
}
|
| 1355 |
|
| 1356 |
// sorts an associative array by values of passed key
|
| 1357 |
|
| 1358 |
+
public function hex2RGB($hexStr, $returnAsString = false, $seperator = ',') {
|
| 1359 |
+
$hexStr = preg_replace("/[^0-9A-Fa-f]/", '', $hexStr); // check hex string
|
| 1360 |
+
$rgbArray = array();
|
| 1361 |
+
if (strlen($hexStr) == 6) { // if a proper hex code e.g. #RRGGBB
|
| 1362 |
+
$colorVal = hexdec($hexStr);
|
| 1363 |
+
$rgbArray['red'] = 0xFF & ( $colorVal >> 0x10 );
|
| 1364 |
+
$rgbArray['green'] = 0xFF & ( $colorVal >> 0x8 );
|
| 1365 |
+
$rgbArray['blue'] = 0xFF & $colorVal;
|
| 1366 |
+
} elseif (strlen($hexStr) == 3) { // if shorthand notation e.g #RGB
|
| 1367 |
+
$rgbArray['red'] = hexdec(str_repeat(substr($hexStr, 0, 1), 2));
|
| 1368 |
+
$rgbArray['green'] = hexdec(str_repeat(substr($hexStr, 1, 1), 2));
|
| 1369 |
+
$rgbArray['blue'] = hexdec(str_repeat(substr($hexStr, 2, 1), 2));
|
| 1370 |
+
} else {
|
| 1371 |
+
return false; // invalid hex color code
|
| 1372 |
+
}
|
| 1373 |
|
| 1374 |
// returns the rgb string or the associative array
|
| 1375 |
+
return $returnAsString ? implode($seperator, $rgbArray) : $rgbArray;
|
| 1376 |
+
}
|
| 1377 |
+
|
| 1378 |
+
public function getAndReplaceFirstImage($content) {
|
| 1379 |
+
$first_img = '';
|
| 1380 |
+
ob_start();
|
| 1381 |
+
ob_end_clean();
|
| 1382 |
+
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
| 1383 |
+
if (isset($matches [1] [0])) {
|
| 1384 |
+
$first_img = $matches [1] [0];
|
| 1385 |
+
}
|
| 1386 |
+
|
| 1387 |
+
if (empty($first_img)) { //Defines a default image
|
| 1388 |
+
return false;
|
| 1389 |
+
} else {
|
| 1390 |
+
//preg_replace('/<img[^>]+\>/i', '', $content);
|
| 1391 |
+
$content = $this->replaceFirstImage($content);
|
| 1392 |
+
}
|
| 1393 |
+
|
| 1394 |
+
return array(
|
| 1395 |
+
'image' => $first_img,
|
| 1396 |
+
'content' => $content
|
| 1397 |
+
);
|
| 1398 |
+
}
|
| 1399 |
+
|
| 1400 |
+
public function replaceFirstImage($content) {
|
| 1401 |
+
$content = preg_replace("/<img[^>]+\>/i", " ", $content, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1402 |
|
| 1403 |
+
return $content;
|
| 1404 |
+
}
|
| 1405 |
+
|
| 1406 |
+
}
|
| 1407 |
|
| 1408 |
// end class
|
includes/ecwd-cpt-class.php
CHANGED
|
@@ -1,1383 +1,1363 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
class ECWD_Cpt {
|
| 4 |
-
const IMAGE_PLACEHOLDER = '';
|
| 5 |
-
const CALENDAR_POST_TYPE = 'ecwd_calendar';
|
| 6 |
-
const EVENT_POST_TYPE = 'ecwd_event';
|
| 7 |
-
const ORGANIZER_POST_TYPE = 'ecwd_organizer';
|
| 8 |
-
const VENUE_POST_TYPE = 'ecwd_venue';
|
| 9 |
-
const THEME_POST_TYPE = 'ecwd_theme';
|
| 10 |
-
protected static $instance = null;
|
| 11 |
-
public $rewriteSlugSingular;
|
| 12 |
-
public $rewriteSlug;
|
| 13 |
-
|
| 14 |
-
private function __construct() {
|
| 15 |
-
$this->tax = ECWD_PLUGIN_PREFIX . '_event_category';
|
| 16 |
-
$this->tag = ECWD_PLUGIN_PREFIX . '_event_tag';
|
| 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( 'pre_get_posts', array( $this, 'category_archive_page_query') );
|
| 24 |
-
add_action( 'add_meta_boxes', array( $this, 'calendars_cpt_meta' ) );
|
| 25 |
-
add_action( 'add_meta_boxes', array( $this, 'events_cpt_meta' ) );
|
| 26 |
-
add_action( 'add_meta_boxes', array( $this, 'themes_cpt_meta' ) );
|
| 27 |
-
add_action( 'add_meta_boxes', array( $this, 'venues_cpt_meta' ) );
|
| 28 |
-
add_action( 'post_updated', array( $this, 'save_meta' ), 10, 3 );
|
| 29 |
-
add_action( 'manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_custom_column', array(
|
| 30 |
-
$this,
|
| 31 |
-
'calendar_column_content'
|
| 32 |
-
), 10, 2 );
|
| 33 |
-
add_action( 'manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_custom_column', array(
|
| 34 |
-
$this,
|
| 35 |
-
'event_column_content'
|
| 36 |
-
), 10, 2 );
|
| 37 |
-
|
| 38 |
-
//duplicate posts actions
|
| 39 |
-
add_filter( 'post_row_actions', array( $this, 'duplicate_event_link' ), 10, 2 );
|
| 40 |
-
add_action( 'admin_action_duplicate_ecwd_post', array( $this, 'duplicate_post' ) );
|
| 41 |
-
|
| 42 |
-
//events catgeories
|
| 43 |
-
add_action( 'init', array( $this, 'create_taxonomies' ), 2 );
|
| 44 |
-
add_action( ECWD_PLUGIN_PREFIX . '_event_category_add_form_fields', array(
|
| 45 |
-
$this,
|
| 46 |
-
'add_categories_metas'
|
| 47 |
-
), 10, 3 );
|
| 48 |
-
add_action( ECWD_PLUGIN_PREFIX . '_event_category_edit_form_fields', array(
|
| 49 |
-
$this,
|
| 50 |
-
'add_categories_metas'
|
| 51 |
-
), 10, 3 );
|
| 52 |
-
add_action( 'edited_' . ECWD_PLUGIN_PREFIX . '_event_category', array(
|
| 53 |
-
$this,
|
| 54 |
-
'save_categories_metas'
|
| 55 |
-
), 10, 2 );
|
| 56 |
-
add_action( 'create_' . ECWD_PLUGIN_PREFIX . '_event_category', array(
|
| 57 |
-
$this,
|
| 58 |
-
'save_categories_metas'
|
| 59 |
-
), 10, 2 );
|
| 60 |
-
add_filter( 'manage_edit-' . ECWD_PLUGIN_PREFIX . '_event_category_columns', array(
|
| 61 |
-
$this,
|
| 62 |
-
'taxonomy_columns'
|
| 63 |
-
) );
|
| 64 |
-
add_filter( 'manage_' . ECWD_PLUGIN_PREFIX . '_event_category_custom_column', array(
|
| 65 |
-
$this,
|
| 66 |
-
'taxonomy_column'
|
| 67 |
-
), 10, 3 );
|
| 68 |
-
add_filter( 'query_vars', array( $this, 'ecwdEventQueryVars' ) );
|
| 69 |
-
add_filter( 'generate_rewrite_rules', array( $this, 'filterRewriteRules' ), 2 );
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
add_action( 'wp_ajax_manage_calendar_events', array( $this, 'save_events' ) );
|
| 73 |
-
add_action( 'wp_ajax_add_calendar_event', array( $this, 'add_event' ) );
|
| 74 |
-
|
| 75 |
-
//filters
|
| 76 |
-
add_filter( 'post_updated_messages', array( $this, 'calendar_messages' ) );
|
| 77 |
-
add_filter( 'post_updated_messages', array( $this, 'theme_messages' ) );
|
| 78 |
-
add_filter( 'post_updated_messages', array( $this, 'event_messages' ) );
|
| 79 |
-
add_filter( 'manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_columns', array(
|
| 80 |
-
$this,
|
| 81 |
-
'calendar_add_column_headers'
|
| 82 |
-
) );
|
| 83 |
-
add_filter( 'manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_columns', array( $this, 'add_column_headers' ) );
|
| 84 |
-
|
| 85 |
-
add_filter( 'template_include', array( $this, 'ecwd_templates' ),28 );
|
| 86 |
-
add_filter( 'request', array( &$this, 'ecwd_archive_order' ) );
|
| 87 |
-
|
| 88 |
-
//category filter
|
| 89 |
-
add_filter( 'init', array( $this, 'event_restrict_manage' ) );
|
| 90 |
-
add_action('the_title', array($this, 'is_events_list_page_title'),11,2);
|
| 91 |
-
add_action('after_setup_theme',array($this,'add_thumbnails_for_themes'));
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
}
|
| 94 |
-
|
| 95 |
-
public function add_thumbnails_for_themes(){
|
| 96 |
-
global $
|
| 97 |
-
if(
|
| 98 |
-
add_theme_support(
|
| 99 |
}
|
| 100 |
}
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
}
|
| 114 |
-
};
|
| 115 |
}
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
$this->rewriteSlug = ( isset( $ecwd_options['events_slug'] ) && $ecwd_options['events_slug'] !== '' ) ? $ecwd_options['events_slug'] : $defaultSlug . 's';
|
| 234 |
-
$this->rewriteSlugSingular = ( isset( $ecwd_options['event_slug'] ) && $ecwd_options['event_slug'] !== '' ) ? $ecwd_options['event_slug'] : $defaultSlug;
|
| 235 |
-
$rewrite = array(
|
| 236 |
-
'slug' => _x( $this->rewriteSlugSingular, 'URL slug', 'ecwd' ),
|
| 237 |
-
"with_front" => true
|
| 238 |
-
);
|
| 239 |
-
$venue_rewrite = array( 'slug' => _x( 'venue', 'URL slug', 'ecwd' ), "with_front" => true );
|
| 240 |
-
$organizer_rewrite = array( 'slug' => _x( 'organizer', 'URL slug', 'ecwd' ), "with_front" => true );
|
| 241 |
-
}
|
| 242 |
-
//calendars
|
| 243 |
-
$calendar_labels = array(
|
| 244 |
-
'name' => __( 'Calendars', 'ecwd' ),
|
| 245 |
-
'singular_name' => __( 'Calendar', 'ecwd' ),
|
| 246 |
-
'menu_name' => __( 'Calendars', 'ecwd' ),
|
| 247 |
-
'name_admin_bar' => __( 'Calendar', 'ecwd' ),
|
| 248 |
-
'add_new' => __( 'Add New Calendar', 'ecwd' ),
|
| 249 |
-
'add_new_item' => __( 'Add New Calendar', 'ecwd' ),
|
| 250 |
-
'new_item' => __( 'New Calendar', 'ecwd' ),
|
| 251 |
-
'edit_item' => __( 'Edit Calendar', 'ecwd' ),
|
| 252 |
-
'view_item' => __( 'View Calendar', 'ecwd' ),
|
| 253 |
-
'all_items' => __( 'All Calendars', 'ecwd' ),
|
| 254 |
-
'search_items' => __( 'Search Calendar', 'ecwd' ),
|
| 255 |
-
'not_found' => __( 'No Calendars found.', 'ecwd' ),
|
| 256 |
-
'not_found_in_trash' => __( 'No Calendars found in Trash.', 'ecwd' )
|
| 257 |
-
);
|
| 258 |
-
|
| 259 |
-
$calendar_args = array(
|
| 260 |
-
'labels' => $calendar_labels,
|
| 261 |
-
'public' => false,
|
| 262 |
-
'publicly_queryable' => true,
|
| 263 |
-
'show_ui' => true,
|
| 264 |
-
'show_in_menu' => true,
|
| 265 |
-
'menu_position' => '26,11',
|
| 266 |
-
'query_var' => true,
|
| 267 |
-
'capability_type' => 'post',
|
| 268 |
-
'has_archive' => false,
|
| 269 |
-
'hierarchical' => false,
|
| 270 |
-
'menu_icon' => plugins_url( '/assets/Insert-icon.png', ECWD_MAIN_FILE ),
|
| 271 |
-
'supports' => array(
|
| 272 |
-
'title',
|
| 273 |
-
'editor'
|
| 274 |
-
)
|
| 275 |
-
);
|
| 276 |
-
|
| 277 |
-
register_post_type( self::CALENDAR_POST_TYPE, $calendar_args );
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
//events organizers
|
| 281 |
-
$organizers_labels = array(
|
| 282 |
-
'name' => __( 'Organizers', 'ecwd' ),
|
| 283 |
-
'singular_name' => __( 'Organizer', 'ecwd' ),
|
| 284 |
-
'name_admin_bar' => __( 'Organizer', 'ecwd' ),
|
| 285 |
-
'add_new' => __( 'Add New', 'ecwd' ),
|
| 286 |
-
'add_new_item' => __( 'Add New Organizer', 'ecwd' ),
|
| 287 |
-
'new_item' => __( 'New Organizer', 'ecwd' ),
|
| 288 |
-
'edit_item' => __( 'Edit Organizer', 'ecwd' ),
|
| 289 |
-
'view_item' => __( 'View Organizer', 'ecwd' ),
|
| 290 |
-
'all_items' => __( 'All Organizers', 'ecwd' ),
|
| 291 |
-
'search_items' => __( 'Search Organizer', 'ecwd' ),
|
| 292 |
-
'not_found' => __( 'No Organizers found.', 'ecwd' ),
|
| 293 |
-
'not_found_in_trash' => __( 'No Organizers found in Trash.', 'ecwd' )
|
| 294 |
-
);
|
| 295 |
-
|
| 296 |
-
$organizers_args = array(
|
| 297 |
-
'labels' => $organizers_labels,
|
| 298 |
-
'public' => true,
|
| 299 |
-
'publicly_queryable' => true,
|
| 300 |
-
'show_ui' => true,
|
| 301 |
-
'show_in_menu' => true,
|
| 302 |
-
'menu_position' => '26,13',
|
| 303 |
-
'query_var' => true,
|
| 304 |
-
'capability_type' => 'post',
|
| 305 |
-
'taxonomies' => array(),
|
| 306 |
-
'has_archive' => true,
|
| 307 |
-
'hierarchical' => true,
|
| 308 |
-
'menu_icon' => plugins_url( '/assets/organizer-icon.png', ECWD_MAIN_FILE ),
|
| 309 |
-
'supports' => array(
|
| 310 |
-
'title',
|
| 311 |
-
'editor',
|
| 312 |
-
'thumbnail'
|
| 313 |
-
),
|
| 314 |
-
'rewrite' => $organizer_rewrite
|
| 315 |
-
);
|
| 316 |
-
|
| 317 |
-
register_post_type( self::ORGANIZER_POST_TYPE, $organizers_args );
|
| 318 |
|
| 319 |
|
| 320 |
//events
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 455 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
}
|
| 457 |
-
|
| 458 |
-
$
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
$url3 = '</a>';
|
| 525 |
-
$s1 = __( 'Theme', 'ecwd' );
|
| 526 |
-
|
| 527 |
-
$messages[ ECWD_PLUGIN_PREFIX . '_theme' ] = array(
|
| 528 |
-
1 => sprintf( __( '%4$s updated.', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 529 |
-
4 => sprintf( __( '%4$s updated. ', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 530 |
-
6 => sprintf( __( '%4$s published.', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 531 |
-
7 => sprintf( __( '%4$s saved.', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 532 |
-
8 => sprintf( __( '%4$s submitted. ', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 533 |
-
10 => sprintf( __( '%4$s draft updated.', 'ecwd' ), $url1, $url2, $url3, $s1 )
|
| 534 |
-
);
|
| 535 |
-
|
| 536 |
-
if ( $post->post_type == ECWD_PLUGIN_PREFIX . '_theme' ) {
|
| 537 |
-
$notices = get_option( ECWD_PLUGIN_PREFIX . '_not_writable_warning' );
|
| 538 |
-
|
| 539 |
-
if ( empty( $notices ) ) {
|
| 540 |
-
return $messages;
|
| 541 |
-
}
|
| 542 |
-
|
| 543 |
-
foreach ( $notices as $post_id => $mm ) {
|
| 544 |
-
|
| 545 |
-
if ( $post->ID == $post_id ) {
|
| 546 |
-
$notice = '';
|
| 547 |
-
|
| 548 |
-
foreach ( $mm as $key ) {
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
$notice = $notice . ' <p style="color:red;">' . $key . '</p> ';
|
| 552 |
-
}
|
| 553 |
-
foreach ( $messages[ ECWD_PLUGIN_PREFIX . '_theme' ] as $i => $message ) {
|
| 554 |
-
$messages[ ECWD_PLUGIN_PREFIX . '_theme' ][ $i ] = $message . $notice;
|
| 555 |
-
}
|
| 556 |
-
unset( $notices[ $post_id ] );
|
| 557 |
-
update_option( ECWD_PLUGIN_PREFIX . '_not_writable_warning', $notices );
|
| 558 |
-
break;
|
| 559 |
-
}
|
| 560 |
-
}
|
| 561 |
-
}
|
| 562 |
-
|
| 563 |
-
return $messages;
|
| 564 |
-
}
|
| 565 |
-
|
| 566 |
-
/**
|
| 567 |
-
* Messages for Event actions
|
| 568 |
-
*/
|
| 569 |
-
public function event_messages( $messages ) {
|
| 570 |
-
global $post, $post_ID;
|
| 571 |
-
|
| 572 |
-
$url1 = '<a href="' . get_permalink( $post_ID ) . '">';
|
| 573 |
-
$url2 = __( 'event', 'ecwd' );
|
| 574 |
-
$url3 = '</a>';
|
| 575 |
-
$s1 = __( 'Event', 'ecwd' );
|
| 576 |
-
|
| 577 |
-
$messages[ ECWD_PLUGIN_PREFIX . '_event' ] = array(
|
| 578 |
-
1 => sprintf( __( '%4$s updated. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 579 |
-
4 => sprintf( __( '%4$s updated. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 580 |
-
6 => sprintf( __( '%4$s published. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 581 |
-
7 => sprintf( __( '%4$s saved. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 582 |
-
8 => sprintf( __( '%4$s submitted. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 ),
|
| 583 |
-
10 => sprintf( __( '%4$s draft updated. %1$sView %2$s%3$s', 'ecwd' ), $url1, $url2, $url3, $s1 )
|
| 584 |
-
);
|
| 585 |
-
|
| 586 |
-
return $messages;
|
| 587 |
-
}
|
| 588 |
-
|
| 589 |
-
/**
|
| 590 |
-
* Add Events post meta
|
| 591 |
-
*/
|
| 592 |
-
public function calendars_cpt_meta( $screen = null, $context = 'advanced' ) {
|
| 593 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_calendar_meta', __( 'Calendar Settings', 'ecwd' ), array(
|
| 594 |
-
$this,
|
| 595 |
-
'display_calendars_meta'
|
| 596 |
-
), ECWD_PLUGIN_PREFIX . '_calendar', 'advanced', 'core' );
|
| 597 |
-
|
| 598 |
-
}
|
| 599 |
-
|
| 600 |
-
/**
|
| 601 |
-
* Display Events post meta
|
| 602 |
-
*/
|
| 603 |
-
public function display_calendars_meta( $post ) {
|
| 604 |
-
$args = array(
|
| 605 |
-
'numberposts' => - 1,
|
| 606 |
-
'post_type' => self::EVENT_POST_TYPE,
|
| 607 |
-
'meta_query' => array(
|
| 608 |
-
array(
|
| 609 |
-
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 610 |
-
'value' => serialize( strval( $post->ID ) ),
|
| 611 |
-
'compare' => 'LIKE'
|
| 612 |
-
),
|
| 613 |
-
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 614 |
-
'orderby' => 'meta_value',
|
| 615 |
-
'order' => 'ASC'
|
| 616 |
-
|
| 617 |
-
)
|
| 618 |
-
);
|
| 619 |
-
$events = get_posts( $args );
|
| 620 |
-
|
| 621 |
-
$args = array(
|
| 622 |
-
'numberposts' => - 1,
|
| 623 |
-
'post_type' => self::EVENT_POST_TYPE,
|
| 624 |
-
'meta_query' => array(
|
| 625 |
-
'relation' => 'OR',
|
| 626 |
-
array(
|
| 627 |
-
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 628 |
-
'value' => serialize( strval( $post->ID ) ),
|
| 629 |
-
'compare' => 'NOT LIKE'
|
| 630 |
-
),
|
| 631 |
-
array(
|
| 632 |
-
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 633 |
-
'compare' => 'NOT EXISTS'
|
| 634 |
-
),
|
| 635 |
-
array(
|
| 636 |
-
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 637 |
-
'value' => '',
|
| 638 |
-
|
| 639 |
-
),
|
| 640 |
-
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 641 |
-
'orderby' => 'meta_value',
|
| 642 |
-
'order' => 'ASC'
|
| 643 |
-
|
| 644 |
-
)
|
| 645 |
-
);
|
| 646 |
-
$excluded_events = get_posts( $args );
|
| 647 |
-
|
| 648 |
-
$args = array(
|
| 649 |
-
'numberposts' => - 1,
|
| 650 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_theme'
|
| 651 |
-
);
|
| 652 |
-
$themes = get_posts( $args );
|
| 653 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-calendar-meta.php' );
|
| 654 |
-
do_action( ECWD_PLUGIN_PREFIX . '_gcal' );
|
| 655 |
-
do_action( ECWD_PLUGIN_PREFIX . '_fb' );
|
| 656 |
-
do_action( ECWD_PLUGIN_PREFIX . '_ical' );
|
| 657 |
-
}
|
| 658 |
-
|
| 659 |
-
/**
|
| 660 |
-
* Add Events post meta
|
| 661 |
-
*/
|
| 662 |
-
public function events_cpt_meta( $screen = null, $context = 'advanced' ) {
|
| 663 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_event_calendars_meta', __( 'Calendars', 'ecwd' ), array(
|
| 664 |
-
$this,
|
| 665 |
-
'display_events_calendars_meta'
|
| 666 |
-
), ECWD_PLUGIN_PREFIX . '_event', 'side', 'core' );
|
| 667 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_event_organizers_meta', __( 'Organizers', 'ecwd' ), array(
|
| 668 |
-
$this,
|
| 669 |
-
'display_events_organizers_meta'
|
| 670 |
-
), ECWD_PLUGIN_PREFIX . '_event', 'side', 'core' );
|
| 671 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_event_meta', __( 'Event Settings', 'ecwd' ), array(
|
| 672 |
-
$this,
|
| 673 |
-
'display_events_meta'
|
| 674 |
-
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core' );
|
| 675 |
-
if ( current_theme_supports( 'post-thumbnails', 'post' ) && post_type_supports( 'post', 'thumbnail' ) ) {
|
| 676 |
-
add_meta_box( 'postimagediv', __( 'Featured Image' ), 'post_thumbnail_meta_box', null, 'side', 'low' );
|
| 677 |
-
}
|
| 678 |
-
}
|
| 679 |
-
|
| 680 |
-
/**
|
| 681 |
-
* Display Events post meta
|
| 682 |
-
*/
|
| 683 |
-
public function display_events_meta() {
|
| 684 |
-
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
| 685 |
-
$long = '';
|
| 686 |
-
$lat = '';
|
| 687 |
-
$is_ = $this->is();
|
| 688 |
-
$args = array(
|
| 689 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_venue',
|
| 690 |
-
'post_status' => 'publish',
|
| 691 |
-
'posts_per_page' => - 1,
|
| 692 |
-
'ignore_sticky_posts' => 1
|
| 693 |
-
);
|
| 694 |
-
$venues = get_posts( $args );
|
| 695 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-event-meta.php' );
|
| 696 |
-
}
|
| 697 |
-
|
| 698 |
-
/**
|
| 699 |
-
* Display Events post meta
|
| 700 |
-
*/
|
| 701 |
-
public function display_events_calendars_meta() {
|
| 702 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-event-calendars-meta.php' );
|
| 703 |
-
}
|
| 704 |
-
|
| 705 |
-
public function display_events_organizers_meta() {
|
| 706 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-event-organizers-meta.php' );
|
| 707 |
-
}
|
| 708 |
-
|
| 709 |
-
/**
|
| 710 |
-
* Add Themes post meta
|
| 711 |
-
*/
|
| 712 |
-
public function themes_cpt_meta() {
|
| 713 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_theme_meta', __( 'Calendar Theme Settings', 'ecwd' ), array(
|
| 714 |
-
$this,
|
| 715 |
-
'display_theme_meta'
|
| 716 |
-
), ECWD_PLUGIN_PREFIX . '_theme', 'advanced', 'core' );
|
| 717 |
-
}
|
| 718 |
-
|
| 719 |
-
/**
|
| 720 |
-
* Display Theme post meta
|
| 721 |
-
*/
|
| 722 |
-
public function display_theme_meta() {
|
| 723 |
-
global $post;
|
| 724 |
-
$post_id = $post->ID;
|
| 725 |
-
$default_theme = array(
|
| 726 |
-
//general
|
| 727 |
-
ECWD_PLUGIN_PREFIX . '_width' => '100%',
|
| 728 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_color' => '',
|
| 729 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_width' => '',
|
| 730 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_radius' => '',
|
| 731 |
-
//header
|
| 732 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_color' => '#168fb5',
|
| 733 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_border_color' => '#91CEDF',
|
| 734 |
-
ECWD_PLUGIN_PREFIX . '_current_year_color' => '#ffffff',
|
| 735 |
-
ECWD_PLUGIN_PREFIX . '_current_year_font_size' => 28,
|
| 736 |
-
ECWD_PLUGIN_PREFIX . '_current_month_color' => '#ffffff',
|
| 737 |
-
ECWD_PLUGIN_PREFIX . '_current_month_font_size' => 16,
|
| 738 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_color' => '#ffffff',
|
| 739 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_font_size' => 18,
|
| 740 |
-
//views
|
| 741 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color' => '#10738B',
|
| 742 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color' => '#91CEDF',
|
| 743 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color' => '#ffffff',
|
| 744 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color' => '#ffffff',
|
| 745 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size' => 16,
|
| 746 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color' => '#10738B',
|
| 747 |
-
//search
|
| 748 |
-
ECWD_PLUGIN_PREFIX . '_search_bg_color' => '#10738B',
|
| 749 |
-
ECWD_PLUGIN_PREFIX . '_search_icon_color' => '#ffffff',
|
| 750 |
-
//filter
|
| 751 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color' => '#10738B',
|
| 752 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color' => '#ffffff',
|
| 753 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_text_color' => '#ffffff',
|
| 754 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color' => '#10738B',
|
| 755 |
-
ECWD_PLUGIN_PREFIX . '_filter_bg_color' => '#ECECEC',
|
| 756 |
-
ECWD_PLUGIN_PREFIX . '_filter_border_color' => '#ffffff',
|
| 757 |
-
ECWD_PLUGIN_PREFIX . '_filter_arrow_color' => '#10738B',
|
| 758 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color' => '#10738B',
|
| 759 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size' => 15,
|
| 760 |
-
ECWD_PLUGIN_PREFIX . '_filter_text_color' => '#10738B',
|
| 761 |
-
ECWD_PLUGIN_PREFIX . '_filter_font_size' => 16,
|
| 762 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color' => '#ffffff',
|
| 763 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_border_color' => '#DEE3E8',
|
| 764 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_text_color' => '#6E6E6E',
|
| 765 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_font_size' => 15,
|
| 766 |
-
//week days
|
| 767 |
-
ECWD_PLUGIN_PREFIX . '_week_days_bg_color' => '#F9F9F9',
|
| 768 |
-
ECWD_PLUGIN_PREFIX . '_week_days_border_color' => '#B6B6B6',
|
| 769 |
-
ECWD_PLUGIN_PREFIX . '_week_days_text_color' => '#585858',
|
| 770 |
-
ECWD_PLUGIN_PREFIX . '_week_days_font_size' => 17,
|
| 771 |
-
//days
|
| 772 |
-
ECWD_PLUGIN_PREFIX . '_cell_bg_color' => '#ffffff',
|
| 773 |
-
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color' => '#EDEDED',
|
| 774 |
-
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color' => '#F9F9F9',
|
| 775 |
-
ECWD_PLUGIN_PREFIX . '_cell_border_color' => '#B6B6B6',
|
| 776 |
-
ECWD_PLUGIN_PREFIX . '_day_number_bg_color' => '#E0E0E0',
|
| 777 |
-
ECWD_PLUGIN_PREFIX . '_day_text_color' => '#5C5C5C',
|
| 778 |
-
ECWD_PLUGIN_PREFIX . '_day_font_size' => 14,
|
| 779 |
-
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color' => '#ffffff',
|
| 780 |
-
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color' => '#0071A0',
|
| 781 |
-
ECWD_PLUGIN_PREFIX . '_current_day_text_color' => '#ffffff',
|
| 782 |
-
//events
|
| 783 |
-
ECWD_PLUGIN_PREFIX . '_event_title_color' => '',
|
| 784 |
-
ECWD_PLUGIN_PREFIX . '_event_title_font_size' => 18,
|
| 785 |
-
ECWD_PLUGIN_PREFIX . '_event_details_bg_color' => '#ffffff',
|
| 786 |
-
ECWD_PLUGIN_PREFIX . '_event_details_border_color' => '#bfbfbf',
|
| 787 |
-
ECWD_PLUGIN_PREFIX . '_event_details_text_color' => '#000000',
|
| 788 |
-
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
| 789 |
-
//events list view
|
| 790 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color' => '#10738B',
|
| 791 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color' => '#ffffff',
|
| 792 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size' => 15,
|
| 793 |
-
//posterboard
|
| 794 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color' => '#585858',
|
| 795 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color' => '#ffffff',
|
| 796 |
-
//pagination
|
| 797 |
-
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color' => '#ffffff',
|
| 798 |
-
ECWD_PLUGIN_PREFIX . '_current_page_bg_color' => '#10738B',
|
| 799 |
-
ECWD_PLUGIN_PREFIX . '_page_number_color' => '#A5A5A5',
|
| 800 |
-
);
|
| 801 |
-
|
| 802 |
-
if ( isset( $_REQUEST['theme'] ) && $_REQUEST['theme'] == 'reset' ) {
|
| 803 |
-
$data = json_encode( $default_theme );
|
| 804 |
-
update_post_meta( $post_id, self::THEME_POST_TYPE . '_params', $data );
|
| 805 |
-
//wp_redirect('post.php?post='.$post_id.'&action=edit');
|
| 806 |
-
}
|
| 807 |
-
|
| 808 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-theme-meta.php' );
|
| 809 |
-
}
|
| 810 |
-
|
| 811 |
-
/**
|
| 812 |
-
* Add Themes post meta
|
| 813 |
-
*/
|
| 814 |
-
public function venues_cpt_meta() {
|
| 815 |
-
add_meta_box( ECWD_PLUGIN_PREFIX . '_theme_meta', __( 'Venue Location', 'ecwd' ), array(
|
| 816 |
-
$this,
|
| 817 |
-
'display_venue_meta'
|
| 818 |
-
), ECWD_PLUGIN_PREFIX . '_venue', 'advanced', 'core' );
|
| 819 |
-
}
|
| 820 |
-
|
| 821 |
-
/**
|
| 822 |
-
* Display Theme post meta
|
| 823 |
-
*/
|
| 824 |
-
public function display_venue_meta() {
|
| 825 |
-
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
| 826 |
-
$lat = '';
|
| 827 |
-
$long = '';
|
| 828 |
-
|
| 829 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
| 830 |
-
}
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
//order orgs and venues by post name
|
| 834 |
-
function ecwd_archive_order( $vars ) {
|
| 835 |
-
global $ecwd_options;
|
| 836 |
-
$orderby = isset( $ecwd_options['cpt_order'] ) ? $ecwd_options['cpt_order'] : 'post_name';
|
| 837 |
-
$types = array( self::ORGANIZER_POST_TYPE, self::VENUE_POST_TYPE );
|
| 838 |
-
if ( ! is_admin() && isset( $vars['post_type'] ) && is_post_type_hierarchical( $vars['post_type'] ) && in_array( $vars['post_type'], $types ) ) {
|
| 839 |
-
$vars['orderby'] = $orderby;
|
| 840 |
-
$vars['order'] = 'ASC';
|
| 841 |
-
}
|
| 842 |
-
|
| 843 |
-
return $vars;
|
| 844 |
-
}
|
| 845 |
-
|
| 846 |
-
public function save_events() {
|
| 847 |
-
$status = 'error';
|
| 848 |
-
if ( isset( $_POST[ ECWD_PLUGIN_PREFIX . '_event_id' ] ) && isset( $_POST[ ECWD_PLUGIN_PREFIX . '_calendar_id' ] ) && isset( $_POST[ ECWD_PLUGIN_PREFIX . '_action' ] ) ) {
|
| 849 |
-
$event_id = esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_event_id' ] );
|
| 850 |
-
$calendar_id = esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_calendar_id' ] );
|
| 851 |
-
$event_calendars = get_post_meta( $event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', true );
|
| 852 |
-
if ( ! $event_calendars ) {
|
| 853 |
-
$event_calendars = array();
|
| 854 |
-
}
|
| 855 |
-
if ( $_POST[ ECWD_PLUGIN_PREFIX . '_action' ] == 'delete' ) {
|
| 856 |
-
if ( is_array( $event_calendars ) && in_array( $calendar_id, $event_calendars ) ) {
|
| 857 |
-
unset( $event_calendars[ array_search( $calendar_id, $event_calendars ) ] );
|
| 858 |
-
$status = 'ok';
|
| 859 |
-
}
|
| 860 |
-
} elseif ( esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_action' ] ) == 'add' ) {
|
| 861 |
-
if ( is_array( $event_calendars ) && ! in_array( $calendar_id, $event_calendars ) ) {
|
| 862 |
-
$event_calendars[] = $calendar_id;
|
| 863 |
-
$status = 'ok';
|
| 864 |
-
}
|
| 865 |
-
|
| 866 |
-
}
|
| 867 |
-
update_post_meta( $event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', $event_calendars );
|
| 868 |
-
}
|
| 869 |
-
echo json_encode( array( 'status' => $status ) );
|
| 870 |
-
wp_die();
|
| 871 |
-
}
|
| 872 |
-
|
| 873 |
-
public function add_event() {
|
| 874 |
-
$status = 'error';
|
| 875 |
-
$data = '';
|
| 876 |
-
if ( isset( $_POST[ ECWD_PLUGIN_PREFIX . '_calendar_id' ] ) ) {
|
| 877 |
-
$calendar_id = esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_calendar_id' ] );
|
| 878 |
-
$new_event = array(
|
| 879 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
| 880 |
-
'post_title' => esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_event_name' ] )
|
| 881 |
-
);
|
| 882 |
-
$new_event_id = wp_insert_post( $new_event );
|
| 883 |
-
if ( $new_event_id ) {
|
| 884 |
-
update_post_meta( $new_event_id, ECWD_PLUGIN_PREFIX . '_event_date_from', esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_event_date_from' ] ) );
|
| 885 |
-
update_post_meta( $new_event_id, ECWD_PLUGIN_PREFIX . '_event_date_to', esc_attr( $_POST[ ECWD_PLUGIN_PREFIX . '_event_date_to' ] ) );
|
| 886 |
-
update_post_meta( $new_event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', array( $calendar_id ) );
|
| 887 |
-
$status = 'success';
|
| 888 |
-
$data = array( 'event_id' => $new_event_id );
|
| 889 |
-
}
|
| 890 |
-
}
|
| 891 |
-
echo json_encode( array( 'status' => $status, 'data' => $data ) );
|
| 892 |
-
wp_die();
|
| 893 |
-
}
|
| 894 |
-
|
| 895 |
-
/**
|
| 896 |
-
* Function to save post meta for the event CPT
|
| 897 |
-
*/
|
| 898 |
-
public function save_meta( $post_id, $post ) {
|
| 899 |
-
if ( ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
| 900 |
-
return $post_id;
|
| 901 |
-
}
|
| 902 |
-
if ( isset( $_REQUEST['bulk_edit'] ) ) {
|
| 903 |
-
return $post_id;
|
| 904 |
-
}
|
| 905 |
-
if ( wp_is_post_revision( $post_id ) ) {
|
| 906 |
-
return $post_id;
|
| 907 |
-
}
|
| 908 |
-
|
| 909 |
-
$types = array(
|
| 910 |
-
ECWD_PLUGIN_PREFIX . '_calendar',
|
| 911 |
-
ECWD_PLUGIN_PREFIX . '_event',
|
| 912 |
-
ECWD_PLUGIN_PREFIX . '_theme',
|
| 913 |
-
ECWD_PLUGIN_PREFIX . '_venue'
|
| 914 |
-
);
|
| 915 |
-
|
| 916 |
-
// If this isn't a post, don't update it.
|
| 917 |
-
if ( ! in_array( $post->post_type, $types ) ) {
|
| 918 |
-
return $post_id;
|
| 919 |
-
}
|
| 920 |
-
$post_type = get_post_type( $post_id );
|
| 921 |
-
$ecwd_post_meta_fields[ ECWD_PLUGIN_PREFIX . '_calendar' ] = array(
|
| 922 |
-
ECWD_PLUGIN_PREFIX . '_calendar_description',
|
| 923 |
-
ECWD_PLUGIN_PREFIX . '_calendar_id',
|
| 924 |
-
ECWD_PLUGIN_PREFIX . '_calendar_default_year',
|
| 925 |
-
ECWD_PLUGIN_PREFIX . '_calendar_default_month',
|
| 926 |
-
ECWD_PLUGIN_PREFIX . '_calendar_12_hour_time_format',
|
| 927 |
-
ECWD_PLUGIN_PREFIX . '_calendar_theme',
|
| 928 |
-
ECWD_PLUGIN_PREFIX . '_facebook_page_id',
|
| 929 |
-
ECWD_PLUGIN_PREFIX . '_facebook_access_token',
|
| 930 |
-
ECWD_PLUGIN_PREFIX . '_calendar_ical',
|
| 931 |
-
);
|
| 932 |
-
$ecwd_post_meta_fields[ ECWD_PLUGIN_PREFIX . '_event' ] = array(
|
| 933 |
-
ECWD_PLUGIN_PREFIX . '_event_location',
|
| 934 |
-
ECWD_PLUGIN_PREFIX . '_event_venue',
|
| 935 |
-
ECWD_PLUGIN_PREFIX . '_lat_long',
|
| 936 |
-
ECWD_PLUGIN_PREFIX . '_event_show_map',
|
| 937 |
-
ECWD_PLUGIN_PREFIX . '_map_zoom',
|
| 938 |
-
ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 939 |
-
ECWD_PLUGIN_PREFIX . '_event_date_to',
|
| 940 |
-
ECWD_PLUGIN_PREFIX . '_event_url',
|
| 941 |
-
ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 942 |
-
ECWD_PLUGIN_PREFIX . '_event_organizers',
|
| 943 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_event',
|
| 944 |
-
ECWD_PLUGIN_PREFIX . '_event_day',
|
| 945 |
-
ECWD_PLUGIN_PREFIX . '_all_day_event',
|
| 946 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_how',
|
| 947 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_month_on_days',
|
| 948 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_year_on_days',
|
| 949 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_m',
|
| 950 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_y',
|
| 951 |
-
ECWD_PLUGIN_PREFIX . '_monthly_list_monthly',
|
| 952 |
-
ECWD_PLUGIN_PREFIX . '_monthly_week_monthly',
|
| 953 |
-
ECWD_PLUGIN_PREFIX . '_monthly_list_yearly',
|
| 954 |
-
ECWD_PLUGIN_PREFIX . '_monthly_week_yearly',
|
| 955 |
-
ECWD_PLUGIN_PREFIX . '_event_repeat_repeat_until',
|
| 956 |
-
ECWD_PLUGIN_PREFIX . '_event_year_month',
|
| 957 |
-
ECWD_PLUGIN_PREFIX . '_event_video',
|
| 958 |
-
);
|
| 959 |
-
|
| 960 |
-
$ecwd_post_meta_fields[ ECWD_PLUGIN_PREFIX . '_theme' ] = array(
|
| 961 |
-
//general
|
| 962 |
-
ECWD_PLUGIN_PREFIX . '_width',
|
| 963 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_color',
|
| 964 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_width',
|
| 965 |
-
ECWD_PLUGIN_PREFIX . '_cal_border_radius',
|
| 966 |
-
//header
|
| 967 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_color',
|
| 968 |
-
ECWD_PLUGIN_PREFIX . '_cal_header_border_color',
|
| 969 |
-
ECWD_PLUGIN_PREFIX . '_current_year_color',
|
| 970 |
-
ECWD_PLUGIN_PREFIX . '_current_year_font_size',
|
| 971 |
-
ECWD_PLUGIN_PREFIX . '_current_month_color',
|
| 972 |
-
ECWD_PLUGIN_PREFIX . '_current_month_font_size',
|
| 973 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_color',
|
| 974 |
-
ECWD_PLUGIN_PREFIX . '_next_prev_font_size',
|
| 975 |
-
//views
|
| 976 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color',
|
| 977 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color',
|
| 978 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color',
|
| 979 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color',
|
| 980 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size',
|
| 981 |
-
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color',
|
| 982 |
-
//search
|
| 983 |
-
ECWD_PLUGIN_PREFIX . '_search_bg_color',
|
| 984 |
-
ECWD_PLUGIN_PREFIX . '_search_icon_color',
|
| 985 |
-
//filter
|
| 986 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color',
|
| 987 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color',
|
| 988 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_text_color',
|
| 989 |
-
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color',
|
| 990 |
-
ECWD_PLUGIN_PREFIX . '_filter_bg_color',
|
| 991 |
-
ECWD_PLUGIN_PREFIX . '_filter_border_color',
|
| 992 |
-
ECWD_PLUGIN_PREFIX . '_filter_arrow_color',
|
| 993 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color',
|
| 994 |
-
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size',
|
| 995 |
-
ECWD_PLUGIN_PREFIX . '_filter_text_color',
|
| 996 |
-
ECWD_PLUGIN_PREFIX . '_filter_font_size',
|
| 997 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color',
|
| 998 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_border_color',
|
| 999 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_text_color',
|
| 1000 |
-
ECWD_PLUGIN_PREFIX . '_filter_item_font_size',
|
| 1001 |
-
//week days
|
| 1002 |
-
ECWD_PLUGIN_PREFIX . '_week_days_bg_color',
|
| 1003 |
-
ECWD_PLUGIN_PREFIX . '_week_days_border_color',
|
| 1004 |
-
ECWD_PLUGIN_PREFIX . '_week_days_text_color',
|
| 1005 |
-
ECWD_PLUGIN_PREFIX . '_week_days_font_size',
|
| 1006 |
-
//days
|
| 1007 |
-
ECWD_PLUGIN_PREFIX . '_cell_bg_color',
|
| 1008 |
-
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color',
|
| 1009 |
-
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color',
|
| 1010 |
-
ECWD_PLUGIN_PREFIX . '_cell_border_color',
|
| 1011 |
-
ECWD_PLUGIN_PREFIX . '_day_number_bg_color',
|
| 1012 |
-
ECWD_PLUGIN_PREFIX . '_day_text_color',
|
| 1013 |
-
ECWD_PLUGIN_PREFIX . '_day_font_size',
|
| 1014 |
-
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color',
|
| 1015 |
-
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color',
|
| 1016 |
-
ECWD_PLUGIN_PREFIX . '_current_day_text_color',
|
| 1017 |
-
//events
|
| 1018 |
-
ECWD_PLUGIN_PREFIX . '_event_title_color',
|
| 1019 |
-
ECWD_PLUGIN_PREFIX . '_event_title_font_size',
|
| 1020 |
-
ECWD_PLUGIN_PREFIX . '_event_details_bg_color',
|
| 1021 |
-
ECWD_PLUGIN_PREFIX . '_event_details_border_color',
|
| 1022 |
-
ECWD_PLUGIN_PREFIX . '_event_details_text_color',
|
| 1023 |
-
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
| 1024 |
-
//events list view
|
| 1025 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color',
|
| 1026 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color',
|
| 1027 |
-
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size',
|
| 1028 |
-
//posterboard
|
| 1029 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color',
|
| 1030 |
-
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color',
|
| 1031 |
-
//pagination
|
| 1032 |
-
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color',
|
| 1033 |
-
ECWD_PLUGIN_PREFIX . '_current_page_bg_color',
|
| 1034 |
-
ECWD_PLUGIN_PREFIX . '_page_number_color',
|
| 1035 |
-
);
|
| 1036 |
-
$ecwd_post_meta_fields[ ECWD_PLUGIN_PREFIX . '_venue' ] = array(
|
| 1037 |
-
ECWD_PLUGIN_PREFIX . '_venue_location',
|
| 1038 |
-
ECWD_PLUGIN_PREFIX . '_venue_lat_long',
|
| 1039 |
-
ECWD_PLUGIN_PREFIX . '_map_zoom',
|
| 1040 |
-
);
|
| 1041 |
-
|
| 1042 |
-
$ecwd_post_meta_fields[ $post_type ] = apply_filters( $post_type . '_meta', $ecwd_post_meta_fields[ $post_type ] );
|
| 1043 |
-
|
| 1044 |
-
if ( current_user_can( 'edit_post', $post_id ) ) {
|
| 1045 |
-
if ( $post_type == ECWD_PLUGIN_PREFIX . '_event' && ! isset( $_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ] ) ) {
|
| 1046 |
-
$_POST[ ECWD_PLUGIN_PREFIX . '_event_show_map' ] = 'no';
|
| 1047 |
-
}
|
| 1048 |
-
// Loop through our array and make sure it is posted and not empty in order to update it, otherwise we delete it
|
| 1049 |
-
if ( $post_type == ECWD_PLUGIN_PREFIX . '_theme' ) {
|
| 1050 |
-
$values = array();
|
| 1051 |
-
$data = json_encode( $values );
|
| 1052 |
-
update_post_meta( $post_id, $post_type . '_params', $data );
|
| 1053 |
-
} else {
|
| 1054 |
-
foreach ( $ecwd_post_meta_fields[ $post_type ] as $pmf ) {
|
| 1055 |
-
if ( isset( $_POST[ $pmf ] ) && ! empty( $_POST[ $pmf ] ) ) {
|
| 1056 |
-
if ( $post_type == ECWD_PLUGIN_PREFIX . '_calendar' ) {
|
| 1057 |
-
if ( $pmf == ECWD_PLUGIN_PREFIX . '_calendar_id' ) {
|
| 1058 |
-
$str = $_POST[ $pmf ];
|
| 1059 |
-
$id = str_replace( 'https://www.google.com/calendar/feeds/', '', $str );
|
| 1060 |
-
$id = str_replace( '/public/basic', '', $id );
|
| 1061 |
-
$id = str_replace( '%40', '@', $id );
|
| 1062 |
-
|
| 1063 |
-
update_post_meta( $post_id, $pmf, trim( $id ) );
|
| 1064 |
-
} else {
|
| 1065 |
-
update_post_meta( $post_id, $pmf, stripslashes( $_POST[ $pmf ] ) );
|
| 1066 |
-
}
|
| 1067 |
-
} else {
|
| 1068 |
-
|
| 1069 |
-
if ( ! is_array( $_POST[ $pmf ] ) ) {
|
| 1070 |
-
$value = stripslashes( $_POST[ $pmf ] );
|
| 1071 |
-
} else {
|
| 1072 |
-
$value = $_POST[ $pmf ];
|
| 1073 |
-
}
|
| 1074 |
-
update_post_meta( $post_id, $pmf, $value );
|
| 1075 |
-
|
| 1076 |
-
}
|
| 1077 |
-
} else {
|
| 1078 |
-
delete_post_meta( $post_id, $pmf );
|
| 1079 |
-
}
|
| 1080 |
-
}
|
| 1081 |
-
}
|
| 1082 |
-
}
|
| 1083 |
-
|
| 1084 |
-
|
| 1085 |
-
return $post_id;
|
| 1086 |
-
}
|
| 1087 |
-
|
| 1088 |
-
public function error_messages( $m ) {
|
| 1089 |
-
global $post;
|
| 1090 |
-
|
| 1091 |
-
return $m;
|
| 1092 |
-
}
|
| 1093 |
-
|
| 1094 |
-
public function calendar_add_column_headers( $defaults ) {
|
| 1095 |
-
|
| 1096 |
-
$new_columns = array(
|
| 1097 |
-
'cb' => $defaults['cb'],
|
| 1098 |
-
'calendar-id' => __( 'Calendar ID', 'ecwd' ),
|
| 1099 |
-
'calendar-sc' => __( 'Calendar Shortcode', 'ecwd' ),
|
| 1100 |
-
);
|
| 1101 |
-
|
| 1102 |
-
return array_merge( $defaults, $new_columns );
|
| 1103 |
-
}
|
| 1104 |
-
|
| 1105 |
-
public function add_column_headers( $defaults ) {
|
| 1106 |
-
|
| 1107 |
-
$new_columns = array(
|
| 1108 |
-
'cb' => $defaults['cb'],
|
| 1109 |
-
'event-id' => __( 'Event Dates', 'ecwd' )
|
| 1110 |
-
);
|
| 1111 |
-
|
| 1112 |
-
return array_merge( $defaults, $new_columns );
|
| 1113 |
-
}
|
| 1114 |
-
|
| 1115 |
-
/**
|
| 1116 |
-
* Fill out the calendar columns
|
| 1117 |
-
*/
|
| 1118 |
-
public function calendar_column_content( $column_name, $post_ID ) {
|
| 1119 |
-
|
| 1120 |
-
switch ( $column_name ) {
|
| 1121 |
-
|
| 1122 |
-
case 'calendar-id':
|
| 1123 |
-
echo $post_ID;
|
| 1124 |
-
break;
|
| 1125 |
-
case 'calendar-sc':
|
| 1126 |
-
echo '<code>[ecwd id="' . $post_ID . '"]</code>';
|
| 1127 |
-
break;
|
| 1128 |
-
|
| 1129 |
-
}
|
| 1130 |
-
}
|
| 1131 |
-
|
| 1132 |
-
/**
|
| 1133 |
-
* Fill out the events columns
|
| 1134 |
-
*/
|
| 1135 |
-
public function event_column_content( $column_name, $post_ID ) {
|
| 1136 |
-
switch ( $column_name ) {
|
| 1137 |
-
case 'event-id':
|
| 1138 |
-
$start = get_post_meta( $post_ID, ECWD_PLUGIN_PREFIX . '_event_date_from', true );
|
| 1139 |
-
$end = get_post_meta( $post_ID, ECWD_PLUGIN_PREFIX . '_event_date_to', true );
|
| 1140 |
-
if ( $start ) {
|
| 1141 |
-
echo date( 'Y/m/d', strtotime( $start ) );
|
| 1142 |
-
echo ' - ' . date( 'Y/m/d', strtotime( $end ) );
|
| 1143 |
-
} else {
|
| 1144 |
-
echo 'No dates';
|
| 1145 |
-
}
|
| 1146 |
-
break;
|
| 1147 |
-
}
|
| 1148 |
-
}
|
| 1149 |
-
|
| 1150 |
-
function create_taxonomies() {
|
| 1151 |
-
// Add new taxonomy, make it hierarchical (like categories)
|
| 1152 |
-
global $ecwd_options;
|
| 1153 |
-
$slug = (isset($ecwd_options['category_archive_slug']) && $ecwd_options['category_archive_slug']!="") ? $ecwd_options['category_archive_slug']: 'event_category';
|
| 1154 |
-
|
| 1155 |
-
$labels = array(
|
| 1156 |
-
'name' => _x( 'Event Categories', 'taxonomy general name', 'ecwd' ),
|
| 1157 |
-
'singular_name' => _x( 'Event Category', 'taxonomy singular name', 'ecwd' ),
|
| 1158 |
-
'search_items' => __( 'Search Event Categories','ecwd' ),
|
| 1159 |
-
'all_items' => __( 'All Event Categories', 'ecwd' ),
|
| 1160 |
-
'parent_item' => __( 'Parent Category','ecwd' ),
|
| 1161 |
-
'parent_item_colon' => __( 'Parent Category:','ecwd' ),
|
| 1162 |
-
'edit_item' => __( 'Edit Category','ecwd' ),
|
| 1163 |
-
'update_item' => __( 'Update Category','ecwd' ),
|
| 1164 |
-
'add_new_item' => __( 'Add New Event Category','ecwd' ),
|
| 1165 |
-
'new_item_name' => __( 'New Event Category Name','ecwd' ),
|
| 1166 |
-
'menu_name' => __( 'Event Categories','ecwd' ),
|
| 1167 |
-
);
|
| 1168 |
-
|
| 1169 |
-
$args = array(
|
| 1170 |
-
'hierarchical' => true,
|
| 1171 |
-
'labels' => $labels,
|
| 1172 |
-
'show_ui' => true,
|
| 1173 |
-
'show_admin_column' => true,
|
| 1174 |
-
'query_var' => true,
|
| 1175 |
-
'rewrite' => array( 'slug' => $slug ),
|
| 1176 |
-
);
|
| 1177 |
-
//register_taxonomy_for_object_type(ECWD_PLUGIN_PREFIX.'_event_category', array(ECWD_PLUGIN_PREFIX.'_event'));
|
| 1178 |
-
register_taxonomy( ECWD_PLUGIN_PREFIX . '_event_category', array( ECWD_PLUGIN_PREFIX . '_event' ), $args );
|
| 1179 |
-
|
| 1180 |
-
register_taxonomy(
|
| 1181 |
-
ECWD_PLUGIN_PREFIX . '_event_tag',
|
| 1182 |
-
ECWD_PLUGIN_PREFIX . '_event',
|
| 1183 |
-
array(
|
| 1184 |
-
'hierarchical' => false,
|
| 1185 |
-
'label' => __( 'Event Tags', 'ecwd' ),
|
| 1186 |
-
'singular_name' => __( 'Event Tag', 'ecwd' ),
|
| 1187 |
-
'rewrite' => array( 'slug' => 'event_tag' ),
|
| 1188 |
-
'query_var' => true
|
| 1189 |
-
)
|
| 1190 |
-
);
|
| 1191 |
-
}
|
| 1192 |
-
|
| 1193 |
-
/*
|
| 1194 |
-
* Add metas to events categories
|
| 1195 |
-
*
|
| 1196 |
-
* */
|
| 1197 |
-
|
| 1198 |
-
|
| 1199 |
-
public function add_categories_metas( $term ) {
|
| 1200 |
-
$tax = $this->tax;
|
| 1201 |
-
$uploadID = '';
|
| 1202 |
-
$icon = '';
|
| 1203 |
-
$term_id = '';
|
| 1204 |
-
$term_meta = array();
|
| 1205 |
-
$term_meta['color'] = '';
|
| 1206 |
-
$term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ] = '';
|
| 1207 |
-
if ( $term && is_object( $term ) ) {
|
| 1208 |
-
$term_id = $term->term_id;
|
| 1209 |
-
$term_meta = get_option( "{$this->tax}_$term_id" );
|
| 1210 |
-
$term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ] = $this->get_image_url( $term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ] );
|
| 1211 |
-
//var_dump($term_meta);
|
| 1212 |
-
|
| 1213 |
-
}
|
| 1214 |
-
include_once( ECWD_DIR . '/views/admin/ecwd-event-cat-meta.php' );
|
| 1215 |
-
}
|
| 1216 |
-
|
| 1217 |
-
|
| 1218 |
-
public function get_image_url( $url, $size = null, $return_placeholder = false ) {
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
$taxonomy_image_url = $url;
|
| 1222 |
-
if ( ! empty( $taxonomy_image_url ) ) {
|
| 1223 |
-
$attachment_id = $this->get_attachment_id_by_url( $taxonomy_image_url );
|
| 1224 |
-
if ( ! empty( $attachment_id ) ) {
|
| 1225 |
-
if ( empty( $size ) ) {
|
| 1226 |
-
$size = 'full';
|
| 1227 |
-
}
|
| 1228 |
-
$taxonomy_image_url = wp_get_attachment_image_src( $attachment_id, $size );
|
| 1229 |
-
$taxonomy_image_url = $taxonomy_image_url[0];
|
| 1230 |
-
}
|
| 1231 |
-
}
|
| 1232 |
-
|
| 1233 |
-
if ( $return_placeholder ) {
|
| 1234 |
-
return ( $taxonomy_image_url != '' ) ? $taxonomy_image_url : self::IMAGE_PLACEHOLDER;
|
| 1235 |
-
} else {
|
| 1236 |
-
return $taxonomy_image_url;
|
| 1237 |
-
}
|
| 1238 |
-
}
|
| 1239 |
-
|
| 1240 |
-
|
| 1241 |
-
public function get_attachment_id_by_url( $image_src ) {
|
| 1242 |
-
global $wpdb;
|
| 1243 |
-
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid = '$image_src'";
|
| 1244 |
-
$id = $wpdb->get_var( $query );
|
| 1245 |
-
|
| 1246 |
-
return ( ! empty( $id ) ) ? $id : null;
|
| 1247 |
-
}
|
| 1248 |
-
|
| 1249 |
-
|
| 1250 |
-
public function save_categories_metas( $term_id ) {
|
| 1251 |
-
//var_dump($_POST); die;
|
| 1252 |
-
if ( isset( $_POST[ $this->tax ] ) ) {
|
| 1253 |
-
|
| 1254 |
-
$t_id = $term_id;
|
| 1255 |
-
$term_meta = get_option( "{$this->tax}_$t_id" );
|
| 1256 |
-
$cat_keys = array_keys( $_POST[ $this->tax ] );
|
| 1257 |
-
foreach ( $cat_keys as $key ) {
|
| 1258 |
-
if ( isset( $_POST[ $this->tax ][ $key ] ) ) {
|
| 1259 |
-
$term_meta[ $key ] = esc_attr( $_POST[ $this->tax ][ $key ] );
|
| 1260 |
-
}
|
| 1261 |
-
}
|
| 1262 |
-
//save the option array
|
| 1263 |
-
update_option( "{$this->tax}_$t_id", $term_meta );
|
| 1264 |
-
}
|
| 1265 |
-
}
|
| 1266 |
-
|
| 1267 |
-
public function taxonomy_columns( $columns ) {
|
| 1268 |
-
$new_columns = array();
|
| 1269 |
-
$new_columns['cb'] = $columns['cb'];
|
| 1270 |
-
$new_columns['thumb'] = __( 'Icon', 'ecwd' );
|
| 1271 |
-
$new_columns['color'] = __( 'Color', 'ecwd' );
|
| 1272 |
-
|
| 1273 |
-
unset( $columns['cb'] );
|
| 1274 |
-
|
| 1275 |
-
return array_merge( $new_columns, $columns );
|
| 1276 |
-
}
|
| 1277 |
-
|
| 1278 |
-
public function taxonomy_column( $columns, $column, $id ) {
|
| 1279 |
-
$term_meta = get_option( "{$this->tax}_$id" );
|
| 1280 |
-
if ( ! $term_meta ) {
|
| 1281 |
-
$term_meta = array(
|
| 1282 |
-
ECWD_PLUGIN_PREFIX . '_taxonomy_image' => '',
|
| 1283 |
-
'color' => ''
|
| 1284 |
-
);
|
| 1285 |
-
}
|
| 1286 |
-
if ( $column == 'thumb' ) {
|
| 1287 |
-
$term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ] = $this->get_image_url( $term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ] );
|
| 1288 |
-
$columns = '<div><img src="' . $this->get_image_url( $term_meta[ ECWD_PLUGIN_PREFIX . '_taxonomy_image' ], null, true ) . '" alt="' . __( 'Icon', 'ecwd' ) . '" class="wp-post-image ecwd_icon" /></div>';
|
| 1289 |
-
|
| 1290 |
-
}
|
| 1291 |
-
if ( $column == 'color' ) {
|
| 1292 |
-
$columns .= '<div><div style="width: 10px; height: 10px; background-color: ' . $term_meta['color'] . '" ></div></div>';
|
| 1293 |
-
}
|
| 1294 |
-
|
| 1295 |
-
return $columns;
|
| 1296 |
-
}
|
| 1297 |
-
|
| 1298 |
-
public function event_restrict_manage() {
|
| 1299 |
-
include_once 'ecwd-cpt-filter.php';
|
| 1300 |
-
new Tax_CTP_Filter(
|
| 1301 |
-
array(
|
| 1302 |
-
self::EVENT_POST_TYPE => array(
|
| 1303 |
-
ECWD_PLUGIN_PREFIX . '_calendar',
|
| 1304 |
-
ECWD_PLUGIN_PREFIX . '_event_category',
|
| 1305 |
-
ECWD_PLUGIN_PREFIX . '_organizer',
|
| 1306 |
-
ECWD_PLUGIN_PREFIX . '_venue',
|
| 1307 |
-
ECWD_PLUGIN_PREFIX . '_event_tag'
|
| 1308 |
-
)
|
| 1309 |
-
)
|
| 1310 |
-
);
|
| 1311 |
-
}
|
| 1312 |
-
|
| 1313 |
-
public function get_ecwd_calendars() {
|
| 1314 |
-
$args = array(
|
| 1315 |
-
'numberposts' => - 1,
|
| 1316 |
-
'post_type' => ECWD_PLUGIN_PREFIX . '_calendar'
|
| 1317 |
-
);
|
| 1318 |
-
$calendars = get_posts( $args );
|
| 1319 |
-
|
| 1320 |
-
return $calendars;
|
| 1321 |
-
|
| 1322 |
-
}
|
| 1323 |
-
|
| 1324 |
-
public function ecwd_templates( $template ) {
|
| 1325 |
-
$post_types = array( self::EVENT_POST_TYPE );
|
| 1326 |
-
if ( is_singular( $post_types ) && ! file_exists( get_stylesheet_directory() . '/single-event.php' ) ) {
|
| 1327 |
-
$template = ECWD_DIR . '/views/single-event.php';
|
| 1328 |
-
}elseif (is_tax('ecwd_event_category')) {
|
| 1329 |
-
$template = ECWD_DIR . '/views/taxonomy-ecwd_event_category.php';
|
| 1330 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1331 |
|
| 1332 |
-
|
| 1333 |
-
|
| 1334 |
-
|
| 1335 |
-
|
| 1336 |
-
|
| 1337 |
-
|
|
|
|
|
|
|
|
|
|
| 1338 |
}
|
| 1339 |
}
|
| 1340 |
|
| 1341 |
-
|
| 1342 |
-
|
| 1343 |
-
|
| 1344 |
-
|
| 1345 |
-
|
| 1346 |
-
|
| 1347 |
-
|
| 1348 |
-
|
| 1349 |
-
|
| 1350 |
-
|
| 1351 |
-
|
| 1352 |
-
|
| 1353 |
-
|
| 1354 |
-
|
| 1355 |
-
|
| 1356 |
-
|
| 1357 |
-
|
| 1358 |
-
|
| 1359 |
-
|
| 1360 |
-
|
| 1361 |
-
|
| 1362 |
-
|
| 1363 |
-
|
| 1364 |
-
|
| 1365 |
-
|
| 1366 |
-
|
| 1367 |
-
|
| 1368 |
-
|
| 1369 |
-
|
| 1370 |
-
|
| 1371 |
-
|
| 1372 |
-
|
| 1373 |
-
|
| 1374 |
-
|
| 1375 |
-
|
| 1376 |
-
|
| 1377 |
-
|
| 1378 |
-
|
| 1379 |
-
|
| 1380 |
-
|
| 1381 |
-
|
| 1382 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
class ECWD_Cpt {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
const IMAGE_PLACEHOLDER = '';
|
| 6 |
+
const CALENDAR_POST_TYPE = 'ecwd_calendar';
|
| 7 |
+
const EVENT_POST_TYPE = 'ecwd_event';
|
| 8 |
+
const ORGANIZER_POST_TYPE = 'ecwd_organizer';
|
| 9 |
+
const VENUE_POST_TYPE = 'ecwd_venue';
|
| 10 |
+
const THEME_POST_TYPE = 'ecwd_theme';
|
| 11 |
+
|
| 12 |
+
protected static $instance = null;
|
| 13 |
+
public $rewriteSlugSingular;
|
| 14 |
+
public $rewriteSlug;
|
| 15 |
+
|
| 16 |
+
private function __construct() {
|
| 17 |
+
$this->tax = ECWD_PLUGIN_PREFIX . '_event_category';
|
| 18 |
+
$this->tag = ECWD_PLUGIN_PREFIX . '_event_tag';
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
//actions
|
| 22 |
+
add_action('init', array($this, 'setup_cpt'));
|
| 23 |
+
|
| 24 |
+
add_action('pre_get_posts', array($this, 'add_custom_post_type_to_query'));
|
| 25 |
+
add_action('pre_get_posts', array($this, 'category_archive_page_query'));
|
| 26 |
+
add_action('add_meta_boxes', array($this, 'calendars_cpt_meta'));
|
| 27 |
+
add_action('add_meta_boxes', array($this, 'events_cpt_meta'));
|
| 28 |
+
add_action('add_meta_boxes', array($this, 'themes_cpt_meta'));
|
| 29 |
+
add_action('add_meta_boxes', array($this, 'venues_cpt_meta'));
|
| 30 |
+
add_action('post_updated', array($this, 'save_meta'), 10, 3);
|
| 31 |
+
add_action('manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_custom_column', array(
|
| 32 |
+
$this,
|
| 33 |
+
'calendar_column_content'
|
| 34 |
+
), 10, 2);
|
| 35 |
+
add_action('manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_custom_column', array(
|
| 36 |
+
$this,
|
| 37 |
+
'event_column_content'
|
| 38 |
+
), 10, 2);
|
| 39 |
+
|
| 40 |
+
//duplicate posts actions
|
| 41 |
+
add_filter('post_row_actions', array($this, 'duplicate_event_link'), 10, 2);
|
| 42 |
+
add_action('admin_action_duplicate_ecwd_post', array($this, 'duplicate_post'));
|
| 43 |
+
|
| 44 |
+
//events catgeories
|
| 45 |
+
add_action('init', array($this, 'create_taxonomies'), 2);
|
| 46 |
+
add_action(ECWD_PLUGIN_PREFIX . '_event_category_add_form_fields', array(
|
| 47 |
+
$this,
|
| 48 |
+
'add_categories_metas'
|
| 49 |
+
), 10, 3);
|
| 50 |
+
add_action(ECWD_PLUGIN_PREFIX . '_event_category_edit_form_fields', array(
|
| 51 |
+
$this,
|
| 52 |
+
'add_categories_metas'
|
| 53 |
+
), 10, 3);
|
| 54 |
+
add_action('edited_' . ECWD_PLUGIN_PREFIX . '_event_category', array(
|
| 55 |
+
$this,
|
| 56 |
+
'save_categories_metas'
|
| 57 |
+
), 10, 2);
|
| 58 |
+
add_action('create_' . ECWD_PLUGIN_PREFIX . '_event_category', array(
|
| 59 |
+
$this,
|
| 60 |
+
'save_categories_metas'
|
| 61 |
+
), 10, 2);
|
| 62 |
+
add_filter('manage_edit-' . ECWD_PLUGIN_PREFIX . '_event_category_columns', array(
|
| 63 |
+
$this,
|
| 64 |
+
'taxonomy_columns'
|
| 65 |
+
));
|
| 66 |
+
add_filter('manage_' . ECWD_PLUGIN_PREFIX . '_event_category_custom_column', array(
|
| 67 |
+
$this,
|
| 68 |
+
'taxonomy_column'
|
| 69 |
+
), 10, 3);
|
| 70 |
+
add_filter('query_vars', array($this, 'ecwdEventQueryVars'));
|
| 71 |
+
add_filter('generate_rewrite_rules', array($this, 'filterRewriteRules'), 2);
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
add_action('wp_ajax_manage_calendar_events', array($this, 'save_events'));
|
| 75 |
+
add_action('wp_ajax_add_calendar_event', array($this, 'add_event'));
|
| 76 |
+
|
| 77 |
+
//filters
|
| 78 |
+
add_filter('post_updated_messages', array($this, 'calendar_messages'));
|
| 79 |
+
add_filter('post_updated_messages', array($this, 'theme_messages'));
|
| 80 |
+
add_filter('post_updated_messages', array($this, 'event_messages'));
|
| 81 |
+
add_filter('manage_' . ECWD_PLUGIN_PREFIX . '_calendar_posts_columns', array(
|
| 82 |
+
$this,
|
| 83 |
+
'calendar_add_column_headers'
|
| 84 |
+
));
|
| 85 |
+
add_filter('manage_' . ECWD_PLUGIN_PREFIX . '_event_posts_columns', array($this, 'add_column_headers'));
|
| 86 |
+
|
| 87 |
+
add_filter('template_include', array($this, 'ecwd_templates'), 28);
|
| 88 |
+
add_filter('request', array(&$this, 'ecwd_archive_order'));
|
| 89 |
+
|
| 90 |
+
//category filter
|
| 91 |
+
add_filter('init', array($this, 'event_restrict_manage'));
|
| 92 |
+
add_action('the_title', array($this, 'is_events_list_page_title'), 11, 2);
|
| 93 |
+
add_action('after_setup_theme', array($this, 'add_thumbnails_for_themes'));
|
| 94 |
}
|
| 95 |
+
|
| 96 |
+
public function add_thumbnails_for_themes() {
|
| 97 |
+
global $ecwd_config;
|
| 98 |
+
if ($ecwd_config['featured_image_for_themes']['value'] == '1') {
|
| 99 |
+
add_theme_support('post-thumbnails', array('ecwd_calendar', 'ecwd_organizer', 'ecwd_event', 'ecwd_venue'));
|
| 100 |
}
|
| 101 |
}
|
| 102 |
+
|
| 103 |
+
public function is_events_list_page_title($title, $id = null) {
|
| 104 |
+
if ($id != null && !is_admin() && in_the_loop() && is_archive() && get_post_type() == 'ecwd_event') {
|
| 105 |
+
if (get_option('ecwd_settings_general')) {
|
| 106 |
+
$event_date = get_option('ecwd_settings_general');
|
| 107 |
+
$event_date = isset($event_date['events_date']) ? $event_date['events_date'] : 0;
|
| 108 |
+
if ($event_date == '1') {
|
| 109 |
+
$post_metas = get_post_meta($id);
|
| 110 |
+
$ecwd_event_date_from = isset($post_metas['ecwd_event_date_from'][0]) ? $post_metas['ecwd_event_date_from'][0] : '';
|
| 111 |
+
$ecwd_event_date_to = isset($post_metas['ecwd_event_date_to'][0]) ? $post_metas['ecwd_event_date_to'][0] : '';
|
| 112 |
+
return $title . "<p class='ecwd_events_date'>" . $ecwd_event_date_from . " - " . $ecwd_event_date_to . "<p>";
|
| 113 |
+
}
|
| 114 |
+
};
|
| 115 |
+
}
|
| 116 |
+
return $title;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
public function duplicate_event_link($actions, $post) {
|
| 120 |
+
if (current_user_can('edit_posts')) {
|
| 121 |
+
if ($post->post_type == self::EVENT_POST_TYPE) {
|
| 122 |
+
$actions['duplicate'] = '<a href="admin.php?action=duplicate_ecwd_post&post=' . $post->ID . '" title="Duplicate this event" rel="permalink">' . __('Duplicate Event', 'ecwd') . '</a>';
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
return $actions;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
public function duplicate_post() {
|
| 130 |
+
global $wpdb;
|
| 131 |
+
if (!( isset($_GET['post']) || isset($_POST['post']) || ( isset($_REQUEST['action']) && 'ecwd_duplicate_post' == $_REQUEST['action'] ) )) {
|
| 132 |
+
wp_die('No post to duplicate has been supplied!');
|
| 133 |
+
}
|
| 134 |
+
/*
|
| 135 |
+
* get the original post id
|
| 136 |
+
*/
|
| 137 |
+
$post_id = ( isset($_GET['post']) ? $_GET['post'] : $_POST['post'] );
|
| 138 |
+
/*
|
| 139 |
+
* and all the original post data then
|
| 140 |
+
*/
|
| 141 |
+
$post = get_post($post_id);
|
| 142 |
+
|
| 143 |
+
$current_user = wp_get_current_user();
|
| 144 |
+
$new_post_author = $current_user->ID;
|
| 145 |
+
|
| 146 |
+
/*
|
| 147 |
+
* if post data exists, create the post duplicate
|
| 148 |
+
*/
|
| 149 |
+
if (isset($post) && $post != null) {
|
| 150 |
+
/*
|
| 151 |
+
* new post data array
|
| 152 |
+
*/
|
| 153 |
+
$args = array(
|
| 154 |
+
'comment_status' => $post->comment_status,
|
| 155 |
+
'post_type' => $post->post_type,
|
| 156 |
+
'ping_status' => $post->ping_status,
|
| 157 |
+
'post_author' => $new_post_author,
|
| 158 |
+
'post_content' => $post->post_content,
|
| 159 |
+
'post_excerpt' => $post->post_excerpt,
|
| 160 |
+
'post_name' => $post->post_name,
|
| 161 |
+
'post_parent' => $post->post_parent,
|
| 162 |
+
'post_password' => $post->post_password,
|
| 163 |
+
'post_status' => $post->post_status,
|
| 164 |
+
'post_title' => $post->post_title,
|
| 165 |
+
'post_type' => $post->post_type,
|
| 166 |
+
'to_ping' => $post->to_ping,
|
| 167 |
+
'menu_order' => $post->menu_order
|
| 168 |
+
);
|
| 169 |
+
|
| 170 |
+
/*
|
| 171 |
+
* insert the post by wp_insert_post() function
|
| 172 |
+
*/
|
| 173 |
+
$new_post_id = wp_insert_post($args);
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
$taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type, ex array("category", "post_tag");
|
| 177 |
+
foreach ($taxonomies as $taxonomy) {
|
| 178 |
+
$post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
|
| 179 |
+
wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
//insert metas
|
| 184 |
+
$metas = get_post_meta($post_id);
|
| 185 |
+
foreach ($metas as $key => $meta_value) {
|
| 186 |
+
if (is_serialized($meta_value[0])) {
|
| 187 |
+
$meta_value[0] = unserialize($meta_value[0]);
|
| 188 |
+
}
|
| 189 |
+
add_post_meta($new_post_id, $key, $meta_value[0]);
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
wp_redirect(admin_url('post.php?action=edit&post=' . $new_post_id));
|
| 193 |
+
exit;
|
| 194 |
+
} else {
|
| 195 |
+
wp_die('Post creation failed, could not find original post: ' . $post_id);
|
| 196 |
}
|
|
|
|
| 197 |
}
|
| 198 |
+
|
| 199 |
+
/**
|
| 200 |
+
* Hide other metaboxes
|
| 201 |
+
* Register SC custom post type
|
| 202 |
+
*/
|
| 203 |
+
public function setup_cpt() {
|
| 204 |
+
global $ecwd_options;
|
| 205 |
+
global $ecwd_config;
|
| 206 |
+
$rewrite = false;
|
| 207 |
+
$venue_rewrite = false;
|
| 208 |
+
$organizer_rewrite = false;
|
| 209 |
+
$event_supports = array();
|
| 210 |
+
if (isset($ecwd_options['event_comments']) && $ecwd_options['event_comments'] == 1) {
|
| 211 |
+
$event_supports[] = 'comments';
|
| 212 |
+
}
|
| 213 |
+
if (!isset($ecwd_options['enable_rewrite']) || $ecwd_options['enable_rewrite'] == 1) {
|
| 214 |
+
$defaultSlug = 'event';
|
| 215 |
+
if (is_plugin_active('the-events-calendar/the-events-calendar.php')) {
|
| 216 |
+
$defaultSlug = 'wdevent';
|
| 217 |
+
}
|
| 218 |
+
if (false === get_option(ECWD_PLUGIN_PREFIX . '_slug_changed')) {
|
| 219 |
+
update_option(ECWD_PLUGIN_PREFIX . '_slug_changed', 0);
|
| 220 |
+
update_option(ECWD_PLUGIN_PREFIX . '_single_slug', $defaultSlug);
|
| 221 |
+
update_option(ECWD_PLUGIN_PREFIX . '_slug', $defaultSlug . 's');
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
if (( isset($ecwd_options['event_slug']) && $ecwd_options['event_slug'] !== get_option(ECWD_PLUGIN_PREFIX . '_single_slug') ) || ( isset($ecwd_options['events_slug']) && $ecwd_options['events_slug'] !== get_option(ECWD_PLUGIN_PREFIX . '_slug') )) {
|
| 225 |
+
update_option(ECWD_PLUGIN_PREFIX . '_single_slug', $ecwd_options['event_slug']);
|
| 226 |
+
update_option(ECWD_PLUGIN_PREFIX . '_slug', $ecwd_options['events_slug']);
|
| 227 |
+
update_option(ECWD_PLUGIN_PREFIX . '_slug_changed', 1);
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
$this->rewriteSlug = ( isset($ecwd_options['events_slug']) && $ecwd_options['events_slug'] !== '' ) ? $ecwd_options['events_slug'] : $defaultSlug . 's';
|
| 231 |
+
$this->rewriteSlugSingular = ( isset($ecwd_options['event_slug']) && $ecwd_options['event_slug'] !== '' ) ? $ecwd_options['event_slug'] : $defaultSlug;
|
| 232 |
+
$rewrite = array(
|
| 233 |
+
'slug' => _x($this->rewriteSlugSingular, 'URL slug', 'ecwd'),
|
| 234 |
+
"with_front" => true
|
| 235 |
+
);
|
| 236 |
+
$venue_rewrite = array('slug' => _x('venue', 'URL slug', 'ecwd'), "with_front" => true);
|
| 237 |
+
$organizer_rewrite = array('slug' => _x('organizer', 'URL slug', 'ecwd'), "with_front" => true);
|
| 238 |
+
}
|
| 239 |
+
//calendars
|
| 240 |
+
$calendar_labels = array(
|
| 241 |
+
'name' => __('Calendars', 'ecwd'),
|
| 242 |
+
'singular_name' => __('Calendar', 'ecwd'),
|
| 243 |
+
'menu_name' => __('Calendars', 'ecwd'),
|
| 244 |
+
'name_admin_bar' => __('Calendar', 'ecwd'),
|
| 245 |
+
'add_new' => __('Add New Calendar', 'ecwd'),
|
| 246 |
+
'add_new_item' => __('Add New Calendar', 'ecwd'),
|
| 247 |
+
'new_item' => __('New Calendar', 'ecwd'),
|
| 248 |
+
'edit_item' => __('Edit Calendar', 'ecwd'),
|
| 249 |
+
'view_item' => __('View Calendar', 'ecwd'),
|
| 250 |
+
'all_items' => __('All Calendars', 'ecwd'),
|
| 251 |
+
'search_items' => __('Search Calendar', 'ecwd'),
|
| 252 |
+
'not_found' => __('No Calendars found.', 'ecwd'),
|
| 253 |
+
'not_found_in_trash' => __('No Calendars found in Trash.', 'ecwd')
|
| 254 |
+
);
|
| 255 |
+
|
| 256 |
+
$calendar_args = array(
|
| 257 |
+
'labels' => $calendar_labels,
|
| 258 |
+
'public' => false,
|
| 259 |
+
'publicly_queryable' => true,
|
| 260 |
+
'show_ui' => true,
|
| 261 |
+
'show_in_menu' => true,
|
| 262 |
+
'menu_position' => '26,11',
|
| 263 |
+
'query_var' => true,
|
| 264 |
+
'capability_type' => 'post',
|
| 265 |
+
'has_archive' => false,
|
| 266 |
+
'hierarchical' => false,
|
| 267 |
+
'menu_icon' => plugins_url('/assets/Insert-icon.png', ECWD_MAIN_FILE),
|
| 268 |
+
'supports' => array(
|
| 269 |
+
'title',
|
| 270 |
+
'editor'
|
| 271 |
+
)
|
| 272 |
+
);
|
| 273 |
+
|
| 274 |
+
register_post_type(self::CALENDAR_POST_TYPE, $calendar_args);
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
//events organizers
|
| 278 |
+
$organizers_labels = array(
|
| 279 |
+
'name' => __('Organizers', 'ecwd'),
|
| 280 |
+
'singular_name' => __('Organizer', 'ecwd'),
|
| 281 |
+
'name_admin_bar' => __('Organizer', 'ecwd'),
|
| 282 |
+
'add_new' => __('Add New', 'ecwd'),
|
| 283 |
+
'add_new_item' => __('Add New Organizer', 'ecwd'),
|
| 284 |
+
'new_item' => __('New Organizer', 'ecwd'),
|
| 285 |
+
'edit_item' => __('Edit Organizer', 'ecwd'),
|
| 286 |
+
'view_item' => __('View Organizer', 'ecwd'),
|
| 287 |
+
'all_items' => __('All Organizers', 'ecwd'),
|
| 288 |
+
'search_items' => __('Search Organizer', 'ecwd'),
|
| 289 |
+
'not_found' => __('No Organizers found.', 'ecwd'),
|
| 290 |
+
'not_found_in_trash' => __('No Organizers found in Trash.', 'ecwd')
|
| 291 |
+
);
|
| 292 |
+
|
| 293 |
+
$organizers_args = array(
|
| 294 |
+
'labels' => $organizers_labels,
|
| 295 |
+
'public' => true,
|
| 296 |
+
'publicly_queryable' => true,
|
| 297 |
+
'show_ui' => true,
|
| 298 |
+
'show_in_menu' => true,
|
| 299 |
+
'menu_position' => '26,13',
|
| 300 |
+
'query_var' => true,
|
| 301 |
+
'capability_type' => 'post',
|
| 302 |
+
'taxonomies' => array(),
|
| 303 |
+
'has_archive' => true,
|
| 304 |
+
'hierarchical' => true,
|
| 305 |
+
'menu_icon' => plugins_url('/assets/organizer-icon.png', ECWD_MAIN_FILE),
|
| 306 |
+
'supports' => array(
|
| 307 |
+
'title',
|
| 308 |
+
'editor',
|
| 309 |
+
'thumbnail'
|
| 310 |
+
),
|
| 311 |
+
'rewrite' => $organizer_rewrite
|
| 312 |
+
);
|
| 313 |
+
|
| 314 |
+
register_post_type(self::ORGANIZER_POST_TYPE, $organizers_args);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
|
| 317 |
//events
|
| 318 |
+
$labels = array(
|
| 319 |
+
'name' => __('Events', 'ecwd'),
|
| 320 |
+
'singular_name' => __('Event', 'ecwd'),
|
| 321 |
+
'name_admin_bar' => __('Event', 'ecwd'),
|
| 322 |
+
'add_new' => __('Add New', 'ecwd'),
|
| 323 |
+
'add_new_item' => __('Add New Event', 'ecwd'),
|
| 324 |
+
'new_item' => __('New Event', 'ecwd'),
|
| 325 |
+
'edit_item' => __('Edit Event', 'ecwd'),
|
| 326 |
+
'view_item' => __('View Event', 'ecwd'),
|
| 327 |
+
'all_items' => __('All Events', 'ecwd'),
|
| 328 |
+
'search_items' => __('Search Event', 'ecwd'),
|
| 329 |
+
'not_found' => __('No events found.', 'ecwd'),
|
| 330 |
+
'not_found_in_trash' => __('No events found in Trash.', 'ecwd')
|
| 331 |
+
);
|
| 332 |
+
$args = array(
|
| 333 |
+
'labels' => $labels,
|
| 334 |
+
'public' => true,
|
| 335 |
+
'publicly_queryable' => true,
|
| 336 |
+
'show_ui' => true,
|
| 337 |
+
'show_in_menu' => true,
|
| 338 |
+
'menu_position' => '26,14',
|
| 339 |
+
'query_var' => true,
|
| 340 |
+
'capability_type' => 'post',
|
| 341 |
+
'taxonomies' => array(
|
| 342 |
+
ECWD_PLUGIN_PREFIX . '_event_category',
|
| 343 |
+
ECWD_PLUGIN_PREFIX . '_event_tag',
|
| 344 |
+
'calendars',
|
| 345 |
+
'organizers'
|
| 346 |
+
),
|
| 347 |
+
'has_archive' => true,
|
| 348 |
+
'hierarchical' => false,
|
| 349 |
+
'menu_icon' => plugins_url('/assets/event-icon.png', ECWD_MAIN_FILE),
|
| 350 |
+
'supports' => array_merge(array(
|
| 351 |
+
'title',
|
| 352 |
+
'editor',
|
| 353 |
+
'thumbnail'
|
| 354 |
+
), $event_supports),
|
| 355 |
+
'rewrite' => $rewrite
|
| 356 |
+
);
|
| 357 |
+
|
| 358 |
+
register_post_type(self::EVENT_POST_TYPE, $args);
|
| 359 |
+
|
| 360 |
+
|
| 361 |
+
//venues
|
| 362 |
+
$venues_labels = array(
|
| 363 |
+
'name' => __('Venues', 'ecwd'),
|
| 364 |
+
'singular_name' => __('Venue', 'ecwd'),
|
| 365 |
+
'name_admin_bar' => __('Venue', 'ecwd'),
|
| 366 |
+
'add_new' => __('Add New', 'ecwd'),
|
| 367 |
+
'add_new_item' => __('Add New Venue', 'ecwd'),
|
| 368 |
+
'new_item' => __('New Venue', 'ecwd'),
|
| 369 |
+
'edit_item' => __('Edit Venue', 'ecwd'),
|
| 370 |
+
'view_item' => __('View Venue', 'ecwd'),
|
| 371 |
+
'all_items' => __('All Venues', 'ecwd'),
|
| 372 |
+
'search_items' => __('Search Venue', 'ecwd'),
|
| 373 |
+
'not_found' => __('No Venues found.', 'ecwd'),
|
| 374 |
+
'not_found_in_trash' => __('No Venues found in Trash.', 'ecwd')
|
| 375 |
+
);
|
| 376 |
+
|
| 377 |
+
$venues_args = array(
|
| 378 |
+
'labels' => $venues_labels,
|
| 379 |
+
'public' => true,
|
| 380 |
+
'publicly_queryable' => true,
|
| 381 |
+
'show_ui' => true,
|
| 382 |
+
'show_in_menu' => true,
|
| 383 |
+
'menu_position' => '26,15',
|
| 384 |
+
'query_var' => true,
|
| 385 |
+
'capability_type' => 'post',
|
| 386 |
+
'taxonomies' => array(),
|
| 387 |
+
'has_archive' => true,
|
| 388 |
+
'hierarchical' => true,
|
| 389 |
+
'menu_icon' => plugins_url('/assets/venue-icon.png', ECWD_MAIN_FILE),
|
| 390 |
+
'supports' => array(
|
| 391 |
+
'title',
|
| 392 |
+
'editor',
|
| 393 |
+
'thumbnail'
|
| 394 |
+
),
|
| 395 |
+
'rewrite' => $venue_rewrite
|
| 396 |
+
);
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
register_post_type(self::VENUE_POST_TYPE, $venues_args);
|
| 400 |
+
if ($ecwd_config['flush_rewrite_rules']['value'] == '1') {
|
| 401 |
+
flush_rewrite_rules();
|
| 402 |
+
}
|
| 403 |
+
if (false === get_option(ECWD_PLUGIN_PREFIX . '_cpt_setup') || 1 == get_option(ECWD_PLUGIN_PREFIX . '_slug_changed')) {
|
| 404 |
+
update_option(ECWD_PLUGIN_PREFIX . '_cpt_setup', 1);
|
| 405 |
+
update_option(ECWD_PLUGIN_PREFIX . '_slug_changed', 0);
|
| 406 |
+
if ($ecwd_config['flush_rewrite_rules']['value'] == '1') {
|
| 407 |
+
flush_rewrite_rules();
|
| 408 |
+
}
|
| 409 |
+
}
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
public function add_custom_post_type_to_query($query) {
|
| 413 |
+
if (is_admin() || !$query->is_main_query()) {
|
| 414 |
+
return;
|
| 415 |
+
}
|
| 416 |
+
global $ecwd_options;
|
| 417 |
+
if (isset($ecwd_options['event_loop']) && $ecwd_options['event_loop'] == 1) {
|
| 418 |
+
|
| 419 |
+
if ($query->is_home() && $query->is_main_query()) {
|
| 420 |
+
$query->set('post_type', array('post', self::EVENT_POST_TYPE));
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
public function ecwdEventQueryVars($qvars) {
|
| 426 |
+
$qvars[] = 'eventDate';
|
| 427 |
+
$qvars[] = self::EVENT_POST_TYPE;
|
| 428 |
+
|
| 429 |
+
return $qvars;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
public function filterRewriteRules($wp_rewrite) {
|
| 433 |
+
global $ecwd_options;
|
| 434 |
+
if (!isset($ecwd_options['enable_rewrite']) || $ecwd_options['enable_rewrite'] == 1) {
|
| 435 |
+
if (!$this->rewriteSlugSingular || $this->rewriteSlugSingular == '') {
|
| 436 |
+
$defaultSlug = 'event';
|
| 437 |
+
if (is_plugin_active('the-events-calendar/the-events-calendar.php')) {
|
| 438 |
+
$defaultSlug = 'wdevent';
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
$this->rewriteSlug = ( isset($ecwd_options['events_slug']) && $ecwd_options['events_slug'] !== '' ) ? $ecwd_options['events_slug'] : $defaultSlug . 's';
|
| 442 |
+
$this->rewriteSlugSingular = ( isset($ecwd_options['event_slug']) && $ecwd_options['event_slug'] !== '' ) ? $ecwd_options['event_slug'] : $defaultSlug;
|
| 443 |
+
}
|
| 444 |
+
|
| 445 |
+
$base = trailingslashit($this->rewriteSlug);
|
| 446 |
+
$singleBase = trailingslashit($this->rewriteSlugSingular);
|
| 447 |
+
$rewrite_arr = explode('/', $wp_rewrite->permalink_structure);
|
| 448 |
+
$rewritebase = '';
|
| 449 |
+
for ($i = 1; $i < count($rewrite_arr); $i++) {
|
| 450 |
+
if (isset($rewrite_arr[$i]) && strpos($rewrite_arr[$i], '%') === FALSE) {
|
| 451 |
+
$rewritebase = $rewritebase . $rewrite_arr[$i] . '/';
|
| 452 |
+
} else {
|
| 453 |
+
break;
|
| 454 |
+
}
|
| 455 |
+
}
|
| 456 |
+
$base = $rewritebase . $base;
|
| 457 |
+
$singleBase = $rewritebase . $singleBase;
|
| 458 |
+
$newRules = array();
|
| 459 |
+
// single event
|
| 460 |
+
$newRules[$singleBase . '([^/]+)/(\d{4}-\d{2}-\d{2})/?$'] = 'index.php?' . self::EVENT_POST_TYPE . '=' . $wp_rewrite->preg_index(1) . "&eventDate=" . $wp_rewrite->preg_index(2);
|
| 461 |
+
$newRules[$singleBase . '([^/]+)/all/?$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&' . self::EVENT_POST_TYPE . '=' . $wp_rewrite->preg_index(1) . "&eventDisplay=all";
|
| 462 |
+
$newRules[$base . 'page/(\d+)'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&eventDisplay=list&paged=' . $wp_rewrite->preg_index(1);
|
| 463 |
+
$newRules[$base . '(feed|rdf|rss|rss2|atom)/?$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&eventDisplay=list&feed=' . $wp_rewrite->preg_index(1);
|
| 464 |
+
$newRules[$base . '(\d{4}-\d{2})$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&eventDisplay=month' . '&eventDate=' . $wp_rewrite->preg_index(1);
|
| 465 |
+
$newRules[$base . '(\d{4}-\d{2}-\d{2})/?$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&eventDisplay=day&eventDate=' . $wp_rewrite->preg_index(1);
|
| 466 |
+
$newRules[$base . 'feed/?$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . 'eventDisplay=list&&feed=rss2';
|
| 467 |
+
$newRules[$base . '?$'] = 'index.php?post_type=' . self::EVENT_POST_TYPE . '&eventDisplay=default';
|
| 468 |
+
|
| 469 |
+
$wp_rewrite->rules = apply_filters(ECWD_PLUGIN_PREFIX . '_events_rewrite_rules', $newRules + $wp_rewrite->rules, $newRules);
|
| 470 |
+
}
|
| 471 |
+
}
|
| 472 |
+
|
| 473 |
+
/**
|
| 474 |
+
* Messages for Calendar actions
|
| 475 |
+
*/
|
| 476 |
+
public function calendar_messages($messages) {
|
| 477 |
+
global $post, $post_ID;
|
| 478 |
+
|
| 479 |
+
$url1 = '<a href="' . get_permalink($post_ID) . '">';
|
| 480 |
+
$url2 = __('calendar', 'ecwd');
|
| 481 |
+
$url3 = '</a>';
|
| 482 |
+
$s1 = __('Calendar', 'ecwd');
|
| 483 |
+
|
| 484 |
+
$messages[ECWD_PLUGIN_PREFIX . '_calendar'] = array(
|
| 485 |
+
1 => sprintf(__('%4$s updated.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 486 |
+
4 => sprintf(__('%4$s updated. ', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 487 |
+
6 => sprintf(__('%4$s published.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 488 |
+
7 => sprintf(__('%4$s saved.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 489 |
+
8 => sprintf(__('%4$s submitted. ', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 490 |
+
10 => sprintf(__('%4$s draft updated.', 'ecwd'), $url1, $url2, $url3, $s1)
|
| 491 |
+
);
|
| 492 |
+
if ($post->post_type == ECWD_PLUGIN_PREFIX . '_calendar') {
|
| 493 |
+
|
| 494 |
+
$notices = get_option(ECWD_PLUGIN_PREFIX . '_not_writable_warning');
|
| 495 |
+
if (empty($notices)) {
|
| 496 |
+
return $messages;
|
| 497 |
+
}
|
| 498 |
+
foreach ($notices as $post_id => $mm) {
|
| 499 |
+
if ($post->ID == $post_id) {
|
| 500 |
+
$notice = '';
|
| 501 |
+
foreach ($mm as $key) {
|
| 502 |
+
$notice = $notice . ' <p style="color:red;">' . $key . '</p> ';
|
| 503 |
+
}
|
| 504 |
+
foreach ($messages[ECWD_PLUGIN_PREFIX . '_calendar'] as $i => $message) {
|
| 505 |
+
$messages[ECWD_PLUGIN_PREFIX . '_calendar'][$i] = $message . $notice;
|
| 506 |
+
}
|
| 507 |
+
unset($notices[$post_id]);
|
| 508 |
+
update_option(ECWD_PLUGIN_PREFIX . '_not_writable_warning', $notices);
|
| 509 |
+
break;
|
| 510 |
+
}
|
| 511 |
+
}
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
return $messages;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
public function theme_messages($messages) {
|
| 518 |
+
global $post, $post_ID;
|
| 519 |
+
|
| 520 |
+
$url1 = '<a href="' . get_permalink($post_ID) . '">';
|
| 521 |
+
$url2 = __('Theme', 'ecwd');
|
| 522 |
+
$url3 = '</a>';
|
| 523 |
+
$s1 = __('Theme', 'ecwd');
|
| 524 |
+
|
| 525 |
+
$messages[ECWD_PLUGIN_PREFIX . '_theme'] = array(
|
| 526 |
+
1 => sprintf(__('%4$s updated.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 527 |
+
4 => sprintf(__('%4$s updated. ', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 528 |
+
6 => sprintf(__('%4$s published.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 529 |
+
7 => sprintf(__('%4$s saved.', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 530 |
+
8 => sprintf(__('%4$s submitted. ', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 531 |
+
10 => sprintf(__('%4$s draft updated.', 'ecwd'), $url1, $url2, $url3, $s1)
|
| 532 |
+
);
|
| 533 |
+
|
| 534 |
+
if ($post->post_type == ECWD_PLUGIN_PREFIX . '_theme') {
|
| 535 |
+
$notices = get_option(ECWD_PLUGIN_PREFIX . '_not_writable_warning');
|
| 536 |
+
|
| 537 |
+
if (empty($notices)) {
|
| 538 |
+
return $messages;
|
| 539 |
+
}
|
| 540 |
+
|
| 541 |
+
foreach ($notices as $post_id => $mm) {
|
| 542 |
+
|
| 543 |
+
if ($post->ID == $post_id) {
|
| 544 |
+
$notice = '';
|
| 545 |
+
|
| 546 |
+
foreach ($mm as $key) {
|
| 547 |
+
|
| 548 |
+
|
| 549 |
+
$notice = $notice . ' <p style="color:red;">' . $key . '</p> ';
|
| 550 |
+
}
|
| 551 |
+
foreach ($messages[ECWD_PLUGIN_PREFIX . '_theme'] as $i => $message) {
|
| 552 |
+
$messages[ECWD_PLUGIN_PREFIX . '_theme'][$i] = $message . $notice;
|
| 553 |
+
}
|
| 554 |
+
unset($notices[$post_id]);
|
| 555 |
+
update_option(ECWD_PLUGIN_PREFIX . '_not_writable_warning', $notices);
|
| 556 |
+
break;
|
| 557 |
+
}
|
| 558 |
+
}
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
return $messages;
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
/**
|
| 565 |
+
* Messages for Event actions
|
| 566 |
+
*/
|
| 567 |
+
public function event_messages($messages) {
|
| 568 |
+
global $post, $post_ID;
|
| 569 |
+
|
| 570 |
+
$url1 = '<a href="' . get_permalink($post_ID) . '">';
|
| 571 |
+
$url2 = __('event', 'ecwd');
|
| 572 |
+
$url3 = '</a>';
|
| 573 |
+
$s1 = __('Event', 'ecwd');
|
| 574 |
+
|
| 575 |
+
$messages[ECWD_PLUGIN_PREFIX . '_event'] = array(
|
| 576 |
+
1 => sprintf(__('%4$s updated. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 577 |
+
4 => sprintf(__('%4$s updated. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 578 |
+
6 => sprintf(__('%4$s published. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 579 |
+
7 => sprintf(__('%4$s saved. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 580 |
+
8 => sprintf(__('%4$s submitted. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1),
|
| 581 |
+
10 => sprintf(__('%4$s draft updated. %1$sView %2$s%3$s', 'ecwd'), $url1, $url2, $url3, $s1)
|
| 582 |
+
);
|
| 583 |
+
|
| 584 |
+
return $messages;
|
| 585 |
+
}
|
| 586 |
+
|
| 587 |
+
/**
|
| 588 |
+
* Add Events post meta
|
| 589 |
+
*/
|
| 590 |
+
public function calendars_cpt_meta($screen = null, $context = 'advanced') {
|
| 591 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_calendar_meta', __('Calendar Settings', 'ecwd'), array(
|
| 592 |
+
$this,
|
| 593 |
+
'display_calendars_meta'
|
| 594 |
+
), ECWD_PLUGIN_PREFIX . '_calendar', 'advanced', 'core');
|
| 595 |
+
}
|
| 596 |
+
|
| 597 |
+
/**
|
| 598 |
+
* Display Events post meta
|
| 599 |
+
*/
|
| 600 |
+
public function display_calendars_meta($post) {
|
| 601 |
+
$args = array(
|
| 602 |
+
'numberposts' => - 1,
|
| 603 |
+
'post_type' => self::EVENT_POST_TYPE,
|
| 604 |
+
'meta_query' => array(
|
| 605 |
+
array(
|
| 606 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 607 |
+
'value' => serialize(strval($post->ID)),
|
| 608 |
+
'compare' => 'LIKE'
|
| 609 |
+
),
|
| 610 |
+
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 611 |
+
'orderby' => 'meta_value',
|
| 612 |
+
'order' => 'ASC'
|
| 613 |
+
)
|
| 614 |
+
);
|
| 615 |
+
$events = get_posts($args);
|
| 616 |
+
|
| 617 |
+
$args = array(
|
| 618 |
+
'numberposts' => - 1,
|
| 619 |
+
'post_type' => self::EVENT_POST_TYPE,
|
| 620 |
+
'meta_query' => array(
|
| 621 |
+
'relation' => 'OR',
|
| 622 |
+
array(
|
| 623 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 624 |
+
'value' => serialize(strval($post->ID)),
|
| 625 |
+
'compare' => 'NOT LIKE'
|
| 626 |
+
),
|
| 627 |
+
array(
|
| 628 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 629 |
+
'compare' => 'NOT EXISTS'
|
| 630 |
+
),
|
| 631 |
+
array(
|
| 632 |
+
'key' => ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 633 |
+
'value' => '',
|
| 634 |
+
),
|
| 635 |
+
'meta_key' => ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 636 |
+
'orderby' => 'meta_value',
|
| 637 |
+
'order' => 'ASC'
|
| 638 |
+
)
|
| 639 |
+
);
|
| 640 |
+
$excluded_events = get_posts($args);
|
| 641 |
+
|
| 642 |
+
$args = array(
|
| 643 |
+
'numberposts' => - 1,
|
| 644 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_theme'
|
| 645 |
+
);
|
| 646 |
+
$themes = get_posts($args);
|
| 647 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-calendar-meta.php' );
|
| 648 |
+
do_action(ECWD_PLUGIN_PREFIX . '_gcal');
|
| 649 |
+
do_action(ECWD_PLUGIN_PREFIX . '_fb');
|
| 650 |
+
do_action(ECWD_PLUGIN_PREFIX . '_ical');
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
/**
|
| 654 |
+
* Add Events post meta
|
| 655 |
+
*/
|
| 656 |
+
public function events_cpt_meta($screen = null, $context = 'advanced') {
|
| 657 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_calendars_meta', __('Calendars', 'ecwd'), array(
|
| 658 |
+
$this,
|
| 659 |
+
'display_events_calendars_meta'
|
| 660 |
+
), ECWD_PLUGIN_PREFIX . '_event', 'side', 'core');
|
| 661 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_organizers_meta', __('Organizers', 'ecwd'), array(
|
| 662 |
+
$this,
|
| 663 |
+
'display_events_organizers_meta'
|
| 664 |
+
), ECWD_PLUGIN_PREFIX . '_event', 'side', 'core');
|
| 665 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_event_meta', __('Event Settings', 'ecwd'), array(
|
| 666 |
+
$this,
|
| 667 |
+
'display_events_meta'
|
| 668 |
+
), ECWD_PLUGIN_PREFIX . '_event', 'advanced', 'core');
|
| 669 |
+
if (current_theme_supports('post-thumbnails', 'post') && post_type_supports('post', 'thumbnail')) {
|
| 670 |
+
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
|
| 671 |
+
}
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
/**
|
| 675 |
+
* Display Events post meta
|
| 676 |
+
*/
|
| 677 |
+
public function display_events_meta() {
|
| 678 |
+
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
| 679 |
+
$long = '';
|
| 680 |
+
$lat = '';
|
| 681 |
+
$is_ = $this->is();
|
| 682 |
+
$args = array(
|
| 683 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_venue',
|
| 684 |
+
'post_status' => 'publish',
|
| 685 |
+
'posts_per_page' => - 1,
|
| 686 |
+
'ignore_sticky_posts' => 1
|
| 687 |
+
);
|
| 688 |
+
$venues = get_posts($args);
|
| 689 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-event-meta.php' );
|
| 690 |
+
}
|
| 691 |
+
|
| 692 |
+
/**
|
| 693 |
+
* Display Events post meta
|
| 694 |
+
*/
|
| 695 |
+
public function display_events_calendars_meta() {
|
| 696 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-event-calendars-meta.php' );
|
| 697 |
+
}
|
| 698 |
+
|
| 699 |
+
public function display_events_organizers_meta() {
|
| 700 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-event-organizers-meta.php' );
|
| 701 |
+
}
|
| 702 |
+
|
| 703 |
+
/**
|
| 704 |
+
* Add Themes post meta
|
| 705 |
+
*/
|
| 706 |
+
public function themes_cpt_meta() {
|
| 707 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_theme_meta', __('Calendar Theme Settings', 'ecwd'), array(
|
| 708 |
+
$this,
|
| 709 |
+
'display_theme_meta'
|
| 710 |
+
), ECWD_PLUGIN_PREFIX . '_theme', 'advanced', 'core');
|
| 711 |
+
}
|
| 712 |
+
|
| 713 |
+
/**
|
| 714 |
+
* Display Theme post meta
|
| 715 |
+
*/
|
| 716 |
+
public function display_theme_meta() {
|
| 717 |
+
global $post;
|
| 718 |
+
$post_id = $post->ID;
|
| 719 |
+
$default_theme = array(
|
| 720 |
+
//general
|
| 721 |
+
ECWD_PLUGIN_PREFIX . '_width' => '100%',
|
| 722 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_color' => '',
|
| 723 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_width' => '',
|
| 724 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_radius' => '',
|
| 725 |
+
//header
|
| 726 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_color' => '#168fb5',
|
| 727 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_border_color' => '#91CEDF',
|
| 728 |
+
ECWD_PLUGIN_PREFIX . '_current_year_color' => '#ffffff',
|
| 729 |
+
ECWD_PLUGIN_PREFIX . '_current_year_font_size' => 28,
|
| 730 |
+
ECWD_PLUGIN_PREFIX . '_current_month_color' => '#ffffff',
|
| 731 |
+
ECWD_PLUGIN_PREFIX . '_current_month_font_size' => 16,
|
| 732 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_color' => '#ffffff',
|
| 733 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_font_size' => 18,
|
| 734 |
+
//views
|
| 735 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color' => '#10738B',
|
| 736 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color' => '#91CEDF',
|
| 737 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color' => '#ffffff',
|
| 738 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color' => '#ffffff',
|
| 739 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size' => 16,
|
| 740 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color' => '#10738B',
|
| 741 |
+
//search
|
| 742 |
+
ECWD_PLUGIN_PREFIX . '_search_bg_color' => '#10738B',
|
| 743 |
+
ECWD_PLUGIN_PREFIX . '_search_icon_color' => '#ffffff',
|
| 744 |
+
//filter
|
| 745 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color' => '#10738B',
|
| 746 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color' => '#ffffff',
|
| 747 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_text_color' => '#ffffff',
|
| 748 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color' => '#10738B',
|
| 749 |
+
ECWD_PLUGIN_PREFIX . '_filter_bg_color' => '#ECECEC',
|
| 750 |
+
ECWD_PLUGIN_PREFIX . '_filter_border_color' => '#ffffff',
|
| 751 |
+
ECWD_PLUGIN_PREFIX . '_filter_arrow_color' => '#10738B',
|
| 752 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color' => '#10738B',
|
| 753 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size' => 15,
|
| 754 |
+
ECWD_PLUGIN_PREFIX . '_filter_text_color' => '#10738B',
|
| 755 |
+
ECWD_PLUGIN_PREFIX . '_filter_font_size' => 16,
|
| 756 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color' => '#ffffff',
|
| 757 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_border_color' => '#DEE3E8',
|
| 758 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_text_color' => '#6E6E6E',
|
| 759 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_font_size' => 15,
|
| 760 |
+
//week days
|
| 761 |
+
ECWD_PLUGIN_PREFIX . '_week_days_bg_color' => '#F9F9F9',
|
| 762 |
+
ECWD_PLUGIN_PREFIX . '_week_days_border_color' => '#B6B6B6',
|
| 763 |
+
ECWD_PLUGIN_PREFIX . '_week_days_text_color' => '#585858',
|
| 764 |
+
ECWD_PLUGIN_PREFIX . '_week_days_font_size' => 17,
|
| 765 |
+
//days
|
| 766 |
+
ECWD_PLUGIN_PREFIX . '_cell_bg_color' => '#ffffff',
|
| 767 |
+
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color' => '#EDEDED',
|
| 768 |
+
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color' => '#F9F9F9',
|
| 769 |
+
ECWD_PLUGIN_PREFIX . '_cell_border_color' => '#B6B6B6',
|
| 770 |
+
ECWD_PLUGIN_PREFIX . '_day_number_bg_color' => '#E0E0E0',
|
| 771 |
+
ECWD_PLUGIN_PREFIX . '_day_text_color' => '#5C5C5C',
|
| 772 |
+
ECWD_PLUGIN_PREFIX . '_day_font_size' => 14,
|
| 773 |
+
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color' => '#ffffff',
|
| 774 |
+
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color' => '#0071A0',
|
| 775 |
+
ECWD_PLUGIN_PREFIX . '_current_day_text_color' => '#ffffff',
|
| 776 |
+
//events
|
| 777 |
+
ECWD_PLUGIN_PREFIX . '_event_title_color' => '',
|
| 778 |
+
ECWD_PLUGIN_PREFIX . '_event_title_font_size' => 18,
|
| 779 |
+
ECWD_PLUGIN_PREFIX . '_event_details_bg_color' => '#ffffff',
|
| 780 |
+
ECWD_PLUGIN_PREFIX . '_event_details_border_color' => '#bfbfbf',
|
| 781 |
+
ECWD_PLUGIN_PREFIX . '_event_details_text_color' => '#000000',
|
| 782 |
+
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
| 783 |
+
//events list view
|
| 784 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color' => '#10738B',
|
| 785 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color' => '#ffffff',
|
| 786 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size' => 15,
|
| 787 |
+
//posterboard
|
| 788 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color' => '#585858',
|
| 789 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color' => '#ffffff',
|
| 790 |
+
//pagination
|
| 791 |
+
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color' => '#ffffff',
|
| 792 |
+
ECWD_PLUGIN_PREFIX . '_current_page_bg_color' => '#10738B',
|
| 793 |
+
ECWD_PLUGIN_PREFIX . '_page_number_color' => '#A5A5A5',
|
| 794 |
+
);
|
| 795 |
+
|
| 796 |
+
if (isset($_REQUEST['theme']) && $_REQUEST['theme'] == 'reset') {
|
| 797 |
+
$data = json_encode($default_theme);
|
| 798 |
+
update_post_meta($post_id, self::THEME_POST_TYPE . '_params', $data);
|
| 799 |
+
//wp_redirect('post.php?post='.$post_id.'&action=edit');
|
| 800 |
+
}
|
| 801 |
+
|
| 802 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-theme-meta.php' );
|
| 803 |
+
}
|
| 804 |
+
|
| 805 |
+
/**
|
| 806 |
+
* Add Themes post meta
|
| 807 |
+
*/
|
| 808 |
+
public function venues_cpt_meta() {
|
| 809 |
+
add_meta_box(ECWD_PLUGIN_PREFIX . '_theme_meta', __('Venue Location', 'ecwd'), array(
|
| 810 |
+
$this,
|
| 811 |
+
'display_venue_meta'
|
| 812 |
+
), ECWD_PLUGIN_PREFIX . '_venue', 'advanced', 'core');
|
| 813 |
+
}
|
| 814 |
+
|
| 815 |
+
/**
|
| 816 |
+
* Display Theme post meta
|
| 817 |
+
*/
|
| 818 |
+
public function display_venue_meta() {
|
| 819 |
+
$ip_addr = $_SERVER['REMOTE_ADDR'];
|
| 820 |
+
$lat = '';
|
| 821 |
+
$long = '';
|
| 822 |
+
|
| 823 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-venue-meta.php' );
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
//order orgs and venues by post name
|
| 827 |
+
function ecwd_archive_order($vars) {
|
| 828 |
+
global $ecwd_options;
|
| 829 |
+
$orderby = isset($ecwd_options['cpt_order']) ? $ecwd_options['cpt_order'] : 'post_name';
|
| 830 |
+
$types = array(self::ORGANIZER_POST_TYPE, self::VENUE_POST_TYPE);
|
| 831 |
+
if (!is_admin() && isset($vars['post_type']) && is_post_type_hierarchical($vars['post_type']) && in_array($vars['post_type'], $types)) {
|
| 832 |
+
$vars['orderby'] = $orderby;
|
| 833 |
+
$vars['order'] = 'ASC';
|
| 834 |
+
}
|
| 835 |
+
|
| 836 |
+
return $vars;
|
| 837 |
+
}
|
| 838 |
+
|
| 839 |
+
public function save_events() {
|
| 840 |
+
$status = 'error';
|
| 841 |
+
if (isset($_POST[ECWD_PLUGIN_PREFIX . '_event_id']) && isset($_POST[ECWD_PLUGIN_PREFIX . '_calendar_id']) && isset($_POST[ECWD_PLUGIN_PREFIX . '_action'])) {
|
| 842 |
+
$event_id = esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_event_id']);
|
| 843 |
+
$calendar_id = esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_calendar_id']);
|
| 844 |
+
$event_calendars = get_post_meta($event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', true);
|
| 845 |
+
if (!$event_calendars) {
|
| 846 |
+
$event_calendars = array();
|
| 847 |
+
}
|
| 848 |
+
if ($_POST[ECWD_PLUGIN_PREFIX . '_action'] == 'delete') {
|
| 849 |
+
if (is_array($event_calendars) && in_array($calendar_id, $event_calendars)) {
|
| 850 |
+
unset($event_calendars[array_search($calendar_id, $event_calendars)]);
|
| 851 |
+
$status = 'ok';
|
| 852 |
+
}
|
| 853 |
+
} elseif (esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_action']) == 'add') {
|
| 854 |
+
if (is_array($event_calendars) && !in_array($calendar_id, $event_calendars)) {
|
| 855 |
+
$event_calendars[] = $calendar_id;
|
| 856 |
+
$status = 'ok';
|
| 857 |
+
}
|
| 858 |
+
}
|
| 859 |
+
update_post_meta($event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', $event_calendars);
|
| 860 |
+
}
|
| 861 |
+
echo json_encode(array('status' => $status));
|
| 862 |
+
wp_die();
|
| 863 |
+
}
|
| 864 |
+
|
| 865 |
+
public function add_event() {
|
| 866 |
+
$status = 'error';
|
| 867 |
+
$data = '';
|
| 868 |
+
if (isset($_POST[ECWD_PLUGIN_PREFIX . '_calendar_id'])) {
|
| 869 |
+
$calendar_id = esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_calendar_id']);
|
| 870 |
+
$new_event = array(
|
| 871 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_event',
|
| 872 |
+
'post_title' => esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_event_name'])
|
| 873 |
+
);
|
| 874 |
+
$new_event_id = wp_insert_post($new_event);
|
| 875 |
+
if ($new_event_id) {
|
| 876 |
+
update_post_meta($new_event_id, ECWD_PLUGIN_PREFIX . '_event_date_from', esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_event_date_from']));
|
| 877 |
+
update_post_meta($new_event_id, ECWD_PLUGIN_PREFIX . '_event_date_to', esc_attr($_POST[ECWD_PLUGIN_PREFIX . '_event_date_to']));
|
| 878 |
+
update_post_meta($new_event_id, ECWD_PLUGIN_PREFIX . '_event_calendars', array($calendar_id));
|
| 879 |
+
$status = 'success';
|
| 880 |
+
$data = array('event_id' => $new_event_id);
|
| 881 |
+
}
|
| 882 |
+
}
|
| 883 |
+
echo json_encode(array('status' => $status, 'data' => $data));
|
| 884 |
+
wp_die();
|
| 885 |
+
}
|
| 886 |
+
|
| 887 |
+
/**
|
| 888 |
+
* Function to save post meta for the event CPT
|
| 889 |
+
*/
|
| 890 |
+
public function save_meta($post_id, $post) {
|
| 891 |
+
if (( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || ( defined('DOING_AJAX') && DOING_AJAX )) {
|
| 892 |
+
return $post_id;
|
| 893 |
+
}
|
| 894 |
+
if (isset($_REQUEST['bulk_edit'])) {
|
| 895 |
+
return $post_id;
|
| 896 |
+
}
|
| 897 |
+
if (wp_is_post_revision($post_id)) {
|
| 898 |
+
return $post_id;
|
| 899 |
+
}
|
| 900 |
+
|
| 901 |
+
$types = array(
|
| 902 |
+
ECWD_PLUGIN_PREFIX . '_calendar',
|
| 903 |
+
ECWD_PLUGIN_PREFIX . '_event',
|
| 904 |
+
ECWD_PLUGIN_PREFIX . '_theme',
|
| 905 |
+
ECWD_PLUGIN_PREFIX . '_venue'
|
| 906 |
+
);
|
| 907 |
+
|
| 908 |
+
// If this isn't a post, don't update it.
|
| 909 |
+
if (!in_array($post->post_type, $types)) {
|
| 910 |
+
return $post_id;
|
| 911 |
+
}
|
| 912 |
+
$post_type = get_post_type($post_id);
|
| 913 |
+
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_calendar'] = array(
|
| 914 |
+
ECWD_PLUGIN_PREFIX . '_calendar_description',
|
| 915 |
+
ECWD_PLUGIN_PREFIX . '_calendar_id',
|
| 916 |
+
ECWD_PLUGIN_PREFIX . '_calendar_default_year',
|
| 917 |
+
ECWD_PLUGIN_PREFIX . '_calendar_default_month',
|
| 918 |
+
ECWD_PLUGIN_PREFIX . '_calendar_12_hour_time_format',
|
| 919 |
+
ECWD_PLUGIN_PREFIX . '_calendar_theme',
|
| 920 |
+
ECWD_PLUGIN_PREFIX . '_facebook_page_id',
|
| 921 |
+
ECWD_PLUGIN_PREFIX . '_facebook_access_token',
|
| 922 |
+
ECWD_PLUGIN_PREFIX . '_calendar_ical',
|
| 923 |
+
);
|
| 924 |
+
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_event'] = array(
|
| 925 |
+
ECWD_PLUGIN_PREFIX . '_event_location',
|
| 926 |
+
ECWD_PLUGIN_PREFIX . '_event_venue',
|
| 927 |
+
ECWD_PLUGIN_PREFIX . '_lat_long',
|
| 928 |
+
ECWD_PLUGIN_PREFIX . '_event_show_map',
|
| 929 |
+
ECWD_PLUGIN_PREFIX . '_map_zoom',
|
| 930 |
+
ECWD_PLUGIN_PREFIX . '_event_date_from',
|
| 931 |
+
ECWD_PLUGIN_PREFIX . '_event_date_to',
|
| 932 |
+
ECWD_PLUGIN_PREFIX . '_event_url',
|
| 933 |
+
ECWD_PLUGIN_PREFIX . '_event_calendars',
|
| 934 |
+
ECWD_PLUGIN_PREFIX . '_event_organizers',
|
| 935 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_event',
|
| 936 |
+
ECWD_PLUGIN_PREFIX . '_event_day',
|
| 937 |
+
ECWD_PLUGIN_PREFIX . '_all_day_event',
|
| 938 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_how',
|
| 939 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_month_on_days',
|
| 940 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_year_on_days',
|
| 941 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_m',
|
| 942 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_on_the_y',
|
| 943 |
+
ECWD_PLUGIN_PREFIX . '_monthly_list_monthly',
|
| 944 |
+
ECWD_PLUGIN_PREFIX . '_monthly_week_monthly',
|
| 945 |
+
ECWD_PLUGIN_PREFIX . '_monthly_list_yearly',
|
| 946 |
+
ECWD_PLUGIN_PREFIX . '_monthly_week_yearly',
|
| 947 |
+
ECWD_PLUGIN_PREFIX . '_event_repeat_repeat_until',
|
| 948 |
+
ECWD_PLUGIN_PREFIX . '_event_year_month',
|
| 949 |
+
ECWD_PLUGIN_PREFIX . '_event_video',
|
| 950 |
+
);
|
| 951 |
+
|
| 952 |
+
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_theme'] = array(
|
| 953 |
+
//general
|
| 954 |
+
ECWD_PLUGIN_PREFIX . '_width',
|
| 955 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_color',
|
| 956 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_width',
|
| 957 |
+
ECWD_PLUGIN_PREFIX . '_cal_border_radius',
|
| 958 |
+
//header
|
| 959 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_color',
|
| 960 |
+
ECWD_PLUGIN_PREFIX . '_cal_header_border_color',
|
| 961 |
+
ECWD_PLUGIN_PREFIX . '_current_year_color',
|
| 962 |
+
ECWD_PLUGIN_PREFIX . '_current_year_font_size',
|
| 963 |
+
ECWD_PLUGIN_PREFIX . '_current_month_color',
|
| 964 |
+
ECWD_PLUGIN_PREFIX . '_current_month_font_size',
|
| 965 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_color',
|
| 966 |
+
ECWD_PLUGIN_PREFIX . '_next_prev_font_size',
|
| 967 |
+
//views
|
| 968 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_bg_color',
|
| 969 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_border_color',
|
| 970 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_color',
|
| 971 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_text_color',
|
| 972 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_font_size',
|
| 973 |
+
ECWD_PLUGIN_PREFIX . '_view_tabs_current_text_color',
|
| 974 |
+
//search
|
| 975 |
+
ECWD_PLUGIN_PREFIX . '_search_bg_color',
|
| 976 |
+
ECWD_PLUGIN_PREFIX . '_search_icon_color',
|
| 977 |
+
//filter
|
| 978 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_bg_color',
|
| 979 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_bg_color',
|
| 980 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_text_color',
|
| 981 |
+
ECWD_PLUGIN_PREFIX . '_filter_header_left_text_color',
|
| 982 |
+
ECWD_PLUGIN_PREFIX . '_filter_bg_color',
|
| 983 |
+
ECWD_PLUGIN_PREFIX . '_filter_border_color',
|
| 984 |
+
ECWD_PLUGIN_PREFIX . '_filter_arrow_color',
|
| 985 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_text_color',
|
| 986 |
+
ECWD_PLUGIN_PREFIX . '_filter_reset_font_size',
|
| 987 |
+
ECWD_PLUGIN_PREFIX . '_filter_text_color',
|
| 988 |
+
ECWD_PLUGIN_PREFIX . '_filter_font_size',
|
| 989 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_bg_color',
|
| 990 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_border_color',
|
| 991 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_text_color',
|
| 992 |
+
ECWD_PLUGIN_PREFIX . '_filter_item_font_size',
|
| 993 |
+
//week days
|
| 994 |
+
ECWD_PLUGIN_PREFIX . '_week_days_bg_color',
|
| 995 |
+
ECWD_PLUGIN_PREFIX . '_week_days_border_color',
|
| 996 |
+
ECWD_PLUGIN_PREFIX . '_week_days_text_color',
|
| 997 |
+
ECWD_PLUGIN_PREFIX . '_week_days_font_size',
|
| 998 |
+
//days
|
| 999 |
+
ECWD_PLUGIN_PREFIX . '_cell_bg_color',
|
| 1000 |
+
ECWD_PLUGIN_PREFIX . '_cell_weekend_bg_color',
|
| 1001 |
+
ECWD_PLUGIN_PREFIX . '_cell_prev_next_bg_color',
|
| 1002 |
+
ECWD_PLUGIN_PREFIX . '_cell_border_color',
|
| 1003 |
+
ECWD_PLUGIN_PREFIX . '_day_number_bg_color',
|
| 1004 |
+
ECWD_PLUGIN_PREFIX . '_day_text_color',
|
| 1005 |
+
ECWD_PLUGIN_PREFIX . '_day_font_size',
|
| 1006 |
+
ECWD_PLUGIN_PREFIX . '_current_day_cell_bg_color',
|
| 1007 |
+
ECWD_PLUGIN_PREFIX . '_current_day_number_bg_color',
|
| 1008 |
+
ECWD_PLUGIN_PREFIX . '_current_day_text_color',
|
| 1009 |
+
//events
|
| 1010 |
+
ECWD_PLUGIN_PREFIX . '_event_title_color',
|
| 1011 |
+
ECWD_PLUGIN_PREFIX . '_event_title_font_size',
|
| 1012 |
+
ECWD_PLUGIN_PREFIX . '_event_details_bg_color',
|
| 1013 |
+
ECWD_PLUGIN_PREFIX . '_event_details_border_color',
|
| 1014 |
+
ECWD_PLUGIN_PREFIX . '_event_details_text_color',
|
| 1015 |
+
//ECWD_PLUGIN_PREFIX . '_event_details_font_size',
|
| 1016 |
+
//events list view
|
| 1017 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_bg_color',
|
| 1018 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_text_color',
|
| 1019 |
+
ECWD_PLUGIN_PREFIX . '_event_list_view_date_font_size',
|
| 1020 |
+
//posterboard
|
| 1021 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_bg_color',
|
| 1022 |
+
ECWD_PLUGIN_PREFIX . '_event_posterboard_view_date_text_color',
|
| 1023 |
+
//pagination
|
| 1024 |
+
ECWD_PLUGIN_PREFIX . '_page_numbers_bg_color',
|
| 1025 |
+
ECWD_PLUGIN_PREFIX . '_current_page_bg_color',
|
| 1026 |
+
ECWD_PLUGIN_PREFIX . '_page_number_color',
|
| 1027 |
+
);
|
| 1028 |
+
$ecwd_post_meta_fields[ECWD_PLUGIN_PREFIX . '_venue'] = array(
|
| 1029 |
+
ECWD_PLUGIN_PREFIX . '_venue_location',
|
| 1030 |
+
ECWD_PLUGIN_PREFIX . '_venue_lat_long',
|
| 1031 |
+
ECWD_PLUGIN_PREFIX . '_map_zoom',
|
| 1032 |
+
);
|
| 1033 |
+
|
| 1034 |
+
$ecwd_post_meta_fields[$post_type] = apply_filters($post_type . '_meta', $ecwd_post_meta_fields[$post_type]);
|
| 1035 |
+
|
| 1036 |
+
if (current_user_can('edit_post', $post_id)) {
|
| 1037 |
+
if ($post_type == ECWD_PLUGIN_PREFIX . '_event' && !isset($_POST[ECWD_PLUGIN_PREFIX . '_event_show_map'])) {
|
| 1038 |
+
$_POST[ECWD_PLUGIN_PREFIX . '_event_show_map'] = 'no';
|
| 1039 |
+
}
|
| 1040 |
+
// Loop through our array and make sure it is posted and not empty in order to update it, otherwise we delete it
|
| 1041 |
+
if ($post_type == ECWD_PLUGIN_PREFIX . '_theme') {
|
| 1042 |
+
$values = array();
|
| 1043 |
+
$data = json_encode($values);
|
| 1044 |
+
update_post_meta($post_id, $post_type . '_params', $data);
|
| 1045 |
+
} else {
|
| 1046 |
+
foreach ($ecwd_post_meta_fields[$post_type] as $pmf) {
|
| 1047 |
+
if (isset($_POST[$pmf]) && !empty($_POST[$pmf])) {
|
| 1048 |
+
if ($post_type == ECWD_PLUGIN_PREFIX . '_calendar') {
|
| 1049 |
+
if ($pmf == ECWD_PLUGIN_PREFIX . '_calendar_id') {
|
| 1050 |
+
$str = $_POST[$pmf];
|
| 1051 |
+
$id = str_replace('https://www.google.com/calendar/feeds/', '', $str);
|
| 1052 |
+
$id = str_replace('/public/basic', '', $id);
|
| 1053 |
+
$id = str_replace('%40', '@', $id);
|
| 1054 |
+
|
| 1055 |
+
update_post_meta($post_id, $pmf, trim($id));
|
| 1056 |
+
} else {
|
| 1057 |
+
update_post_meta($post_id, $pmf, stripslashes($_POST[$pmf]));
|
| 1058 |
}
|
| 1059 |
+
} else {
|
| 1060 |
+
|
| 1061 |
+
if (!is_array($_POST[$pmf])) {
|
| 1062 |
+
$value = stripslashes($_POST[$pmf]);
|
| 1063 |
+
} else {
|
| 1064 |
+
$value = $_POST[$pmf];
|
| 1065 |
+
}
|
| 1066 |
+
update_post_meta($post_id, $pmf, $value);
|
| 1067 |
}
|
| 1068 |
+
} else {
|
| 1069 |
+
delete_post_meta($post_id, $pmf);
|
| 1070 |
+
}
|
| 1071 |
+
}
|
| 1072 |
+
}
|
| 1073 |
+
}
|
| 1074 |
+
|
| 1075 |
+
|
| 1076 |
+
return $post_id;
|
| 1077 |
+
}
|
| 1078 |
+
|
| 1079 |
+
public function error_messages($m) {
|
| 1080 |
+
global $post;
|
| 1081 |
+
|
| 1082 |
+
return $m;
|
| 1083 |
+
}
|
| 1084 |
+
|
| 1085 |
+
public function calendar_add_column_headers($defaults) {
|
| 1086 |
+
|
| 1087 |
+
$new_columns = array(
|
| 1088 |
+
'cb' => $defaults['cb'],
|
| 1089 |
+
'calendar-id' => __('Calendar ID', 'ecwd'),
|
| 1090 |
+
'calendar-sc' => __('Calendar Shortcode', 'ecwd'),
|
| 1091 |
+
);
|
| 1092 |
+
|
| 1093 |
+
return array_merge($defaults, $new_columns);
|
| 1094 |
+
}
|
| 1095 |
+
|
| 1096 |
+
public function add_column_headers($defaults) {
|
| 1097 |
+
|
| 1098 |
+
$new_columns = array(
|
| 1099 |
+
'cb' => $defaults['cb'],
|
| 1100 |
+
'event-id' => __('Event Dates', 'ecwd')
|
| 1101 |
+
);
|
| 1102 |
+
|
| 1103 |
+
return array_merge($defaults, $new_columns);
|
| 1104 |
+
}
|
| 1105 |
+
|
| 1106 |
+
/**
|
| 1107 |
+
* Fill out the calendar columns
|
| 1108 |
+
*/
|
| 1109 |
+
public function calendar_column_content($column_name, $post_ID) {
|
| 1110 |
+
|
| 1111 |
+
switch ($column_name) {
|
| 1112 |
+
|
| 1113 |
+
case 'calendar-id':
|
| 1114 |
+
echo $post_ID;
|
| 1115 |
+
break;
|
| 1116 |
+
case 'calendar-sc':
|
| 1117 |
+
echo '<code>[ecwd id="' . $post_ID . '"]</code>';
|
| 1118 |
+
break;
|
| 1119 |
+
}
|
| 1120 |
+
}
|
| 1121 |
+
|
| 1122 |
+
/**
|
| 1123 |
+
* Fill out the events columns
|
| 1124 |
+
*/
|
| 1125 |
+
public function event_column_content($column_name, $post_ID) {
|
| 1126 |
+
switch ($column_name) {
|
| 1127 |
+
case 'event-id':
|
| 1128 |
+
$start = get_post_meta($post_ID, ECWD_PLUGIN_PREFIX . '_event_date_from', true);
|
| 1129 |
+
$end = get_post_meta($post_ID, ECWD_PLUGIN_PREFIX . '_event_date_to', true);
|
| 1130 |
+
if ($start) {
|
| 1131 |
+
echo date('Y/m/d', strtotime($start));
|
| 1132 |
+
echo ' - ' . date('Y/m/d', strtotime($end));
|
| 1133 |
+
} else {
|
| 1134 |
+
echo 'No dates';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1135 |
}
|
| 1136 |
+
break;
|
| 1137 |
+
}
|
| 1138 |
+
}
|
| 1139 |
+
|
| 1140 |
+
function create_taxonomies() {
|
| 1141 |
+
// Add new taxonomy, make it hierarchical (like categories)
|
| 1142 |
+
global $ecwd_options;
|
| 1143 |
+
$slug = (isset($ecwd_options['category_archive_slug']) && $ecwd_options['category_archive_slug'] != "") ? $ecwd_options['category_archive_slug'] : 'event_category';
|
| 1144 |
+
|
| 1145 |
+
$labels = array(
|
| 1146 |
+
'name' => _x('Event Categories', 'taxonomy general name', 'ecwd'),
|
| 1147 |
+
'singular_name' => _x('Event Category', 'taxonomy singular name', 'ecwd'),
|
| 1148 |
+
'search_items' => __('Search Event Categories', 'ecwd'),
|
| 1149 |
+
'all_items' => __('All Event Categories', 'ecwd'),
|
| 1150 |
+
'parent_item' => __('Parent Category', 'ecwd'),
|
| 1151 |
+
'parent_item_colon' => __('Parent Category:', 'ecwd'),
|
| 1152 |
+
'edit_item' => __('Edit Category', 'ecwd'),
|
| 1153 |
+
'update_item' => __('Update Category', 'ecwd'),
|
| 1154 |
+
'add_new_item' => __('Add New Event Category', 'ecwd'),
|
| 1155 |
+
'new_item_name' => __('New Event Category Name', 'ecwd'),
|
| 1156 |
+
'menu_name' => __('Event Categories', 'ecwd'),
|
| 1157 |
+
);
|
| 1158 |
+
|
| 1159 |
+
$args = array(
|
| 1160 |
+
'hierarchical' => true,
|
| 1161 |
+
'labels' => $labels,
|
| 1162 |
+
'show_ui' => true,
|
| 1163 |
+
'show_admin_column' => true,
|
| 1164 |
+
'query_var' => true,
|
| 1165 |
+
'rewrite' => array('slug' => $slug),
|
| 1166 |
+
);
|
| 1167 |
+
//register_taxonomy_for_object_type(ECWD_PLUGIN_PREFIX.'_event_category', array(ECWD_PLUGIN_PREFIX.'_event'));
|
| 1168 |
+
register_taxonomy(ECWD_PLUGIN_PREFIX . '_event_category', array(ECWD_PLUGIN_PREFIX . '_event'), $args);
|
| 1169 |
+
|
| 1170 |
+
register_taxonomy(
|
| 1171 |
+
ECWD_PLUGIN_PREFIX . '_event_tag', ECWD_PLUGIN_PREFIX . '_event', array(
|
| 1172 |
+
'hierarchical' => false,
|
| 1173 |
+
'label' => __('Event Tags', 'ecwd'),
|
| 1174 |
+
'singular_name' => __('Event Tag', 'ecwd'),
|
| 1175 |
+
'rewrite' => array('slug' => 'event_tag'),
|
| 1176 |
+
'query_var' => true
|
| 1177 |
+
)
|
| 1178 |
+
);
|
| 1179 |
+
}
|
| 1180 |
+
|
| 1181 |
+
/*
|
| 1182 |
+
* Add metas to events categories
|
| 1183 |
+
*
|
| 1184 |
+
* */
|
| 1185 |
+
|
| 1186 |
+
public function add_categories_metas($term) {
|
| 1187 |
+
$tax = $this->tax;
|
| 1188 |
+
$uploadID = '';
|
| 1189 |
+
$icon = '';
|
| 1190 |
+
$term_id = '';
|
| 1191 |
+
$term_meta = array();
|
| 1192 |
+
$term_meta['color'] = '';
|
| 1193 |
+
$term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image'] = '';
|
| 1194 |
+
if ($term && is_object($term)) {
|
| 1195 |
+
$term_id = $term->term_id;
|
| 1196 |
+
$term_meta = get_option("{$this->tax}_$term_id");
|
| 1197 |
+
$term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image'] = $this->get_image_url($term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image']);
|
| 1198 |
+
//var_dump($term_meta);
|
| 1199 |
+
}
|
| 1200 |
+
include_once( ECWD_DIR . '/views/admin/ecwd-event-cat-meta.php' );
|
| 1201 |
+
}
|
| 1202 |
+
|
| 1203 |
+
public function get_image_url($url, $size = null, $return_placeholder = false) {
|
| 1204 |
+
|
| 1205 |
|
| 1206 |
+
$taxonomy_image_url = $url;
|
| 1207 |
+
if (!empty($taxonomy_image_url)) {
|
| 1208 |
+
$attachment_id = $this->get_attachment_id_by_url($taxonomy_image_url);
|
| 1209 |
+
if (!empty($attachment_id)) {
|
| 1210 |
+
if (empty($size)) {
|
| 1211 |
+
$size = 'full';
|
| 1212 |
+
}
|
| 1213 |
+
$taxonomy_image_url = wp_get_attachment_image_src($attachment_id, $size);
|
| 1214 |
+
$taxonomy_image_url = $taxonomy_image_url[0];
|
| 1215 |
}
|
| 1216 |
}
|
| 1217 |
|
| 1218 |
+
if ($return_placeholder) {
|
| 1219 |
+
return ( $taxonomy_image_url != '' ) ? $taxonomy_image_url : self::IMAGE_PLACEHOLDER;
|
| 1220 |
+
} else {
|
| 1221 |
+
return $taxonomy_image_url;
|
| 1222 |
+
}
|
| 1223 |
+
}
|
| 1224 |
+
|
| 1225 |
+
public function get_attachment_id_by_url($image_src) {
|
| 1226 |
+
global $wpdb;
|
| 1227 |
+
$query = "SELECT ID FROM {$wpdb->posts} WHERE guid = '$image_src'";
|
| 1228 |
+
$id = $wpdb->get_var($query);
|
| 1229 |
+
|
| 1230 |
+
return (!empty($id) ) ? $id : null;
|
| 1231 |
+
}
|
| 1232 |
+
|
| 1233 |
+
public function save_categories_metas($term_id) {
|
| 1234 |
+
//var_dump($_POST); die;
|
| 1235 |
+
if (isset($_POST[$this->tax])) {
|
| 1236 |
+
|
| 1237 |
+
$t_id = $term_id;
|
| 1238 |
+
$term_meta = get_option("{$this->tax}_$t_id");
|
| 1239 |
+
$cat_keys = array_keys($_POST[$this->tax]);
|
| 1240 |
+
foreach ($cat_keys as $key) {
|
| 1241 |
+
if (isset($_POST[$this->tax][$key])) {
|
| 1242 |
+
$term_meta[$key] = esc_attr($_POST[$this->tax][$key]);
|
| 1243 |
+
}
|
| 1244 |
+
}
|
| 1245 |
+
//save the option array
|
| 1246 |
+
update_option("{$this->tax}_$t_id", $term_meta);
|
| 1247 |
+
}
|
| 1248 |
+
}
|
| 1249 |
+
|
| 1250 |
+
public function taxonomy_columns($columns) {
|
| 1251 |
+
$new_columns = array();
|
| 1252 |
+
$new_columns['cb'] = $columns['cb'];
|
| 1253 |
+
$new_columns['thumb'] = __('Icon', 'ecwd');
|
| 1254 |
+
$new_columns['color'] = __('Color', 'ecwd');
|
| 1255 |
+
|
| 1256 |
+
unset($columns['cb']);
|
| 1257 |
+
|
| 1258 |
+
return array_merge($new_columns, $columns);
|
| 1259 |
+
}
|
| 1260 |
+
|
| 1261 |
+
public function taxonomy_column($columns, $column, $id) {
|
| 1262 |
+
$term_meta = get_option("{$this->tax}_$id");
|
| 1263 |
+
if (!$term_meta) {
|
| 1264 |
+
$term_meta = array(
|
| 1265 |
+
ECWD_PLUGIN_PREFIX . '_taxonomy_image' => '',
|
| 1266 |
+
'color' => ''
|
| 1267 |
+
);
|
| 1268 |
+
}
|
| 1269 |
+
if ($column == 'thumb') {
|
| 1270 |
+
$term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image'] = $this->get_image_url($term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image']);
|
| 1271 |
+
$columns = '<div><img src="' . $this->get_image_url($term_meta[ECWD_PLUGIN_PREFIX . '_taxonomy_image'], null, true) . '" alt="' . __('Icon', 'ecwd') . '" class="wp-post-image ecwd_icon" /></div>';
|
| 1272 |
+
}
|
| 1273 |
+
if ($column == 'color') {
|
| 1274 |
+
$columns .= '<div><div style="width: 10px; height: 10px; background-color: ' . $term_meta['color'] . '" ></div></div>';
|
| 1275 |
+
}
|
| 1276 |
+
|
| 1277 |
+
return $columns;
|
| 1278 |
+
}
|
| 1279 |
+
|
| 1280 |
+
public function event_restrict_manage() {
|
| 1281 |
+
include_once 'ecwd-cpt-filter.php';
|
| 1282 |
+
new Tax_CTP_Filter(
|
| 1283 |
+
array(
|
| 1284 |
+
self::EVENT_POST_TYPE => array(
|
| 1285 |
+
ECWD_PLUGIN_PREFIX . '_calendar',
|
| 1286 |
+
ECWD_PLUGIN_PREFIX . '_event_category',
|
| 1287 |
+
ECWD_PLUGIN_PREFIX . '_organizer',
|
| 1288 |
+
ECWD_PLUGIN_PREFIX . '_venue',
|
| 1289 |
+
ECWD_PLUGIN_PREFIX . '_event_tag'
|
| 1290 |
+
)
|
| 1291 |
+
)
|
| 1292 |
+
);
|
| 1293 |
+
}
|
| 1294 |
+
|
| 1295 |
+
public function get_ecwd_calendars() {
|
| 1296 |
+
$args = array(
|
| 1297 |
+
'numberposts' => - 1,
|
| 1298 |
+
'post_type' => ECWD_PLUGIN_PREFIX . '_calendar'
|
| 1299 |
+
);
|
| 1300 |
+
$calendars = get_posts($args);
|
| 1301 |
|
| 1302 |
+
return $calendars;
|
| 1303 |
+
}
|
| 1304 |
+
|
| 1305 |
+
public function ecwd_templates($template) {
|
| 1306 |
+
$post_types = array(self::EVENT_POST_TYPE);
|
| 1307 |
+
if (is_singular($post_types) && !file_exists(get_stylesheet_directory() . '/single-event.php')) {
|
| 1308 |
+
$template = ECWD_DIR . '/views/single-event.php';
|
| 1309 |
+
} elseif (is_tax('ecwd_event_category')) {
|
| 1310 |
+
$template = ECWD_DIR . '/views/taxonomy-ecwd_event_category.php';
|
| 1311 |
+
}
|
| 1312 |
+
|
| 1313 |
+
return $template;
|
| 1314 |
+
}
|
| 1315 |
+
|
| 1316 |
+
public function category_archive_page_query($query) {
|
| 1317 |
+
if (is_tax('ecwd_event_category') === true) {
|
| 1318 |
+
$query->query_vars['posts_per_page'] = 5;
|
| 1319 |
+
}
|
| 1320 |
+
}
|
| 1321 |
+
|
| 1322 |
+
public function delete_transient() {
|
| 1323 |
+
try {
|
| 1324 |
+
$calendars = $this->get_ecwd_calendars();
|
| 1325 |
+
foreach ($calendars as $calendar) {
|
| 1326 |
+
$ecwd_facebook_page_id = get_post_meta($calendar->ID, ECWD_PLUGIN_PREFIX . '_facebook_page_id', true);
|
| 1327 |
+
$ecwd_calendar_id = get_post_meta($calendar->ID, ECWD_PLUGIN_PREFIX . '_calendar_id', true);
|
| 1328 |
+
$ecwd_calendar_ical = get_post_meta($calendar->ID, ECWD_PLUGIN_PREFIX . '_calendar_ical', true);
|
| 1329 |
+
if ($ecwd_facebook_page_id) {
|
| 1330 |
+
delete_transient(substr(ECWD_PLUGIN_PREFIX . '_calendar_' . $ecwd_facebook_page_id, 0, 30));
|
| 1331 |
+
}
|
| 1332 |
+
if ($ecwd_calendar_id) {
|
| 1333 |
+
delete_transient(substr(ECWD_PLUGIN_PREFIX . '_calendar_' . $ecwd_calendar_id, 0, 30));
|
| 1334 |
+
}
|
| 1335 |
+
if ($ecwd_calendar_ical) {
|
| 1336 |
+
delete_transient(substr(ECWD_PLUGIN_PREFIX . '_calendar_' . $ecwd_calendar_ical, 0, 30));
|
| 1337 |
+
}
|
| 1338 |
+
}
|
| 1339 |
+
|
| 1340 |
+
return true;
|
| 1341 |
+
} catch (Exception $e) {
|
| 1342 |
+
//add log
|
| 1343 |
+
return false;
|
| 1344 |
+
}
|
| 1345 |
+
}
|
| 1346 |
+
|
| 1347 |
+
private function is() {
|
| 1348 |
+
if (1 == get_option('ecwd_old_events')) {
|
| 1349 |
+
return true;
|
| 1350 |
+
} else {
|
| 1351 |
+
return false;
|
| 1352 |
+
}
|
| 1353 |
+
}
|
| 1354 |
+
|
| 1355 |
+
public static function get_instance() {
|
| 1356 |
+
if (null == self::$instance) {
|
| 1357 |
+
self::$instance = new self;
|
| 1358 |
+
}
|
| 1359 |
+
|
| 1360 |
+
return self::$instance;
|
| 1361 |
+
}
|
| 1362 |
+
|
| 1363 |
+
}
|
includes/ecwd_config.php
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class ECWD_Config {
|
| 4 |
+
|
| 5 |
+
protected static $instance = null;
|
| 6 |
+
private $file_name = 'ecwd_config.json';
|
| 7 |
+
private $file_dir = '';
|
| 8 |
+
private $response = array();
|
| 9 |
+
private $config = array();
|
| 10 |
+
private $show_config_submenu = false;
|
| 11 |
+
public $is_writable = false;
|
| 12 |
+
|
| 13 |
+
private function __construct() {
|
| 14 |
+
$this->set_show_config_submenu();
|
| 15 |
+
$this->set_file_path();
|
| 16 |
+
$this->get_file_data();
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
private function get_file_data() {
|
| 20 |
+
if ($this->is_writable) {
|
| 21 |
+
$file_content = file_get_contents($this->file_dir);
|
| 22 |
+
if ($file_content != '') {
|
| 23 |
+
$this->config = json_decode($file_content, true);
|
| 24 |
+
} else {
|
| 25 |
+
$this->set_default_configs();
|
| 26 |
+
file_put_contents($this->file_dir, json_encode($this->config));
|
| 27 |
+
}
|
| 28 |
+
} else {
|
| 29 |
+
$this->set_default_configs();
|
| 30 |
+
$this->add_response('Writable chi ' . $this->file_dir);
|
| 31 |
+
}
|
| 32 |
+
$this->set_data_to_global();
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
private function set_default_configs() {
|
| 36 |
+
$file_content = file_get_contents(ECWD_DIR . '/config/config.json');
|
| 37 |
+
$this->config = json_decode($file_content, true);
|
| 38 |
+
$this->import_from_settings();
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
private function add_response($response) {
|
| 42 |
+
$this->response[] = $response;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
private function set_file_path() {
|
| 46 |
+
$upload_dir = wp_upload_dir(__FILE__);
|
| 47 |
+
$dir = $upload_dir['basedir'] . '/wd_configs/';
|
| 48 |
+
$this->file_dir = $dir . $this->file_name;
|
| 49 |
+
if (!is_dir($dir)) {
|
| 50 |
+
mkdir($dir, 0777,true);
|
| 51 |
+
chmod($dir, 0777);
|
| 52 |
+
$fp = fopen($this->file_dir, 'w');
|
| 53 |
+
|
| 54 |
+
}
|
| 55 |
+
$this->is_writable = is_writable($dir);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
private function set_show_config_submenu() {
|
| 59 |
+
if (isset($_GET['ecwd_config'])) {
|
| 60 |
+
if ($_GET['ecwd_config'] == 'on') {
|
| 61 |
+
add_option('ecwd_config', 'on');
|
| 62 |
+
} else if ($_GET['ecwd_config'] == 'off') {
|
| 63 |
+
delete_option('ecwd_config');
|
| 64 |
+
header('Location: edit.php?post_type=ecwd_calendar');
|
| 65 |
+
die;
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
$option = get_option('ecwd_config');
|
| 69 |
+
if ($option !== false && $option == 'on') {
|
| 70 |
+
$this->show_config_submenu = true;
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
private function set_data_to_global() {
|
| 75 |
+
global $ecwd_config;
|
| 76 |
+
$ecwd_config = $this->config;
|
| 77 |
+
$ecwd_config['show_config_submenu'] = $this->show_config_submenu;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
public function update_conf_file() {
|
| 81 |
+
$default_conf = file_get_contents(ECWD_DIR . '/config/config.json');
|
| 82 |
+
$default_conf = json_decode($default_conf, true);
|
| 83 |
+
if (count($default_conf) !== count($this->config) || true) {
|
| 84 |
+
foreach ($default_conf as $id => $value) {
|
| 85 |
+
if (!isset($this->config[$id])) {
|
| 86 |
+
$this->config[$id] = $value;
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
$this->import_from_settings();
|
| 90 |
+
file_put_contents($this->file_dir, json_encode($this->config));
|
| 91 |
+
}
|
| 92 |
+
$this->set_data_to_global();
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
private function import_from_settings() {
|
| 96 |
+
$opt = get_option('ecwd_settings_general');
|
| 97 |
+
if ($opt == false || !isset($opt['featured_image_for_themes'])) {
|
| 98 |
+
return;
|
| 99 |
+
}
|
| 100 |
+
$this->config['featured_image_for_themes']['value'] = $opt['featured_image_for_themes'];
|
| 101 |
+
if ($this->is_writable) {
|
| 102 |
+
unset($opt['featured_image_for_themes']);
|
| 103 |
+
update_option('ecwd_settings_general', $opt);
|
| 104 |
+
}
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
public function save_new_config($new_config) {
|
| 108 |
+
if ($this->is_writable) {
|
| 109 |
+
foreach ($new_config as $id => $value) {
|
| 110 |
+
$this->config[$id]['value'] = $value;
|
| 111 |
+
}
|
| 112 |
+
file_put_contents($this->file_dir, json_encode($this->config));
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
public function get_config() {
|
| 117 |
+
return $this->config;
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
public function get_response() {
|
| 121 |
+
return $this->response;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
public static function get_instance() {
|
| 125 |
+
if (null == self::$instance) {
|
| 126 |
+
self::$instance = new self();
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
return self::$instance;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
}
|
includes/register-settings.php
CHANGED
|
@@ -222,12 +222,12 @@ function ecwd_register_settings() {
|
|
| 222 |
'type' => 'radio',
|
| 223 |
'default' => 0
|
| 224 |
),
|
| 225 |
-
'featured_image_for_themes' => array(
|
| 226 |
-
'id' => 'featured_image_for_themes',
|
| 227 |
-
'name' => __('', 'ecwd'),
|
| 228 |
-
'desc' => 'Tick the checkbox to enable featured image for posts and pages if it does not function by default',
|
| 229 |
-
'type' => 'checkbox'
|
| 230 |
-
),
|
| 231 |
),
|
| 232 |
'category_archive' => array(
|
| 233 |
'category_archive_slug' => array(
|
| 222 |
'type' => 'radio',
|
| 223 |
'default' => 0
|
| 224 |
),
|
| 225 |
+
// 'featured_image_for_themes' => array(
|
| 226 |
+
// 'id' => 'featured_image_for_themes',
|
| 227 |
+
// 'name' => __('', 'ecwd'),
|
| 228 |
+
// 'desc' => 'Tick the checkbox to enable featured image for posts and pages if it does not function by default',
|
| 229 |
+
// 'type' => 'checkbox'
|
| 230 |
+
// ),
|
| 231 |
),
|
| 232 |
'category_archive' => array(
|
| 233 |
'category_archive_slug' => array(
|
js/scripts.js
CHANGED
|
@@ -5,48 +5,48 @@
|
|
| 5 |
*/
|
| 6 |
var functions_interval;
|
| 7 |
|
| 8 |
-
if(typeof ecwd_js_init_call !="object")
|
| 9 |
-
var ecwd_js_init_call;
|
| 10 |
-
if(typeof ecwd_js_init !="function")
|
| 11 |
-
var ecwd_js_init;
|
| 12 |
-
(function ($){
|
| 13 |
-
ecwd_js_init = function () {
|
| 14 |
ecwd_eventsOff();
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
showFilterSliderArrow();
|
|
|
|
|
|
|
|
|
|
| 29 |
}, 1);
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
showFullCalendarEventOnHover();
|
| 37 |
-
showWidgetEventDesc();
|
| 38 |
-
calendarFullResponsive();
|
| 39 |
-
showFilterSliderArrow();
|
| 40 |
-
createSearchForm();
|
| 41 |
-
upcomingEventsSlider();
|
| 42 |
-
doMasonry();
|
| 43 |
-
}, 1);
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
jQuery('.ecwd_reset_filters').click(function () {
|
| 47 |
-
jQuery(this).closest('.ecwd_filters').find('input:checkbox').attr('checked', false);
|
| 48 |
-
});
|
| 49 |
-
jQuery('.ecwd-calendar-more-event').each(function () {
|
| 50 |
jQuery(this).find('.ecwd-more-events-container').ecwd_popup({
|
| 51 |
button: jQuery(this).find('.more_events_link'),
|
| 52 |
title: jQuery(this).find('.ecwd-more-event-title').val(),
|
|
@@ -78,222 +78,223 @@ ecwd_js_init = function () {
|
|
| 78 |
}
|
| 79 |
});
|
| 80 |
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
$(main_div).find('div.ecwd_calendar').replaceWith(data);
|
| 146 |
-
|
| 147 |
-
|
| 148 |
if ($('.ecwd_open_event_popup').length > 0) {
|
| 149 |
$('.ecwd_open_event_popup').css({
|
| 150 |
'cursor': 'pointer'
|
| 151 |
-
|
| 152 |
}
|
| 153 |
})
|
| 154 |
-
|
| 155 |
-
});
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
function createSearchForm() {
|
| 159 |
-
var scinpt = document.getElementById("ecwd-search-submit");
|
| 160 |
-
if (scinpt !== null) {
|
| 161 |
-
//scinpt.addEventListener('focus', doSearch, false);
|
| 162 |
-
}
|
| 163 |
-
jQuery('.ecwd-search').on("keyup", function (e) {
|
| 164 |
-
if (e.keyCode == 13) {
|
| 165 |
-
doSearch(this);
|
| 166 |
-
}
|
| 167 |
-
});
|
| 168 |
-
jQuery('.ecwd-search-submit').on("focus", function (e) {
|
| 169 |
-
doSearch(this);
|
| 170 |
});
|
| 171 |
|
| 172 |
-
jQuery('.ecwd-tag-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 173 |
-
jQuery('.ecwd_tags').val(jQuery(this).attr("data-term-tag"));
|
| 174 |
-
doSearch(this);
|
| 175 |
-
});
|
| 176 |
-
jQuery('.ecwd-category-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 177 |
-
jQuery('.ecwd_categories').val(jQuery(this).attr("data-term-category"));
|
| 178 |
-
doSearch(this);
|
| 179 |
-
});
|
| 180 |
-
jQuery('.ecwd-venue-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 181 |
-
jQuery('.ecwd_venues').val(jQuery(this).attr("data-term-venue"));
|
| 182 |
-
doSearch(this);
|
| 183 |
-
});
|
| 184 |
-
jQuery('.ecwd-organizer-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 185 |
-
jQuery('.ecwd_organizers').val(jQuery(this).attr("data-term-organizer"));
|
| 186 |
-
doSearch(this);
|
| 187 |
-
});
|
| 188 |
-
}
|
| 189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
});
|
| 226 |
-
jQuery('.ecwd-search-submit').blur();
|
| 227 |
-
}
|
| 228 |
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
jQuery('div.ecwd_calendar .has-events').on('click', function (e) {
|
| 235 |
-
dayFull = jQuery(this).attr('data-date').split('-');
|
| 236 |
-
dayFull = dayFull[2];
|
| 237 |
-
ulEventFull = jQuery(this).find('ul.events');
|
| 238 |
-
if (parseInt(jQuery(this).closest('.ecwd_calendar').width()) <= 300 || parseInt(jQuery(window).width()) <= 768 || jQuery(this).closest('.ecwd_calendar').hasClass('ecwd-widget-mini') || $(this).closest('.ecwd_calendar').hasClass('ecwd-page-mini')) {
|
| 239 |
-
if (dayFull == jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber')
|
| 240 |
-
&& jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').is(':empty') == false) {
|
| 241 |
-
jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').html('');
|
| 242 |
-
} else {
|
| 243 |
-
showEvent(ulEventFull, this);
|
| 244 |
}
|
| 245 |
-
jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber', dayFull);
|
| 246 |
-
}
|
| 247 |
-
});
|
| 248 |
|
| 249 |
-
function showEvent(el, calendar) {
|
| 250 |
-
if (el.parent().parent().parent().parent().attr('class').indexOf("full") != -1) {
|
| 251 |
-
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(el.find('.event-details').clone().css('display', 'block'));
|
| 252 |
-
} else if (el.parent().parent().parent().parent().attr('class').indexOf("mini") != -1) {
|
| 253 |
-
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(el.clone());
|
| 254 |
}
|
| 255 |
|
| 256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
jQuery(this).find('div.event-details-container').show();
|
| 263 |
-
});
|
| 264 |
|
| 265 |
-
jQuery('div.ecwd-page-full .has-events ul.
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
});
|
| 268 |
}
|
| 269 |
|
| 270 |
-
jQuery('div.ecwd-page-full .has-events ul.more_events > li').on('click', function (e) {
|
| 271 |
-
jQuery('div.ecwd-page-full .has-events ul.more_events > li').find('.event-details-container').slideUp();
|
| 272 |
-
if(jQuery(this).find('.event-details-container').is(":visible"))
|
| 273 |
-
jQuery(this).find('.event-details-container').slideUp();
|
| 274 |
-
else
|
| 275 |
-
jQuery(this).find('.event-details-container').slideDown();
|
| 276 |
-
});
|
| 277 |
-
}
|
| 278 |
|
| 279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
if($container.length && jQuery('.ecwd-poster-board').find('.ecwd-poster-item').length>0) {
|
| 289 |
-
$container.imagesLoaded(function () {
|
| 290 |
-
$container.masonry({
|
| 291 |
-
itemSelector: '.ecwd-poster-item'
|
| 292 |
});
|
| 293 |
-
}
|
| 294 |
-
}
|
| 295 |
|
| 296 |
-
|
| 297 |
|
| 298 |
function showFilterSliderArrow() {
|
| 299 |
var li_position, li_width, last_child;
|
|
@@ -323,14 +324,14 @@ ecwd_js_init = function () {
|
|
| 323 |
$(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width - 30) / ecwd_calendar_view_visible_count);
|
| 324 |
else
|
| 325 |
$(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width) / ecwd_calendar_view_visible_count);
|
| 326 |
-
|
| 327 |
-
|
| 328 |
$(element).find('.filter-arrow-right').hide();
|
| 329 |
if (ecwd_calendar_view_tabs_width < ecwd_view_item_width * parseInt($(element).find('.filter-container ul li').length) && !($(element).find("ul li:last-child").hasClass("ecwd-selected-mode"))) {
|
| 330 |
$(element).find('.filter-arrow-right').show();
|
| 331 |
} else if ($(element).find("ul li:last-child").hasClass("ecwd-selected-mode")) {
|
| 332 |
last_child = 1;
|
| 333 |
-
}
|
| 334 |
if (ecwd_calendar_view_visible_count <= li_position && li_position != 0) {
|
| 335 |
$(element).find('ul li').css({left: "-" + ((li_position + 1 - ecwd_calendar_view_visible_count) * ecwd_view_item_width) + "px"});
|
| 336 |
$(element).find('.filter-arrow-left').show();
|
|
@@ -373,336 +374,341 @@ ecwd_js_init = function () {
|
|
| 373 |
});
|
| 374 |
}
|
| 375 |
|
| 376 |
-
|
| 377 |
-
|
| 378 |
|
| 379 |
-
|
| 380 |
-
|
| 381 |
|
| 382 |
|
| 383 |
-
|
| 384 |
-
|
| 385 |
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
}
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
var min = 0;
|
| 392 |
-
jQuery('.upcoming_events_slider .upcoming_events_item').each(function () {
|
| 393 |
-
var item_date = Date.parse(jQuery(this).data('date'));
|
| 394 |
-
if(item_date<current_date){
|
| 395 |
-
min++;
|
| 396 |
-
}else{
|
| 397 |
-
return false;
|
| 398 |
}
|
| 399 |
-
});
|
| 400 |
|
| 401 |
-
if(min && min == jQuery('.upcoming_events_slider .upcoming_events_item').length){
|
| 402 |
-
min--;
|
| 403 |
-
}
|
| 404 |
|
| 405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 406 |
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
if(parseInt(jQuery('.upcoming_events_slider .upcoming_events_item').css('left'))==-(jQuery('.upcoming_events_slider > ul').width()-upcoming_events_slider_main)){
|
| 411 |
-
jQuery('.upcoming_events_slider').parent().find('.upcoming_events_slider-arrow-right').hide();
|
| 412 |
-
}
|
| 413 |
|
| 414 |
-
|
| 415 |
-
var events_item_width = jQuery(this).parent().find('ul li').eq(0).width();
|
| 416 |
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
jQuery(this).parent().find('.upcoming_events_slider-arrow-left').show();
|
| 420 |
-
if (click && upcoming_events_slider_main < events_item_width * events_item_count && parseInt(jQuery(this).parent().find('ul li').css('left')) >= -(events_item_width * (events_item_count) - upcoming_events_slider_main)) {
|
| 421 |
-
click = 0;
|
| 422 |
-
jQuery(this).parent().find('ul li').animate({left: "-=" + events_item_width}, 400, function () {
|
| 423 |
-
click = 1
|
| 424 |
-
});
|
| 425 |
}
|
| 426 |
-
if (parseInt(jQuery(
|
| 427 |
-
jQuery(
|
| 428 |
-
});
|
| 429 |
-
jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-left').click(function () {
|
| 430 |
-
var events_item_width = jQuery(this).parent().find('ul li').eq(0).width();
|
| 431 |
-
if (jQuery(this).parent().find('.upcoming_events_slider-arrow-right').css('display') == 'none')
|
| 432 |
-
jQuery(this).parent().find('.upcoming_events_slider-arrow-right').show();
|
| 433 |
-
if (parseInt(jQuery(this).parent().find('ul li').css('left')) == -events_item_width)
|
| 434 |
-
jQuery(this).hide();
|
| 435 |
-
if (click && parseInt(jQuery(this).parent().find('ul li').css('left')) < 0) {
|
| 436 |
-
click = 0;
|
| 437 |
-
jQuery(this).parent().find('ul li').animate({left: "+=" + events_item_width}, 400, function () {
|
| 438 |
-
click = 1
|
| 439 |
-
});
|
| 440 |
}
|
| 441 |
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
function showWidgetEventDesc() {
|
| 445 |
-
jQuery('.ecwd-widget-mini .event-container, .ecwd-widget-mini .ecwd_list .event-main-content').each(function () {
|
| 446 |
-
if (jQuery(this).find('.arrow-down').length == 0) {
|
| 447 |
-
jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'> </span>");
|
| 448 |
-
jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");
|
| 449 |
-
jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));
|
| 450 |
-
|
| 451 |
-
jQuery(this).find('.arrow-down').click(function () {
|
| 452 |
-
if (jQuery(this).hasClass('open')) {
|
| 453 |
-
jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);
|
| 454 |
-
jQuery(this).removeClass('open');
|
| 455 |
-
} else {
|
| 456 |
-
jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);
|
| 457 |
-
jQuery(this).addClass('open');
|
| 458 |
-
}
|
| 459 |
-
});
|
| 460 |
-
}
|
| 461 |
-
})
|
| 462 |
-
}
|
| 463 |
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
if (jQuery(this).find('.
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
|
| 477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'> </span>");
|
| 479 |
jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");
|
| 480 |
jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));
|
| 481 |
-
jQuery(this).find('.arrow-down').each(function () {
|
| 482 |
-
jQuery(this).click(function () {
|
| 483 |
-
if (jQuery(this).hasClass('open')) {
|
| 484 |
-
jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);
|
| 485 |
-
jQuery(this).removeClass('open');
|
| 486 |
-
} else {
|
| 487 |
-
jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);
|
| 488 |
-
jQuery(this).addClass('open');
|
| 489 |
-
}
|
| 490 |
-
});
|
| 491 |
-
})
|
| 492 |
-
}
|
| 493 |
-
})
|
| 494 |
-
} else if (jQuery(window).width() > 500) {
|
| 495 |
-
jQuery('div[class^="ecwd-page"] .event-container, div[class^="ecwd-page"] .ecwd_list .event-main-content').each(function () {
|
| 496 |
-
if (jQuery(this).find('.arrow-down').length != 0) {
|
| 497 |
-
// jQuery(this).css('height','auto');
|
| 498 |
-
if (jQuery(this).hasClass("event-container")) {
|
| 499 |
-
jQuery(this).find('.event-title').before('<div class="ecwd-list-img"><div class="ecwd-list-img-container">' + jQuery(this).find('.ecwd-list-img-container').html() + '</div></div>');
|
| 500 |
-
jQuery(this).find('.event-content .ecwd-list-img-container').remove();
|
| 501 |
-
jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());
|
| 502 |
-
jQuery(this).find('.event_dropdown_cont').remove();
|
| 503 |
-
} else {
|
| 504 |
-
jQuery(this).parent().find('.ecwd-list-date.resp').after('<div class="ecwd-list-img"><div class="ecwd-list-img-container">' + jQuery(this).find('.ecwd-list-img-container').html() + '</div></div>');
|
| 505 |
-
jQuery(this).find('.event-content .ecwd-list-img-container').remove();
|
| 506 |
-
jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());
|
| 507 |
-
jQuery(this).find('.event_dropdown_cont').remove();
|
| 508 |
-
}
|
| 509 |
|
| 510 |
-
jQuery(this).find('.arrow-down').
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
}
|
| 512 |
})
|
| 513 |
-
|
| 514 |
}
|
| 515 |
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 529 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 530 |
});
|
| 531 |
-
}
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 535 |
if (jQuery(this).hasClass('open')) {
|
| 536 |
-
jQuery(this).
|
| 537 |
-
jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({
|
| 538 |
-
"max-width": "100%",
|
| 539 |
-
"width": "100%"
|
| 540 |
-
});
|
| 541 |
-
jQuery(this).parent().next().hide();
|
| 542 |
jQuery(this).removeClass('open');
|
| 543 |
-
showFilterSliderArrow();
|
| 544 |
-
if (jQuery('.ecwd-poster-board').length > 0) {
|
| 545 |
-
doMasonry();
|
| 546 |
-
}
|
| 547 |
} else {
|
| 548 |
-
jQuery(this).
|
| 549 |
-
jQuery(this).closest(".calendar_full_content").find(".ecwd_filters").css({
|
| 550 |
-
"max-width": "27%",
|
| 551 |
-
"width": "27%",
|
| 552 |
-
"float": "left"
|
| 553 |
-
});
|
| 554 |
-
jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({
|
| 555 |
-
"max-width": "71%",
|
| 556 |
-
"float": "left"
|
| 557 |
-
});
|
| 558 |
-
jQuery(this).parent().next().show();
|
| 559 |
jQuery(this).addClass('open');
|
| 560 |
-
showFilterSliderArrow();
|
| 561 |
-
if (jQuery('.ecwd-poster-board').length > 0) {
|
| 562 |
-
doMasonry();
|
| 563 |
-
}
|
| 564 |
}
|
| 565 |
});
|
| 566 |
});
|
| 567 |
-
|
| 568 |
-
}
|
| 569 |
-
jQuery('.ecwd_filter_item').each(function () {
|
| 570 |
-
jQuery(this).find('.ecwd_filter_heading').click(function () {
|
| 571 |
-
if (jQuery(this).hasClass('open')) {
|
| 572 |
-
jQuery(this).next().slideUp(400);
|
| 573 |
-
jQuery(this).removeClass('open');
|
| 574 |
-
} else {
|
| 575 |
-
jQuery(this).next().slideDown(400);
|
| 576 |
-
jQuery(this).addClass('open');
|
| 577 |
-
}
|
| 578 |
-
});
|
| 579 |
-
});
|
| 580 |
-
}, 100);
|
| 581 |
|
| 582 |
-
|
| 583 |
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
}
|
| 598 |
-
else {
|
| 599 |
-
|
| 600 |
-
if (!main_div) {
|
| 601 |
-
jQuery(".ecwd_show_filters").removeClass('ecwd_show_filters_top').addClass('ecwd_show_filters_left');
|
| 602 |
} else {
|
| 603 |
-
if (main_div.find(".ecwd_calendar").hasClass('ecwd-widget-mini') === false) {
|
| 604 |
-
if (main_div.find(".ecwd_show_filters span").hasClass('open')) {
|
| 605 |
-
main_div.find(".ecwd_calendar").css({"max-width": "71%", "float": "left"});
|
| 606 |
-
main_div.find(".ecwd_filters").css({"max-width": "27%","width": "27%", "float": "left"});
|
| 607 |
-
} else {
|
| 608 |
|
| 609 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 610 |
|
| 611 |
-
|
|
|
|
| 612 |
}
|
| 613 |
}
|
| 614 |
}
|
| 615 |
-
}
|
| 616 |
|
| 617 |
-
|
| 618 |
|
| 619 |
-
|
| 620 |
if (typeof google == 'undefined' || typeof google.maps == "undefined") {
|
| 621 |
var script = document.createElement('script');
|
| 622 |
script.type = 'text/javascript';
|
| 623 |
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=ecwd_js_init_call.showMap';
|
| 624 |
document.body.appendChild(script);
|
| 625 |
-
}else{
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
}
|
| 641 |
-
for (var i = 0; i < locations_len; i++) {
|
| 642 |
-
if (locations[i]) {
|
| 643 |
-
|
| 644 |
-
var marker = new Object();
|
| 645 |
-
marker.lat = locations[i].latlong[0];
|
| 646 |
-
marker.lng = locations[i].latlong[1];
|
| 647 |
-
marker.data = locations[i].infow;
|
| 648 |
-
marker.options = new Object();
|
| 649 |
-
markers.push(marker);
|
| 650 |
-
}
|
| 651 |
-
|
| 652 |
-
}
|
| 653 |
-
jQuery(maps[k]).gmap3({
|
| 654 |
-
map:{
|
| 655 |
-
options: {
|
| 656 |
-
zoom: zoom,
|
| 657 |
-
zoomControl: true
|
| 658 |
}
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
infowindow = jQuery(maps[k]).gmap3({get: {name: "infowindow"}});
|
| 669 |
-
if (infowindow) {
|
| 670 |
-
infowindow.open(map, marker);
|
| 671 |
-
infowindow.setContent(context.data);
|
| 672 |
-
} else {
|
| 673 |
-
jQuery(maps[k]).gmap3({
|
| 674 |
-
infowindow: {
|
| 675 |
-
anchor: marker,
|
| 676 |
-
options: {content: context.data}
|
| 677 |
-
}
|
| 678 |
-
});
|
| 679 |
-
}
|
| 680 |
}
|
| 681 |
|
| 682 |
}
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 686 |
|
| 687 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 688 |
}
|
| 689 |
-
|
| 690 |
-
|
| 691 |
e.preventDefault();
|
| 692 |
window.history.back();
|
| 693 |
});
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
}
|
| 699 |
ecwd_js_init_call = new ecwd_js_init();
|
| 700 |
}(jQuery));
|
| 701 |
-
function ecwd_eventsOff(){
|
| 702 |
jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").find("*").off();
|
| 703 |
jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").children().off();
|
| 704 |
}
|
| 705 |
|
| 706 |
jQuery(window).resize(function () {
|
| 707 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 708 |
});
|
| 5 |
*/
|
| 6 |
var functions_interval;
|
| 7 |
|
| 8 |
+
if (typeof ecwd_js_init_call != "object")
|
| 9 |
+
var ecwd_js_init_call;
|
| 10 |
+
if (typeof ecwd_js_init != "function")
|
| 11 |
+
var ecwd_js_init;
|
| 12 |
+
(function ($) {
|
| 13 |
+
ecwd_js_init = function () {
|
| 14 |
ecwd_eventsOff();
|
| 15 |
+
if (jQuery('#ecwd-calendar-main-css').length == 0) {
|
| 16 |
+
jQuery("<link/>", {
|
| 17 |
+
id: 'ecwd-calendar-main-css',
|
| 18 |
+
rel: "stylesheet",
|
| 19 |
+
type: "text/css",
|
| 20 |
+
href: ecwd.plugin_url + '/css/calendar.css?ver=1'
|
| 21 |
+
}).appendTo("head");
|
| 22 |
+
}
|
| 23 |
+
var cwidth = jQuery(".calendar_main .ecwd_calendar").width();
|
| 24 |
+
var view_click = 1;
|
| 25 |
+
var click = 1;
|
| 26 |
+
jQuery('a[href="#ecwd-modal-preview"]').click(function () {
|
| 27 |
+
setTimeout(function () {
|
| 28 |
+
showFilterSliderArrow();
|
| 29 |
+
}, 1);
|
| 30 |
+
});
|
| 31 |
+
|
| 32 |
+
clearTimeout(functions_interval);
|
| 33 |
+
functions_interval = setTimeout(function () {
|
| 34 |
+
show_filters(0);
|
| 35 |
+
showMiniCalendarEventOnHover();
|
| 36 |
+
showFullCalendarEventOnHover();
|
| 37 |
+
showWidgetEventDesc();
|
| 38 |
+
calendarFullResponsive();
|
| 39 |
showFilterSliderArrow();
|
| 40 |
+
createSearchForm();
|
| 41 |
+
upcomingEventsSlider();
|
| 42 |
+
doMasonry();
|
| 43 |
}, 1);
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
jQuery('.ecwd_reset_filters').click(function () {
|
| 47 |
+
jQuery(this).closest('.ecwd_filters').find('input:checkbox').attr('checked', false);
|
| 48 |
+
});
|
| 49 |
+
jQuery('.ecwd-calendar-more-event').each(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
jQuery(this).find('.ecwd-more-events-container').ecwd_popup({
|
| 51 |
button: jQuery(this).find('.more_events_link'),
|
| 52 |
title: jQuery(this).find('.ecwd-more-event-title').val(),
|
| 78 |
}
|
| 79 |
});
|
| 80 |
|
| 81 |
+
jQuery('.ecwd_calendar_prev_next .next, .ecwd_calendar_prev_next .previous, .ecwd_calendar .type, .cpage, .current-month a, .ecwd_filter, .ecwd_reset_filters').on('click', function (e) {
|
| 82 |
+
var days = jQuery('input[name="ecwd_weekdays[]"]:checked').map(function () {
|
| 83 |
+
return this.value;
|
| 84 |
+
}).get();
|
| 85 |
+
var cats = jQuery('input[name="ecwd_categories[]"]:checked').map(function () {
|
| 86 |
+
return this.value;
|
| 87 |
+
}).get();
|
| 88 |
+
var tags = jQuery('input[name="ecwd_tags[]"]:checked').map(function () {
|
| 89 |
+
return this.value;
|
| 90 |
+
}).get();
|
| 91 |
+
var venues = jQuery('input[name="ecwd_venues[]"]:checked').map(function () {
|
| 92 |
+
return this.value;
|
| 93 |
+
}).get();
|
| 94 |
+
var organizers = jQuery('input[name="ecwd_organizers[]"]:checked').map(function () {
|
| 95 |
+
return this.value;
|
| 96 |
+
}).get();
|
| 97 |
+
var el = jQuery(this);
|
| 98 |
+
if (!jQuery(this).is(':checkbox')) {
|
| 99 |
+
e.preventDefault();
|
| 100 |
+
}
|
| 101 |
+
var navLink = jQuery(this);
|
| 102 |
+
if ((!navLink.attr('href') || navLink.attr('href') == 'undefined') && !navLink.is(':checkbox') && navLink.attr('class') != 'ecwd_reset_filters') {
|
| 103 |
+
navLink = jQuery(this).find('a');
|
| 104 |
+
}
|
| 105 |
+
var main_div = navLink.closest('.calendar_main');
|
| 106 |
+
|
| 107 |
+
var calendar_ids_class = jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').attr('class').split('-');
|
| 108 |
+
var display = jQuery(main_div).find('div.ecwd_calendar').attr('class').split(' ')[0].split('-')[2];
|
| 109 |
+
var calendar_ids = calendar_ids_class[2];
|
| 110 |
+
var query = jQuery(main_div).find('input.ecwd-search').val();
|
| 111 |
+
var tag = jQuery('.ecwd_tags').val();
|
| 112 |
+
var venue = jQuery('.ecwd_venues').val();
|
| 113 |
+
var organizer = jQuery('.ecwd_organizers').val();
|
| 114 |
+
var category = jQuery('.ecwd_categories').val();
|
| 115 |
+
var displays = jQuery(main_div).find('.ecwd_displays').val();
|
| 116 |
+
var date = jQuery(main_div).find('.ecwd_date').val();
|
| 117 |
+
var page_items = jQuery(main_div).find('.ecwd_page_items').val();
|
| 118 |
+
var event_search = jQuery(main_div).find('.event_search').val();
|
| 119 |
+
var filters = jQuery(main_div).find('.ecwd_filters').val();
|
| 120 |
+
jQuery(main_div).find('.ecwd_loader').show();
|
| 121 |
+
jQuery.post(ecwd.ajaxurl, {
|
| 122 |
+
action: 'ecwd_ajax',
|
| 123 |
+
ecwd_calendar_ids: calendar_ids,
|
| 124 |
+
ecwd_link: navLink.attr('href'),
|
| 125 |
+
ecwd_type: calendar_ids_class[1],
|
| 126 |
+
ecwd_query: query,
|
| 127 |
+
ecwd_weekdays: days,
|
| 128 |
+
ecwd_categories: cats,
|
| 129 |
+
ecwd_tags: tags,
|
| 130 |
+
ecwd_venues: venues,
|
| 131 |
+
ecwd_organizers: organizers,
|
| 132 |
+
ecwd_category: category,
|
| 133 |
+
ecwd_tag: tag,
|
| 134 |
+
ecwd_venue: venue,
|
| 135 |
+
ecwd_organizer: organizer,
|
| 136 |
+
ecwd_displays: displays,
|
| 137 |
+
ecwd_prev_display: display,
|
| 138 |
+
ecwd_page_items: page_items,
|
| 139 |
+
ecwd_event_search: event_search,
|
| 140 |
+
ecwd_filters: filters,
|
| 141 |
+
ecwd_date: 1,
|
| 142 |
+
ecwd_date_filter: date,
|
| 143 |
+
ecwd_nonce: ecwd.ajaxnonce
|
| 144 |
+
}, function (data) {
|
| 145 |
$(main_div).find('div.ecwd_calendar').replaceWith(data);
|
| 146 |
+
|
| 147 |
+
$(main_div).find('.ecwd_loader').hide();
|
| 148 |
if ($('.ecwd_open_event_popup').length > 0) {
|
| 149 |
$('.ecwd_open_event_popup').css({
|
| 150 |
'cursor': 'pointer'
|
| 151 |
+
});
|
| 152 |
}
|
| 153 |
})
|
| 154 |
+
e.stopPropagation();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
});
|
| 156 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
+
function createSearchForm() {
|
| 159 |
+
var scinpt = document.getElementById("ecwd-search-submit");
|
| 160 |
+
if (scinpt !== null) {
|
| 161 |
+
//scinpt.addEventListener('focus', doSearch, false);
|
| 162 |
+
}
|
| 163 |
+
jQuery('.ecwd-search').on("keyup", function (e) {
|
| 164 |
+
if (e.keyCode == 13) {
|
| 165 |
+
doSearch(this);
|
| 166 |
+
}
|
| 167 |
+
});
|
| 168 |
+
jQuery('.ecwd-search-submit').on("focus", function (e) {
|
| 169 |
+
doSearch(this);
|
| 170 |
+
});
|
| 171 |
|
| 172 |
+
jQuery('.ecwd-tag-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 173 |
+
jQuery('.ecwd_tags').val(jQuery(this).attr("data-term-tag"));
|
| 174 |
+
doSearch(this);
|
| 175 |
+
});
|
| 176 |
+
jQuery('.ecwd-category-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 177 |
+
jQuery('.ecwd_categories').val(jQuery(this).attr("data-term-category"));
|
| 178 |
+
doSearch(this);
|
| 179 |
+
});
|
| 180 |
+
jQuery('.ecwd-venue-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 181 |
+
jQuery('.ecwd_venues').val(jQuery(this).attr("data-term-venue"));
|
| 182 |
+
doSearch(this);
|
| 183 |
+
});
|
| 184 |
+
jQuery('.ecwd-organizer-container .ecwd-dropdown-menu > div').click(function (e) {
|
| 185 |
+
jQuery('.ecwd_organizers').val(jQuery(this).attr("data-term-organizer"));
|
| 186 |
+
doSearch(this);
|
| 187 |
+
});
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
function doSearch(el) {
|
| 192 |
+
|
| 193 |
+
var main_div = jQuery(el).closest('.calendar_main');
|
| 194 |
+
var navLink = jQuery(main_div).find('.previous').find('a');
|
| 195 |
+
var query = jQuery(main_div).find('input.ecwd-search').val();
|
| 196 |
+
var tag = jQuery(main_div).find('.ecwd_tags').val();
|
| 197 |
+
var venue = jQuery(main_div).find('.ecwd_venues').val();
|
| 198 |
+
var organizer = jQuery(main_div).find('.ecwd_organizers').val();
|
| 199 |
+
var category = jQuery(main_div).find('.ecwd_categories').val();
|
| 200 |
+
var calendar_ids_class = jQuery(main_div).find('div.ecwd_calendar').find('div:first-child').attr('class').split('-');
|
| 201 |
+
var calendar_ids = calendar_ids_class[2];
|
| 202 |
+
var displays = jQuery(main_div).find('.ecwd_displays').val();
|
| 203 |
+
var page_items = jQuery(main_div).find('.ecwd_page_items').val();
|
| 204 |
+
var event_search = jQuery(main_div).find('.event_search').val();
|
| 205 |
+
var filters = jQuery(main_div).find('.ecwd_filters').val();
|
| 206 |
+
jQuery(main_div).find('.ecwd_loader').show();
|
| 207 |
+
jQuery.post(ecwd.ajaxurl, {
|
| 208 |
+
action: 'ecwd_ajax',
|
| 209 |
+
ecwd_query: query,
|
| 210 |
+
ecwd_category: category,
|
| 211 |
+
ecwd_tag: tag,
|
| 212 |
+
ecwd_venue: venue,
|
| 213 |
+
ecwd_organizer: organizer,
|
| 214 |
+
ecwd_displays: displays,
|
| 215 |
+
ecwd_filters: filters,
|
| 216 |
+
ecwd_page_items: page_items,
|
| 217 |
+
ecwd_link: navLink.attr('href'),
|
| 218 |
+
ecwd_calendar_ids: calendar_ids,
|
| 219 |
+
ecwd_event_search: event_search,
|
| 220 |
+
ecwd_date: 0,
|
| 221 |
+
ecwd_type: calendar_ids_class[1],
|
| 222 |
+
ecwd_nonce: ecwd.ajaxnonce
|
| 223 |
+
}, function (data) {
|
| 224 |
+
$(main_div).find('div.ecwd_calendar').replaceWith(data);
|
| 225 |
+
});
|
| 226 |
+
jQuery('.ecwd-search-submit').blur();
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
function showMiniCalendarEventOnHover() {
|
| 230 |
+
}
|
| 231 |
+
;
|
| 232 |
+
|
| 233 |
+
var ulEvent, day;
|
| 234 |
+
var ulEventFull, dayFull;
|
| 235 |
+
jQuery('div.ecwd_calendar .has-events').on('click', function (e) {
|
| 236 |
+
dayFull = jQuery(this).attr('data-date').split('-');
|
| 237 |
+
dayFull = dayFull[2];
|
| 238 |
+
ulEventFull = jQuery(this).find('ul.events');
|
| 239 |
+
if (parseInt(jQuery(this).closest('.ecwd_calendar').width()) <= 300 || parseInt(jQuery(window).width()) <= 768 || jQuery(this).closest('.ecwd_calendar').hasClass('ecwd-widget-mini') || $(this).closest('.ecwd_calendar').hasClass('ecwd-page-mini')) {
|
| 240 |
+
if (dayFull == jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber')
|
| 241 |
+
&& jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').is(':empty') == false) {
|
| 242 |
+
jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').html('');
|
| 243 |
+
} else {
|
| 244 |
+
showEvent(ulEventFull, this);
|
| 245 |
+
}
|
| 246 |
+
jQuery(this).closest('.ecwd_calendar').find('.ecwd-events-day-details').attr('data-dayNumber', dayFull);
|
| 247 |
+
}
|
| 248 |
});
|
|
|
|
|
|
|
| 249 |
|
| 250 |
+
function showEvent(el, calendar) {
|
| 251 |
+
if (el.parent().parent().parent().parent().attr('class').indexOf("full") != -1) {
|
| 252 |
+
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(el.find('.event-details').clone().css('display', 'block'));
|
| 253 |
+
} else if (el.parent().parent().parent().parent().attr('class').indexOf("mini") != -1) {
|
| 254 |
+
jQuery(calendar).closest('.ecwd_calendar').find('.ecwd-events-day-details').html(el.clone());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
}
|
|
|
|
|
|
|
|
|
|
| 256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
}
|
| 258 |
|
| 259 |
+
function showFullCalendarEventOnHover() {
|
| 260 |
+
if (parseInt(jQuery(window).width()) >= 768) {
|
| 261 |
+
jQuery('div.ecwd-page-full .has-events ul.events:not(.more_events) > li:not(.ecwd-calendar-more-event)').on('mouseover', function (e) {
|
| 262 |
+
jQuery(this).find('ul.events').show();
|
| 263 |
+
jQuery(this).find('div.event-details-container').show();
|
| 264 |
+
});
|
| 265 |
|
| 266 |
+
jQuery('div.ecwd-page-full .has-events ul.events:not(.more_events) > li:not(.ecwd-calendar-more-event)').on('mouseout', function (e) {
|
| 267 |
+
jQuery(this).find('div.event-details-container').css('display', 'none');
|
| 268 |
+
});
|
| 269 |
+
}
|
|
|
|
|
|
|
| 270 |
|
| 271 |
+
jQuery('div.ecwd-page-full .has-events ul.more_events > li').on('click', function (e) {
|
| 272 |
+
jQuery('div.ecwd-page-full .has-events ul.more_events > li').find('.event-details-container').slideUp();
|
| 273 |
+
if (jQuery(this).find('.event-details-container').is(":visible"))
|
| 274 |
+
jQuery(this).find('.event-details-container').slideUp();
|
| 275 |
+
else
|
| 276 |
+
jQuery(this).find('.event-details-container').slideDown();
|
| 277 |
});
|
| 278 |
}
|
| 279 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 280 |
|
| 281 |
|
| 282 |
+
jQuery('.ecwd-show-map-span').click(function () {
|
| 283 |
+
jQuery('.ecwd-show-map').show();
|
| 284 |
+
});
|
| 285 |
+
|
| 286 |
|
| 287 |
+
function doMasonry() {
|
| 288 |
+
var $container = jQuery('.ecwd-poster-board');
|
| 289 |
+
if ($container.length && jQuery('.ecwd-poster-board').find('.ecwd-poster-item').length > 0) {
|
| 290 |
+
$container.imagesLoaded(function () {
|
| 291 |
+
$container.masonry({
|
| 292 |
+
itemSelector: '.ecwd-poster-item'
|
| 293 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
});
|
| 295 |
+
}
|
|
|
|
| 296 |
|
| 297 |
+
}
|
| 298 |
|
| 299 |
function showFilterSliderArrow() {
|
| 300 |
var li_position, li_width, last_child;
|
| 324 |
$(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width - 30) / ecwd_calendar_view_visible_count);
|
| 325 |
else
|
| 326 |
$(element).find('.filter-container ul li').width((ecwd_calendar_view_tabs_width) / ecwd_calendar_view_visible_count);
|
| 327 |
+
var ecwd_view_item_width = $(element).find('.filter-container ul li').eq(0).innerWidth() - 1;
|
| 328 |
+
if (!(ecwd_calendar_view_tabs_width < ecwd_view_item_width * parseInt($(element).find('.filter-container ul li').length) && !($(element).find("ul li:last-child").hasClass("ecwd-selected-mode"))))
|
| 329 |
$(element).find('.filter-arrow-right').hide();
|
| 330 |
if (ecwd_calendar_view_tabs_width < ecwd_view_item_width * parseInt($(element).find('.filter-container ul li').length) && !($(element).find("ul li:last-child").hasClass("ecwd-selected-mode"))) {
|
| 331 |
$(element).find('.filter-arrow-right').show();
|
| 332 |
} else if ($(element).find("ul li:last-child").hasClass("ecwd-selected-mode")) {
|
| 333 |
last_child = 1;
|
| 334 |
+
}
|
| 335 |
if (ecwd_calendar_view_visible_count <= li_position && li_position != 0) {
|
| 336 |
$(element).find('ul li').css({left: "-" + ((li_position + 1 - ecwd_calendar_view_visible_count) * ecwd_view_item_width) + "px"});
|
| 337 |
$(element).find('.filter-arrow-left').show();
|
| 374 |
});
|
| 375 |
}
|
| 376 |
|
| 377 |
+
function upcomingEventsSlider() {
|
| 378 |
+
var current_date = Date.parse(Date());
|
| 379 |
|
| 380 |
+
var upcoming_events_slider_main = jQuery('.upcoming_events_slider').width();
|
| 381 |
+
jQuery('.upcoming_events_slider .upcoming_events_item').width(upcoming_events_slider_main);
|
| 382 |
|
| 383 |
|
| 384 |
+
jQuery('.upcoming_events_slider .upcoming_event_container').width(parseInt(upcoming_events_slider_main) - 80);
|
| 385 |
+
jQuery('.upcoming_events_slider > ul').width(upcoming_events_slider_main * jQuery('.upcoming_events_slider .upcoming_events_item').length);
|
| 386 |
|
| 387 |
+
if (jQuery(".upcoming_events_slider").width() < jQuery('.upcoming_events_slider > ul').width()) {
|
| 388 |
+
jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-right').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 389 |
}
|
|
|
|
| 390 |
|
|
|
|
|
|
|
|
|
|
| 391 |
|
| 392 |
+
var min = 0;
|
| 393 |
+
jQuery('.upcoming_events_slider .upcoming_events_item').each(function () {
|
| 394 |
+
var item_date = Date.parse(jQuery(this).data('date'));
|
| 395 |
+
if (item_date < current_date) {
|
| 396 |
+
min++;
|
| 397 |
+
} else {
|
| 398 |
+
return false;
|
| 399 |
+
}
|
| 400 |
+
});
|
| 401 |
|
| 402 |
+
if (min && min == jQuery('.upcoming_events_slider .upcoming_events_item').length) {
|
| 403 |
+
min--;
|
| 404 |
+
}
|
|
|
|
|
|
|
|
|
|
| 405 |
|
| 406 |
+
jQuery('.upcoming_events_slider .upcoming_events_item').css('left', -upcoming_events_slider_main * min);
|
|
|
|
| 407 |
|
| 408 |
+
if (parseInt(jQuery('.upcoming_events_slider .upcoming_events_item').css('left')) < 0) {
|
| 409 |
+
jQuery('.upcoming_events_slider').parent().find('.upcoming_events_slider-arrow-left').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 410 |
}
|
| 411 |
+
if (parseInt(jQuery('.upcoming_events_slider .upcoming_events_item').css('left')) == -(jQuery('.upcoming_events_slider > ul').width() - upcoming_events_slider_main)) {
|
| 412 |
+
jQuery('.upcoming_events_slider').parent().find('.upcoming_events_slider-arrow-right').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
}
|
| 414 |
|
| 415 |
+
jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-right').click(function () {
|
| 416 |
+
var events_item_width = jQuery(this).parent().find('ul li').eq(0).width();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 417 |
|
| 418 |
+
var events_item_count = parseInt(jQuery(this).parent().find('ul li').length);
|
| 419 |
+
if (jQuery(this).parent().find('.upcoming_events_slider-arrow-left').css('display') == 'none')
|
| 420 |
+
jQuery(this).parent().find('.upcoming_events_slider-arrow-left').show();
|
| 421 |
+
if (click && upcoming_events_slider_main < events_item_width * events_item_count && parseInt(jQuery(this).parent().find('ul li').css('left')) >= -(events_item_width * (events_item_count) - upcoming_events_slider_main)) {
|
| 422 |
+
click = 0;
|
| 423 |
+
jQuery(this).parent().find('ul li').animate({left: "-=" + events_item_width}, 400, function () {
|
| 424 |
+
click = 1
|
| 425 |
+
});
|
| 426 |
+
}
|
| 427 |
+
if (parseInt(jQuery(this).parent().find('ul li').css('left')) <= -(jQuery('.upcoming_events_slider > ul').width() - (2 * events_item_width)))
|
| 428 |
+
jQuery(this).hide();
|
| 429 |
+
});
|
| 430 |
+
jQuery('.upcoming_events_slider .upcoming_events_slider-arrow-left').click(function () {
|
| 431 |
+
var events_item_width = jQuery(this).parent().find('ul li').eq(0).width();
|
| 432 |
+
if (jQuery(this).parent().find('.upcoming_events_slider-arrow-right').css('display') == 'none')
|
| 433 |
+
jQuery(this).parent().find('.upcoming_events_slider-arrow-right').show();
|
| 434 |
+
if (parseInt(jQuery(this).parent().find('ul li').css('left')) == -events_item_width)
|
| 435 |
+
jQuery(this).hide();
|
| 436 |
+
if (click && parseInt(jQuery(this).parent().find('ul li').css('left')) < 0) {
|
| 437 |
+
click = 0;
|
| 438 |
+
jQuery(this).parent().find('ul li').animate({left: "+=" + events_item_width}, 400, function () {
|
| 439 |
+
click = 1
|
| 440 |
+
});
|
| 441 |
+
}
|
| 442 |
|
| 443 |
+
});
|
| 444 |
+
}
|
| 445 |
+
function showWidgetEventDesc() {
|
| 446 |
+
jQuery('.ecwd-widget-mini .event-container, .ecwd-widget-mini .ecwd_list .event-main-content').each(function () {
|
| 447 |
+
if (jQuery(this).find('.arrow-down').length == 0) {
|
| 448 |
jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'> </span>");
|
| 449 |
jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");
|
| 450 |
jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 451 |
|
| 452 |
+
jQuery(this).find('.arrow-down').click(function () {
|
| 453 |
+
if (jQuery(this).hasClass('open')) {
|
| 454 |
+
jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);
|
| 455 |
+
jQuery(this).removeClass('open');
|
| 456 |
+
} else {
|
| 457 |
+
jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);
|
| 458 |
+
jQuery(this).addClass('open');
|
| 459 |
+
}
|
| 460 |
+
});
|
| 461 |
}
|
| 462 |
})
|
|
|
|
| 463 |
}
|
| 464 |
|
| 465 |
+
function calendarFullResponsive() {
|
| 466 |
+
if (jQuery(window).width() <= 500) {
|
| 467 |
+
jQuery('div[class^="ecwd-page"] .event-container, div[class^="ecwd-page"] .ecwd_list .event-main-content').each(function () {
|
| 468 |
+
if (jQuery(this).find('.arrow-down').length == 0) {
|
| 469 |
+
var content = jQuery(this).find('.event-content').html();
|
| 470 |
+
if (jQuery(this).hasClass("event-container")) {
|
| 471 |
+
jQuery(this).find('.event-content').html(jQuery(this).find('.ecwd-list-img').html() + content);
|
| 472 |
+
jQuery(this).find('.ecwd-list-img').remove();
|
| 473 |
+
} else {
|
| 474 |
+
var content = jQuery(this).find('.event-content').html();
|
| 475 |
+
jQuery(this).find('.event-content').html(jQuery(this).prev().html() + content);
|
| 476 |
+
jQuery(this).prev().remove();
|
| 477 |
+
|
| 478 |
+
}
|
| 479 |
+
jQuery(this).find('.ecwd-list-date-cont').append("<span class='arrow-down'> </span>");
|
| 480 |
+
jQuery(this).find('.ecwd-list-date-cont').after("<div class='event_dropdown_cont'></div>");
|
| 481 |
+
jQuery(this).find('.event_dropdown_cont').append(jQuery(this).children(".event-venue,.event-content, .event-organizers"));
|
| 482 |
+
jQuery(this).find('.arrow-down').each(function () {
|
| 483 |
+
jQuery(this).click(function () {
|
| 484 |
+
if (jQuery(this).hasClass('open')) {
|
| 485 |
+
jQuery(this).parent().parent().find('.event_dropdown_cont').slideUp(400);
|
| 486 |
+
jQuery(this).removeClass('open');
|
| 487 |
+
} else {
|
| 488 |
+
jQuery(this).parent().parent().find('.event_dropdown_cont').slideDown(400);
|
| 489 |
+
jQuery(this).addClass('open');
|
| 490 |
+
}
|
| 491 |
+
});
|
| 492 |
+
})
|
| 493 |
+
}
|
| 494 |
+
})
|
| 495 |
+
} else if (jQuery(window).width() > 500) {
|
| 496 |
+
jQuery('div[class^="ecwd-page"] .event-container, div[class^="ecwd-page"] .ecwd_list .event-main-content').each(function () {
|
| 497 |
+
if (jQuery(this).find('.arrow-down').length != 0) {
|
| 498 |
+
// jQuery(this).css('height','auto');
|
| 499 |
+
if (jQuery(this).hasClass("event-container")) {
|
| 500 |
+
jQuery(this).find('.event-title').before('<div class="ecwd-list-img"><div class="ecwd-list-img-container">' + jQuery(this).find('.ecwd-list-img-container').html() + '</div></div>');
|
| 501 |
+
jQuery(this).find('.event-content .ecwd-list-img-container').remove();
|
| 502 |
+
jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());
|
| 503 |
+
jQuery(this).find('.event_dropdown_cont').remove();
|
| 504 |
+
} else {
|
| 505 |
+
jQuery(this).parent().find('.ecwd-list-date.resp').after('<div class="ecwd-list-img"><div class="ecwd-list-img-container">' + jQuery(this).find('.ecwd-list-img-container').html() + '</div></div>');
|
| 506 |
+
jQuery(this).find('.event-content .ecwd-list-img-container').remove();
|
| 507 |
+
jQuery(this).find('.ecwd-list-date-cont').after(jQuery(this).find('.event_dropdown_cont').html());
|
| 508 |
+
jQuery(this).find('.event_dropdown_cont').remove();
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
jQuery(this).find('.arrow-down').remove();
|
| 512 |
}
|
| 513 |
+
})
|
| 514 |
+
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
}
|
| 518 |
+
setTimeout(function () {
|
| 519 |
+
if (parseInt(jQuery('body').width()) <= 768 || jQuery(".calendar_full_content").width() <= 550) {
|
| 520 |
+
jQuery('.calendar_main').each(function (k, v) {
|
| 521 |
+
jQuery(this).find('.ecwd_show_filters').click(function () {
|
| 522 |
+
if (jQuery(this).find('span').hasClass('open')) {
|
| 523 |
+
jQuery(this).find('span').html(jQuery('.ecwd_show_filters_text').val());
|
| 524 |
+
jQuery(this).next().hide();
|
| 525 |
+
jQuery(this).find('span').removeClass('open');
|
| 526 |
+
} else {
|
| 527 |
+
jQuery(this).find('span').html(jQuery('.ecwd_hide_filters_text').val());
|
| 528 |
+
jQuery(this).next().show();
|
| 529 |
+
jQuery(this).find('span').addClass('open');
|
| 530 |
+
}
|
| 531 |
+
});
|
| 532 |
});
|
| 533 |
+
} else {
|
| 534 |
+
jQuery('.calendar_main').each(function () {
|
| 535 |
+
jQuery(this).find('.ecwd_show_filters span').click(function () {
|
| 536 |
+
if (jQuery(this).hasClass('open')) {
|
| 537 |
+
jQuery(this).html(jQuery('.ecwd_show_filters_text').val());
|
| 538 |
+
jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({
|
| 539 |
+
"max-width": "100%",
|
| 540 |
+
"width": "100%"
|
| 541 |
+
});
|
| 542 |
+
jQuery(this).parent().next().hide();
|
| 543 |
+
jQuery(this).removeClass('open');
|
| 544 |
+
showFilterSliderArrow();
|
| 545 |
+
if (jQuery('.ecwd-poster-board').length > 0) {
|
| 546 |
+
doMasonry();
|
| 547 |
+
}
|
| 548 |
+
} else {
|
| 549 |
+
jQuery(this).html(jQuery('.ecwd_hide_filters_text').val());
|
| 550 |
+
jQuery(this).closest(".calendar_full_content").find(".ecwd_filters").css({
|
| 551 |
+
"max-width": "27%",
|
| 552 |
+
"width": "27%",
|
| 553 |
+
"float": "left"
|
| 554 |
+
});
|
| 555 |
+
jQuery(this).closest(".calendar_full_content").find(".ecwd_calendar").css({
|
| 556 |
+
"max-width": "71%",
|
| 557 |
+
"float": "left"
|
| 558 |
+
});
|
| 559 |
+
jQuery(this).parent().next().show();
|
| 560 |
+
jQuery(this).addClass('open');
|
| 561 |
+
showFilterSliderArrow();
|
| 562 |
+
if (jQuery('.ecwd-poster-board').length > 0) {
|
| 563 |
+
doMasonry();
|
| 564 |
+
}
|
| 565 |
+
}
|
| 566 |
+
});
|
| 567 |
+
});
|
| 568 |
+
jQuery(".month-name").show();
|
| 569 |
+
}
|
| 570 |
+
jQuery('.ecwd_filter_item').each(function () {
|
| 571 |
+
jQuery(this).find('.ecwd_filter_heading').click(function () {
|
| 572 |
if (jQuery(this).hasClass('open')) {
|
| 573 |
+
jQuery(this).next().slideUp(400);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 574 |
jQuery(this).removeClass('open');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 575 |
} else {
|
| 576 |
+
jQuery(this).next().slideDown(400);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 577 |
jQuery(this).addClass('open');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 578 |
}
|
| 579 |
});
|
| 580 |
});
|
| 581 |
+
}, 100);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
|
| 583 |
+
function show_filters(main_div) {
|
| 584 |
|
| 585 |
+
if (parseInt(jQuery('body').width()) <= 768 || jQuery(".calendar_full_content").width() <= 550) {
|
| 586 |
+
jQuery(".calendar_full_content .ecwd_calendar").css("max-width", "100%");
|
| 587 |
+
jQuery(".calendar_full_content .ecwd_filters, .calendar_full_content .ecwd_calendar").css({
|
| 588 |
+
"max-width": "100%",
|
| 589 |
+
"width": "100%",
|
| 590 |
+
"float": "none"
|
| 591 |
+
});
|
| 592 |
+
jQuery(".ecwd_show_filters").removeClass('ecwd_show_filters_left').addClass('ecwd_show_filters_top');
|
| 593 |
+
if (!main_div) {
|
| 594 |
+
jQuery(".ecwd_show_filters span").html(jQuery('.ecwd_show_filters_text').val());
|
| 595 |
+
jQuery(".ecwd_show_filters span").removeClass("open");
|
| 596 |
+
jQuery(".ecwd_filters").hide();
|
| 597 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 598 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 599 |
|
| 600 |
+
if (!main_div) {
|
| 601 |
+
jQuery(".ecwd_show_filters").removeClass('ecwd_show_filters_top').addClass('ecwd_show_filters_left');
|
| 602 |
+
} else {
|
| 603 |
+
if (main_div.find(".ecwd_calendar").hasClass('ecwd-widget-mini') === false) {
|
| 604 |
+
if (main_div.find(".ecwd_show_filters span").hasClass('open')) {
|
| 605 |
+
main_div.find(".ecwd_calendar").css({"max-width": "71%", "float": "left"});
|
| 606 |
+
main_div.find(".ecwd_filters").css({"max-width": "27%", "width": "27%", "float": "left"});
|
| 607 |
+
} else {
|
| 608 |
+
|
| 609 |
+
main_div.find(".ecwd_filters").css({"max-width": "100%", "width": "100%", "float": "none"});
|
| 610 |
|
| 611 |
+
main_div.find(".ecwd_calendar").css({"max-width": "100%", "width": "100%", "float": "none"});
|
| 612 |
+
}
|
| 613 |
}
|
| 614 |
}
|
| 615 |
}
|
|
|
|
| 616 |
|
| 617 |
+
}
|
| 618 |
|
| 619 |
+
this.showMap = function () {
|
| 620 |
if (typeof google == 'undefined' || typeof google.maps == "undefined") {
|
| 621 |
var script = document.createElement('script');
|
| 622 |
script.type = 'text/javascript';
|
| 623 |
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&callback=ecwd_js_init_call.showMap';
|
| 624 |
document.body.appendChild(script);
|
| 625 |
+
} else {
|
| 626 |
+
var maps = [];
|
| 627 |
+
jQuery(".ecwd_map_div").each(function (k, v) {
|
| 628 |
+
maps[k] = this;
|
| 629 |
+
var locations = JSON.parse(jQuery(maps[k]).next('textarea').val());
|
| 630 |
+
var locations_len = Object.keys(locations).length;
|
| 631 |
+
|
| 632 |
+
jQuery(maps[k]).gmap3();
|
| 633 |
+
|
| 634 |
+
var markers = [];
|
| 635 |
+
var zoom = 17;
|
| 636 |
+
if (locations_len > 0 && typeof locations[0] != 'undefined' && typeof locations[0]['zoom'] != 'undefined') {
|
| 637 |
+
zoom = parseInt(locations[0]['zoom']);
|
| 638 |
+
} else {
|
| 639 |
+
zoom = 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 640 |
}
|
| 641 |
+
for (var i = 0; i < locations_len; i++) {
|
| 642 |
+
if (locations[i]) {
|
| 643 |
+
|
| 644 |
+
var marker = new Object();
|
| 645 |
+
marker.lat = locations[i].latlong[0];
|
| 646 |
+
marker.lng = locations[i].latlong[1];
|
| 647 |
+
marker.data = locations[i].infow;
|
| 648 |
+
marker.options = new Object();
|
| 649 |
+
markers.push(marker);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 650 |
}
|
| 651 |
|
| 652 |
}
|
| 653 |
+
jQuery(maps[k]).gmap3({
|
| 654 |
+
map: {
|
| 655 |
+
options: {
|
| 656 |
+
zoom: zoom,
|
| 657 |
+
zoomControl: true
|
| 658 |
+
}
|
| 659 |
+
},
|
| 660 |
+
marker: {
|
| 661 |
+
values: markers,
|
| 662 |
+
options: {
|
| 663 |
+
draggable: false
|
| 664 |
+
},
|
| 665 |
+
events: {
|
| 666 |
+
click: function (marker, event, context) {
|
| 667 |
+
var map = jQuery(maps[k]).gmap3("get"),
|
| 668 |
+
infowindow = jQuery(maps[k]).gmap3({get: {name: "infowindow"}});
|
| 669 |
+
if (infowindow) {
|
| 670 |
+
infowindow.open(map, marker);
|
| 671 |
+
infowindow.setContent(context.data);
|
| 672 |
+
} else {
|
| 673 |
+
jQuery(maps[k]).gmap3({
|
| 674 |
+
infowindow: {
|
| 675 |
+
anchor: marker,
|
| 676 |
+
options: {content: context.data}
|
| 677 |
+
}
|
| 678 |
+
});
|
| 679 |
+
}
|
| 680 |
+
}
|
| 681 |
|
| 682 |
+
}
|
| 683 |
+
},
|
| 684 |
+
autofit: {maxZoom: zoom}
|
| 685 |
+
});
|
| 686 |
+
|
| 687 |
+
});
|
| 688 |
}
|
| 689 |
+
}
|
| 690 |
+
$('#ecwd_back_link').on('click', function (e) {
|
| 691 |
e.preventDefault();
|
| 692 |
window.history.back();
|
| 693 |
});
|
| 694 |
+
|
| 695 |
+
if (jQuery('.ecwd_map_div').length > 0) {
|
| 696 |
+
this.showMap();
|
| 697 |
+
}
|
| 698 |
}
|
| 699 |
ecwd_js_init_call = new ecwd_js_init();
|
| 700 |
}(jQuery));
|
| 701 |
+
function ecwd_eventsOff() {
|
| 702 |
jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").find("*").off();
|
| 703 |
jQuery(".calendar_main,.ecwd-event,.ecwd-organizer,.ecwd-venue").children().off();
|
| 704 |
}
|
| 705 |
|
| 706 |
jQuery(window).resize(function () {
|
| 707 |
+
var window_width = jQuery(window).width();
|
| 708 |
+
if (typeof checkw == 'undefined')
|
| 709 |
+
checkw = window_width;
|
| 710 |
+
if (window_width != checkw) {
|
| 711 |
+
ecwd_js_init_call = new ecwd_js_init();
|
| 712 |
+
checkw = window_width;
|
| 713 |
+
}
|
| 714 |
});
|
languages/ecwd-de_DE.mo
CHANGED
|
Binary file
|
languages/ecwd-de_DE.po
CHANGED
|
@@ -2,14 +2,14 @@ msgid ""
|
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: event_calendar_wd\n"
|
| 4 |
"POT-Creation-Date: 2015-07-23 13:04+0400\n"
|
| 5 |
-
"PO-Revision-Date:
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: de\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"X-Generator: Poedit 1.8.
|
| 13 |
"X-Poedit-Basepath: ..\n"
|
| 14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 15 |
"X-Poedit-KeywordsList: _e;__\n"
|
|
@@ -92,11 +92,11 @@ msgstr "Wiederholen alle"
|
|
| 92 |
|
| 93 |
#: includes/ecwd-display-class.php:876 includes/texts.php:66
|
| 94 |
msgid "days"
|
| 95 |
-
msgstr "
|
| 96 |
|
| 97 |
#: includes/ecwd-display-class.php:878 includes/texts.php:61
|
| 98 |
msgid "Repeat every day"
|
| 99 |
-
msgstr "
|
| 100 |
|
| 101 |
#: includes/ecwd-display-class.php:882 includes/texts.php:67
|
| 102 |
msgid "weeks"
|
|
@@ -104,7 +104,7 @@ msgstr "Woche"
|
|
| 104 |
|
| 105 |
#: includes/ecwd-display-class.php:884 includes/texts.php:62
|
| 106 |
msgid "Repeat every week"
|
| 107 |
-
msgstr "
|
| 108 |
|
| 109 |
#: includes/ecwd-display-class.php:889
|
| 110 |
msgid "on"
|
|
@@ -112,11 +112,11 @@ msgstr "auf"
|
|
| 112 |
|
| 113 |
#: includes/ecwd-display-class.php:900 includes/texts.php:68
|
| 114 |
msgid "months"
|
| 115 |
-
msgstr "
|
| 116 |
|
| 117 |
#: includes/ecwd-display-class.php:902 includes/texts.php:63
|
| 118 |
msgid "Repeat every month"
|
| 119 |
-
msgstr "
|
| 120 |
|
| 121 |
#: includes/ecwd-display-class.php:907 includes/ecwd-display-class.php:931
|
| 122 |
msgid "on the same day"
|
|
@@ -132,7 +132,7 @@ msgstr "Jahre"
|
|
| 132 |
|
| 133 |
#: includes/ecwd-display-class.php:919 includes/texts.php:64
|
| 134 |
msgid "Repeat every year"
|
| 135 |
-
msgstr "
|
| 136 |
|
| 137 |
#: includes/ecwd-display-class.php:940 includes/texts.php:70
|
| 138 |
msgid "until"
|
|
@@ -140,7 +140,7 @@ msgstr "bis"
|
|
| 140 |
|
| 141 |
#: includes/ecwd-functions.php:8
|
| 142 |
msgid "Loading..."
|
| 143 |
-
msgstr "
|
| 144 |
|
| 145 |
#: includes/ecwd-functions.php:439 includes/texts.php:53
|
| 146 |
msgid "DAYS"
|
|
@@ -148,7 +148,7 @@ msgstr "TAGEN"
|
|
| 148 |
|
| 149 |
#: includes/ecwd-functions.php:440 includes/texts.php:54
|
| 150 |
msgid "HOURS"
|
| 151 |
-
msgstr "
|
| 152 |
|
| 153 |
#: includes/ecwd-functions.php:441 includes/texts.php:55
|
| 154 |
msgid "MINUTES"
|
|
@@ -236,35 +236,35 @@ msgstr "Samstag"
|
|
| 236 |
|
| 237 |
#: includes/texts.php:25
|
| 238 |
msgid "Sun"
|
| 239 |
-
msgstr "
|
| 240 |
|
| 241 |
#: includes/texts.php:26
|
| 242 |
msgid "Mon"
|
| 243 |
-
msgstr "
|
| 244 |
|
| 245 |
#: includes/texts.php:27
|
| 246 |
msgid "Tue"
|
| 247 |
-
msgstr "
|
| 248 |
|
| 249 |
#: includes/texts.php:28
|
| 250 |
msgid "Wed"
|
| 251 |
-
msgstr "
|
| 252 |
|
| 253 |
#: includes/texts.php:29
|
| 254 |
msgid "Thu"
|
| 255 |
-
msgstr "
|
| 256 |
|
| 257 |
#: includes/texts.php:30
|
| 258 |
msgid "Fri"
|
| 259 |
-
msgstr "
|
| 260 |
|
| 261 |
#: includes/texts.php:31
|
| 262 |
msgid "Sat"
|
| 263 |
-
msgstr "
|
| 264 |
|
| 265 |
#: includes/texts.php:34
|
| 266 |
msgid "Su"
|
| 267 |
-
msgstr "
|
| 268 |
|
| 269 |
#: includes/texts.php:35
|
| 270 |
msgid "Mo"
|
|
@@ -296,7 +296,7 @@ msgstr "Filter anzeigen"
|
|
| 296 |
|
| 297 |
#: includes/texts.php:45
|
| 298 |
msgid "Collapse Filters"
|
| 299 |
-
msgstr "Filter
|
| 300 |
|
| 301 |
#: includes/texts.php:46
|
| 302 |
msgid "Reset Filters"
|
|
@@ -365,11 +365,11 @@ msgstr "kommende Veranstaltungen"
|
|
| 365 |
|
| 366 |
#: views/ecwd-venue-content.php:141
|
| 367 |
msgid "events"
|
| 368 |
-
msgstr "
|
| 369 |
|
| 370 |
#: views/single-event.php:190
|
| 371 |
msgid "Venue"
|
| 372 |
-
msgstr "
|
| 373 |
|
| 374 |
#: views/single-event.php:200
|
| 375 |
msgid "Location"
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: event_calendar_wd\n"
|
| 4 |
"POT-Creation-Date: 2015-07-23 13:04+0400\n"
|
| 5 |
+
"PO-Revision-Date: 2016-03-04 10:37+0100\n"
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
"Language: de\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"X-Generator: Poedit 1.8.7\n"
|
| 13 |
"X-Poedit-Basepath: ..\n"
|
| 14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 15 |
"X-Poedit-KeywordsList: _e;__\n"
|
| 92 |
|
| 93 |
#: includes/ecwd-display-class.php:876 includes/texts.php:66
|
| 94 |
msgid "days"
|
| 95 |
+
msgstr "Tagen"
|
| 96 |
|
| 97 |
#: includes/ecwd-display-class.php:878 includes/texts.php:61
|
| 98 |
msgid "Repeat every day"
|
| 99 |
+
msgstr "täglich wiederholen"
|
| 100 |
|
| 101 |
#: includes/ecwd-display-class.php:882 includes/texts.php:67
|
| 102 |
msgid "weeks"
|
| 104 |
|
| 105 |
#: includes/ecwd-display-class.php:884 includes/texts.php:62
|
| 106 |
msgid "Repeat every week"
|
| 107 |
+
msgstr "wöchentlich wiederholen"
|
| 108 |
|
| 109 |
#: includes/ecwd-display-class.php:889
|
| 110 |
msgid "on"
|
| 112 |
|
| 113 |
#: includes/ecwd-display-class.php:900 includes/texts.php:68
|
| 114 |
msgid "months"
|
| 115 |
+
msgstr "Monate"
|
| 116 |
|
| 117 |
#: includes/ecwd-display-class.php:902 includes/texts.php:63
|
| 118 |
msgid "Repeat every month"
|
| 119 |
+
msgstr "monatlich wiederholen"
|
| 120 |
|
| 121 |
#: includes/ecwd-display-class.php:907 includes/ecwd-display-class.php:931
|
| 122 |
msgid "on the same day"
|
| 132 |
|
| 133 |
#: includes/ecwd-display-class.php:919 includes/texts.php:64
|
| 134 |
msgid "Repeat every year"
|
| 135 |
+
msgstr "jährlich wiederholen"
|
| 136 |
|
| 137 |
#: includes/ecwd-display-class.php:940 includes/texts.php:70
|
| 138 |
msgid "until"
|
| 140 |
|
| 141 |
#: includes/ecwd-functions.php:8
|
| 142 |
msgid "Loading..."
|
| 143 |
+
msgstr "Lädt…"
|
| 144 |
|
| 145 |
#: includes/ecwd-functions.php:439 includes/texts.php:53
|
| 146 |
msgid "DAYS"
|
| 148 |
|
| 149 |
#: includes/ecwd-functions.php:440 includes/texts.php:54
|
| 150 |
msgid "HOURS"
|
| 151 |
+
msgstr "STUNDEN"
|
| 152 |
|
| 153 |
#: includes/ecwd-functions.php:441 includes/texts.php:55
|
| 154 |
msgid "MINUTES"
|
| 236 |
|
| 237 |
#: includes/texts.php:25
|
| 238 |
msgid "Sun"
|
| 239 |
+
msgstr "So"
|
| 240 |
|
| 241 |
#: includes/texts.php:26
|
| 242 |
msgid "Mon"
|
| 243 |
+
msgstr "Mo"
|
| 244 |
|
| 245 |
#: includes/texts.php:27
|
| 246 |
msgid "Tue"
|
| 247 |
+
msgstr "Di"
|
| 248 |
|
| 249 |
#: includes/texts.php:28
|
| 250 |
msgid "Wed"
|
| 251 |
+
msgstr "Mi"
|
| 252 |
|
| 253 |
#: includes/texts.php:29
|
| 254 |
msgid "Thu"
|
| 255 |
+
msgstr "Do"
|
| 256 |
|
| 257 |
#: includes/texts.php:30
|
| 258 |
msgid "Fri"
|
| 259 |
+
msgstr "Fr"
|
| 260 |
|
| 261 |
#: includes/texts.php:31
|
| 262 |
msgid "Sat"
|
| 263 |
+
msgstr "Sa"
|
| 264 |
|
| 265 |
#: includes/texts.php:34
|
| 266 |
msgid "Su"
|
| 267 |
+
msgstr "So"
|
| 268 |
|
| 269 |
#: includes/texts.php:35
|
| 270 |
msgid "Mo"
|
| 296 |
|
| 297 |
#: includes/texts.php:45
|
| 298 |
msgid "Collapse Filters"
|
| 299 |
+
msgstr "Filter schließen"
|
| 300 |
|
| 301 |
#: includes/texts.php:46
|
| 302 |
msgid "Reset Filters"
|
| 365 |
|
| 366 |
#: views/ecwd-venue-content.php:141
|
| 367 |
msgid "events"
|
| 368 |
+
msgstr "Veranstaltungen"
|
| 369 |
|
| 370 |
#: views/single-event.php:190
|
| 371 |
msgid "Venue"
|
| 372 |
+
msgstr "Veranstaltungsort"
|
| 373 |
|
| 374 |
#: views/single-event.php:200
|
| 375 |
msgid "Location"
|
languages/ecwd-es_ES.mo
CHANGED
|
Binary file
|
languages/ecwd-es_ES.po
CHANGED
|
@@ -2,17 +2,18 @@ msgid ""
|
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: event_calendar_wd\n"
|
| 4 |
"POT-Creation-Date: 2015-07-23 13:04+0400\n"
|
| 5 |
-
"PO-Revision-Date:
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
-
"Language:
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
-
"X-Generator: Poedit 1.
|
| 13 |
-
"X-Poedit-Basepath:
|
| 14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 15 |
"X-Poedit-KeywordsList: _e;__\n"
|
|
|
|
| 16 |
"X-Poedit-SearchPathExcluded-0: views/admin\n"
|
| 17 |
"X-Poedit-SearchPathExcluded-1: js\n"
|
| 18 |
"X-Poedit-SearchPathExcluded-2: includes/ecwd-cpt-class.php\n"
|
|
@@ -21,7 +22,6 @@ msgstr ""
|
|
| 21 |
"X-Poedit-SearchPathExcluded-5: includes/ecwd-google-events-class.php\n"
|
| 22 |
"X-Poedit-SearchPathExcluded-6: includes/ecwd-facebook-events-class.php\n"
|
| 23 |
"X-Poedit-SearchPathExcluded-7: ecwd_admin_class.php\n"
|
| 24 |
-
"X-Poedit-SearchPath-0: .\n"
|
| 25 |
|
| 26 |
#: includes/calendar-class.php:175 includes/calendar-class.php:176
|
| 27 |
#: views/widgets.php:168
|
|
@@ -46,7 +46,7 @@ msgstr "Mapa"
|
|
| 46 |
|
| 47 |
#: includes/calendar-class.php:188
|
| 48 |
msgid "4 Days"
|
| 49 |
-
msgstr "4
|
| 50 |
|
| 51 |
#: includes/calendar-class.php:191
|
| 52 |
msgid "Posterboard"
|
|
@@ -69,7 +69,7 @@ msgstr "No hay eventos"
|
|
| 69 |
|
| 70 |
#: includes/calendar-class.php:644
|
| 71 |
msgid "No Events"
|
| 72 |
-
msgstr "No hay
|
| 73 |
|
| 74 |
#: includes/calendar-class.php:1256
|
| 75 |
msgid "More events"
|
|
@@ -81,14 +81,13 @@ msgstr "Desde"
|
|
| 81 |
|
| 82 |
#: includes/ecwd-cpt-filter.php:74
|
| 83 |
msgid "To"
|
| 84 |
-
msgstr "
|
| 85 |
|
| 86 |
#: includes/ecwd-display-class.php:876 includes/ecwd-display-class.php:882
|
| 87 |
#: includes/ecwd-display-class.php:900 includes/ecwd-display-class.php:917
|
| 88 |
#: includes/texts.php:60
|
| 89 |
-
#, fuzzy
|
| 90 |
msgid "Repeat every"
|
| 91 |
-
msgstr "
|
| 92 |
|
| 93 |
#: includes/ecwd-display-class.php:876 includes/texts.php:66
|
| 94 |
msgid "days"
|
|
@@ -96,7 +95,7 @@ msgstr "días"
|
|
| 96 |
|
| 97 |
#: includes/ecwd-display-class.php:878 includes/texts.php:61
|
| 98 |
msgid "Repeat every day"
|
| 99 |
-
msgstr "
|
| 100 |
|
| 101 |
#: includes/ecwd-display-class.php:882 includes/texts.php:67
|
| 102 |
msgid "weeks"
|
|
@@ -107,23 +106,20 @@ msgid "Repeat every week"
|
|
| 107 |
msgstr "Repetir cada semana"
|
| 108 |
|
| 109 |
#: includes/ecwd-display-class.php:889
|
| 110 |
-
#, fuzzy
|
| 111 |
msgid "on"
|
| 112 |
-
msgstr "
|
| 113 |
|
| 114 |
#: includes/ecwd-display-class.php:900 includes/texts.php:68
|
| 115 |
-
#, fuzzy
|
| 116 |
msgid "months"
|
| 117 |
-
msgstr "
|
| 118 |
|
| 119 |
#: includes/ecwd-display-class.php:902 includes/texts.php:63
|
| 120 |
-
#, fuzzy
|
| 121 |
msgid "Repeat every month"
|
| 122 |
-
msgstr "
|
| 123 |
|
| 124 |
#: includes/ecwd-display-class.php:907 includes/ecwd-display-class.php:931
|
| 125 |
msgid "on the same day"
|
| 126 |
-
msgstr "
|
| 127 |
|
| 128 |
#: includes/ecwd-display-class.php:912 includes/ecwd-display-class.php:936
|
| 129 |
msgid "on the"
|
|
@@ -147,7 +143,7 @@ msgstr "Cargando…"
|
|
| 147 |
|
| 148 |
#: includes/ecwd-functions.php:439 includes/texts.php:53
|
| 149 |
msgid "DAYS"
|
| 150 |
-
msgstr "
|
| 151 |
|
| 152 |
#: includes/ecwd-functions.php:440 includes/texts.php:54
|
| 153 |
msgid "HOURS"
|
|
@@ -155,7 +151,7 @@ msgstr "HORAS"
|
|
| 155 |
|
| 156 |
#: includes/ecwd-functions.php:441 includes/texts.php:55
|
| 157 |
msgid "MINUTES"
|
| 158 |
-
msgstr "
|
| 159 |
|
| 160 |
#: includes/ecwd-functions.php:442 includes/texts.php:56
|
| 161 |
msgid "SECONDS"
|
|
@@ -191,7 +187,7 @@ msgstr "Julio"
|
|
| 191 |
|
| 192 |
#: includes/texts.php:9
|
| 193 |
msgid "August"
|
| 194 |
-
msgstr "
|
| 195 |
|
| 196 |
#: includes/texts.php:10
|
| 197 |
msgid "September"
|
|
@@ -299,15 +295,15 @@ msgstr "Mostrar filtros"
|
|
| 299 |
|
| 300 |
#: includes/texts.php:45
|
| 301 |
msgid "Collapse Filters"
|
| 302 |
-
msgstr "
|
| 303 |
|
| 304 |
#: includes/texts.php:46
|
| 305 |
msgid "Reset Filters"
|
| 306 |
-
msgstr "
|
| 307 |
|
| 308 |
#: includes/texts.php:48
|
| 309 |
msgid "Days"
|
| 310 |
-
msgstr "
|
| 311 |
|
| 312 |
#: includes/texts.php:49
|
| 313 |
msgid "Categories"
|
|
@@ -322,39 +318,32 @@ msgid "The event has just started"
|
|
| 322 |
msgstr "El evento ha comenzado"
|
| 323 |
|
| 324 |
#: includes/texts.php:72
|
| 325 |
-
#, fuzzy
|
| 326 |
msgid "Sundays"
|
| 327 |
-
msgstr "
|
| 328 |
|
| 329 |
#: includes/texts.php:73
|
| 330 |
-
#, fuzzy
|
| 331 |
msgid "Mondays"
|
| 332 |
msgstr "Lunes"
|
| 333 |
|
| 334 |
#: includes/texts.php:74
|
| 335 |
-
#, fuzzy
|
| 336 |
msgid "Tuesdays"
|
| 337 |
msgstr "Martes"
|
| 338 |
|
| 339 |
#: includes/texts.php:75
|
| 340 |
-
#, fuzzy
|
| 341 |
msgid "Wednesdays"
|
| 342 |
msgstr "Miércoles"
|
| 343 |
|
| 344 |
#: includes/texts.php:76
|
| 345 |
-
#, fuzzy
|
| 346 |
msgid "Thursdays"
|
| 347 |
msgstr "Jueves"
|
| 348 |
|
| 349 |
#: includes/texts.php:77
|
| 350 |
-
#, fuzzy
|
| 351 |
msgid "Fridays"
|
| 352 |
msgstr "Viernes"
|
| 353 |
|
| 354 |
#: includes/texts.php:78
|
| 355 |
-
#, fuzzy
|
| 356 |
msgid "Saturdays"
|
| 357 |
-
msgstr "
|
| 358 |
|
| 359 |
#: views/ecwd-event-content.php:67 views/ecwd-event-content.php:153
|
| 360 |
#: views/single-event.php:142 views/single-event.php:242
|
|
@@ -367,7 +356,7 @@ msgstr "Url"
|
|
| 367 |
|
| 368 |
#: views/ecwd-event-content.php:97 views/single-event.php:177
|
| 369 |
msgid "Organizers"
|
| 370 |
-
msgstr "
|
| 371 |
|
| 372 |
#: views/ecwd-organizer-content.php:109
|
| 373 |
msgid "upcoming events"
|
|
@@ -378,7 +367,6 @@ msgid "events"
|
|
| 378 |
msgstr "eventos"
|
| 379 |
|
| 380 |
#: views/single-event.php:190
|
| 381 |
-
#, fuzzy
|
| 382 |
msgid "Venue"
|
| 383 |
msgstr "Lugares"
|
| 384 |
|
|
@@ -388,7 +376,7 @@ msgstr "Localización"
|
|
| 388 |
|
| 389 |
#: views/single-event.php:449
|
| 390 |
msgid "Related events"
|
| 391 |
-
msgstr "
|
| 392 |
|
| 393 |
#~ msgid "What're we looking for ?"
|
| 394 |
#~ msgstr "Qué estamos buscando?"
|
| 2 |
msgstr ""
|
| 3 |
"Project-Id-Version: event_calendar_wd\n"
|
| 4 |
"POT-Creation-Date: 2015-07-23 13:04+0400\n"
|
| 5 |
+
"PO-Revision-Date: 2016-02-25 18:33-0300\n"
|
| 6 |
"Last-Translator: \n"
|
| 7 |
"Language-Team: \n"
|
| 8 |
+
"Language: es_ES\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 12 |
+
"X-Generator: Poedit 1.8.7\n"
|
| 13 |
+
"X-Poedit-Basepath: ..\n"
|
| 14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
| 15 |
"X-Poedit-KeywordsList: _e;__\n"
|
| 16 |
+
"X-Poedit-SearchPath-0: .\n"
|
| 17 |
"X-Poedit-SearchPathExcluded-0: views/admin\n"
|
| 18 |
"X-Poedit-SearchPathExcluded-1: js\n"
|
| 19 |
"X-Poedit-SearchPathExcluded-2: includes/ecwd-cpt-class.php\n"
|
| 22 |
"X-Poedit-SearchPathExcluded-5: includes/ecwd-google-events-class.php\n"
|
| 23 |
"X-Poedit-SearchPathExcluded-6: includes/ecwd-facebook-events-class.php\n"
|
| 24 |
"X-Poedit-SearchPathExcluded-7: ecwd_admin_class.php\n"
|
|
|
|
| 25 |
|
| 26 |
#: includes/calendar-class.php:175 includes/calendar-class.php:176
|
| 27 |
#: views/widgets.php:168
|
| 46 |
|
| 47 |
#: includes/calendar-class.php:188
|
| 48 |
msgid "4 Days"
|
| 49 |
+
msgstr "4 Días"
|
| 50 |
|
| 51 |
#: includes/calendar-class.php:191
|
| 52 |
msgid "Posterboard"
|
| 69 |
|
| 70 |
#: includes/calendar-class.php:644
|
| 71 |
msgid "No Events"
|
| 72 |
+
msgstr "No hay Eventos"
|
| 73 |
|
| 74 |
#: includes/calendar-class.php:1256
|
| 75 |
msgid "More events"
|
| 81 |
|
| 82 |
#: includes/ecwd-cpt-filter.php:74
|
| 83 |
msgid "To"
|
| 84 |
+
msgstr "Hasta"
|
| 85 |
|
| 86 |
#: includes/ecwd-display-class.php:876 includes/ecwd-display-class.php:882
|
| 87 |
#: includes/ecwd-display-class.php:900 includes/ecwd-display-class.php:917
|
| 88 |
#: includes/texts.php:60
|
|
|
|
| 89 |
msgid "Repeat every"
|
| 90 |
+
msgstr "Repetir cada"
|
| 91 |
|
| 92 |
#: includes/ecwd-display-class.php:876 includes/texts.php:66
|
| 93 |
msgid "days"
|
| 95 |
|
| 96 |
#: includes/ecwd-display-class.php:878 includes/texts.php:61
|
| 97 |
msgid "Repeat every day"
|
| 98 |
+
msgstr "Repetir todos los días"
|
| 99 |
|
| 100 |
#: includes/ecwd-display-class.php:882 includes/texts.php:67
|
| 101 |
msgid "weeks"
|
| 106 |
msgstr "Repetir cada semana"
|
| 107 |
|
| 108 |
#: includes/ecwd-display-class.php:889
|
|
|
|
| 109 |
msgid "on"
|
| 110 |
+
msgstr "en"
|
| 111 |
|
| 112 |
#: includes/ecwd-display-class.php:900 includes/texts.php:68
|
|
|
|
| 113 |
msgid "months"
|
| 114 |
+
msgstr "Meses"
|
| 115 |
|
| 116 |
#: includes/ecwd-display-class.php:902 includes/texts.php:63
|
|
|
|
| 117 |
msgid "Repeat every month"
|
| 118 |
+
msgstr "Repetir todos los meses"
|
| 119 |
|
| 120 |
#: includes/ecwd-display-class.php:907 includes/ecwd-display-class.php:931
|
| 121 |
msgid "on the same day"
|
| 122 |
+
msgstr "en el mismo día"
|
| 123 |
|
| 124 |
#: includes/ecwd-display-class.php:912 includes/ecwd-display-class.php:936
|
| 125 |
msgid "on the"
|
| 143 |
|
| 144 |
#: includes/ecwd-functions.php:439 includes/texts.php:53
|
| 145 |
msgid "DAYS"
|
| 146 |
+
msgstr "DÍAS"
|
| 147 |
|
| 148 |
#: includes/ecwd-functions.php:440 includes/texts.php:54
|
| 149 |
msgid "HOURS"
|
| 151 |
|
| 152 |
#: includes/ecwd-functions.php:441 includes/texts.php:55
|
| 153 |
msgid "MINUTES"
|
| 154 |
+
msgstr "MINUTOS"
|
| 155 |
|
| 156 |
#: includes/ecwd-functions.php:442 includes/texts.php:56
|
| 157 |
msgid "SECONDS"
|
| 187 |
|
| 188 |
#: includes/texts.php:9
|
| 189 |
msgid "August"
|
| 190 |
+
msgstr "Agosto"
|
| 191 |
|
| 192 |
#: includes/texts.php:10
|
| 193 |
msgid "September"
|
| 295 |
|
| 296 |
#: includes/texts.php:45
|
| 297 |
msgid "Collapse Filters"
|
| 298 |
+
msgstr "Ocultar Filtros"
|
| 299 |
|
| 300 |
#: includes/texts.php:46
|
| 301 |
msgid "Reset Filters"
|
| 302 |
+
msgstr "Restablecer filtros"
|
| 303 |
|
| 304 |
#: includes/texts.php:48
|
| 305 |
msgid "Days"
|
| 306 |
+
msgstr "Días"
|
| 307 |
|
| 308 |
#: includes/texts.php:49
|
| 309 |
msgid "Categories"
|
| 318 |
msgstr "El evento ha comenzado"
|
| 319 |
|
| 320 |
#: includes/texts.php:72
|
|
|
|
| 321 |
msgid "Sundays"
|
| 322 |
+
msgstr "Domingos"
|
| 323 |
|
| 324 |
#: includes/texts.php:73
|
|
|
|
| 325 |
msgid "Mondays"
|
| 326 |
msgstr "Lunes"
|
| 327 |
|
| 328 |
#: includes/texts.php:74
|
|
|
|
| 329 |
msgid "Tuesdays"
|
| 330 |
msgstr "Martes"
|
| 331 |
|
| 332 |
#: includes/texts.php:75
|
|
|
|
| 333 |
msgid "Wednesdays"
|
| 334 |
msgstr "Miércoles"
|
| 335 |
|
| 336 |
#: includes/texts.php:76
|
|
|
|
| 337 |
msgid "Thursdays"
|
| 338 |
msgstr "Jueves"
|
| 339 |
|
| 340 |
#: includes/texts.php:77
|
|
|
|
| 341 |
msgid "Fridays"
|
| 342 |
msgstr "Viernes"
|
| 343 |
|
| 344 |
#: includes/texts.php:78
|
|
|
|
| 345 |
msgid "Saturdays"
|
| 346 |
+
msgstr "Sábados"
|
| 347 |
|
| 348 |
#: views/ecwd-event-content.php:67 views/ecwd-event-content.php:153
|
| 349 |
#: views/single-event.php:142 views/single-event.php:242
|
| 356 |
|
| 357 |
#: views/ecwd-event-content.php:97 views/single-event.php:177
|
| 358 |
msgid "Organizers"
|
| 359 |
+
msgstr "Organizadores"
|
| 360 |
|
| 361 |
#: views/ecwd-organizer-content.php:109
|
| 362 |
msgid "upcoming events"
|
| 367 |
msgstr "eventos"
|
| 368 |
|
| 369 |
#: views/single-event.php:190
|
|
|
|
| 370 |
msgid "Venue"
|
| 371 |
msgstr "Lugares"
|
| 372 |
|
| 376 |
|
| 377 |
#: views/single-event.php:449
|
| 378 |
msgid "Related events"
|
| 379 |
+
msgstr "Eventos relacionados"
|
| 380 |
|
| 381 |
#~ msgid "What're we looking for ?"
|
| 382 |
#~ msgstr "Qué estamos buscando?"
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ 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, facebook integration, widget
|
| 5 |
Requires at least: 3.9
|
| 6 |
Tested up to: 4.4
|
| 7 |
-
Stable tag: 1.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -152,6 +152,14 @@ After downloading the ZIP file of the Event Calendar WD plugin,
|
|
| 152 |
|
| 153 |
== Changelog ==
|
| 154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
= 1.0.50 =
|
| 156 |
Added: Event Subscribe add-on
|
| 157 |
|
| 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, facebook integration, widget
|
| 5 |
Requires at least: 3.9
|
| 6 |
Tested up to: 4.4
|
| 7 |
+
Stable tag: 1.0.51
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 152 |
|
| 153 |
== Changelog ==
|
| 154 |
|
| 155 |
+
= 1.0.51 =
|
| 156 |
+
Added: Config page
|
| 157 |
+
Changed: Spanish Translation
|
| 158 |
+
Changed: German Translation
|
| 159 |
+
Changed: Featured plugins/themes page
|
| 160 |
+
Changed: Event details popup direction for 4th day
|
| 161 |
+
Fixed: Scroll issue in mobile
|
| 162 |
+
|
| 163 |
= 1.0.50 =
|
| 164 |
Added: Event Subscribe add-on
|
| 165 |
|
views/admin/ecwd-config.php
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
if ($response) {
|
| 3 |
+
foreach ($response as $text) {
|
| 4 |
+
var_dump($response);
|
| 5 |
+
}
|
| 6 |
+
}
|
| 7 |
+
?>
|
| 8 |
+
<form method="post" action="<?php echo $action; ?>">
|
| 9 |
+
<table style="width:100%;">
|
| 10 |
+
<tbody>
|
| 11 |
+
<tr>
|
| 12 |
+
<td>Name</td>
|
| 13 |
+
<td>Description</td>
|
| 14 |
+
<td style="width:20%;">Value</td>
|
| 15 |
+
</tr>
|
| 16 |
+
<?php
|
| 17 |
+
foreach ($configs as $id => $conf) {
|
| 18 |
+
?>
|
| 19 |
+
<tr>
|
| 20 |
+
<td><?php echo $conf['name']; ?></td>
|
| 21 |
+
<td><?php echo $conf['description']; ?></td>
|
| 22 |
+
<td>
|
| 23 |
+
<input type="text" name="<?php echo $id; ?>"
|
| 24 |
+
value="<?php echo $conf['value'] ?>" />
|
| 25 |
+
</td>
|
| 26 |
+
</tr>
|
| 27 |
+
<?php
|
| 28 |
+
}
|
| 29 |
+
?>
|
| 30 |
+
</tbody>
|
| 31 |
+
</table>
|
| 32 |
+
<input type="submit" value="Save" />
|
| 33 |
+
</form>
|
views/admin/ecwd-featured-plugins.php
CHANGED
|
@@ -1,194 +1,202 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
<
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div id="main_featured_plugins_page">
|
| 2 |
+
<table align="center" width="90%" style="margin-top: 0px;border-bottom: rgb(111, 111, 111) solid 1px;">
|
| 3 |
+
<tr>
|
| 4 |
+
<td colspan="2" style="height: 40px; padding: 30px 0px 0px 0px;">
|
| 5 |
+
<h3 style="margin: 0px;font-family:Segoe UI;padding-bottom: 15px;color: rgb(111, 111, 111); font-size:18pt;">Featured Plugins</h3>
|
| 6 |
+
</td>
|
| 7 |
+
<td align="right" style="font-size:16px;"></td>
|
| 8 |
+
</tr>
|
| 9 |
+
</table>
|
| 10 |
+
<div class="featured_header">
|
| 11 |
+
<div>
|
| 12 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-plugins.html?source=eventcalendarwd">
|
| 13 |
+
<h1>GET EVENT CALENDAR WD +18 PLUGINS</h1>
|
| 14 |
+
<h1 class="get_plugins">FOR $100 ONLY <span>- SAVE 70%</span></h1>
|
| 15 |
+
</a>
|
| 16 |
+
</div>
|
| 17 |
+
<form method="post">
|
| 18 |
+
<ul id="featured-plugins-list">
|
| 19 |
+
<li class="photo-gallery ">
|
| 20 |
+
<div class="product"></div>
|
| 21 |
+
<div class="title">
|
| 22 |
+
<strong class="heading">Photo Gallery</strong>
|
| 23 |
+
</div>
|
| 24 |
+
<div class="description">
|
| 25 |
+
<p>Photo Gallery is a fully responsive WordPress Gallery plugin with advanced functionality. </p>
|
| 26 |
+
</div>
|
| 27 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-photo-gallery-plugin.html" class="download">Download plugin ►</a>
|
| 28 |
+
</li>
|
| 29 |
+
<li class="form-maker">
|
| 30 |
+
<div class="product"></div>
|
| 31 |
+
<div class="title">
|
| 32 |
+
<strong class="heading">Form Maker</strong>
|
| 33 |
+
</div>
|
| 34 |
+
<div class="description">
|
| 35 |
+
<p>Form Maker is a modern and advanced tool for creating WordPress forms easily and fast.</p>
|
| 36 |
+
</div>
|
| 37 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-form.html" class="download">Download plugin ►</a>
|
| 38 |
+
</li>
|
| 39 |
+
<li class="events-wd">
|
| 40 |
+
<div class="product"></div>
|
| 41 |
+
<div class="title">
|
| 42 |
+
<strong class="heading">FAQ WD</strong>
|
| 43 |
+
</div>
|
| 44 |
+
<div class="description">
|
| 45 |
+
<p>The FAQ WD plugin will help to add categorizes and include questions in each category.</p>
|
| 46 |
+
</div>
|
| 47 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-faq-wd.html" class="download">Download plugin ►</a>
|
| 48 |
+
</li>
|
| 49 |
+
<li class="instagram-wd">
|
| 50 |
+
<div class="product"></div>
|
| 51 |
+
<div class="title">
|
| 52 |
+
<strong class="heading">Instagram Feed WD</strong>
|
| 53 |
+
</div>
|
| 54 |
+
<div class="description">
|
| 55 |
+
<p>Instagram Feed WD plugin allows to display image feeds from single or multiple Instagram accounts on a WordPress site.</p>
|
| 56 |
+
</div>
|
| 57 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-instagram-feed-wd.html" class="download">Download plugin ►</a>
|
| 58 |
+
</li>
|
| 59 |
+
<li class="spider-calendar">
|
| 60 |
+
<div class="product"></div>
|
| 61 |
+
<div class="title">
|
| 62 |
+
<strong class="heading">Spider Calendar</strong>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="description">
|
| 65 |
+
<p>Spider Event Calendar is a highly configurable product which allows you to have multiple organized events.</p>
|
| 66 |
+
</div>
|
| 67 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-calendar.html" class="download">Download plugin ►</a>
|
| 68 |
+
</li>
|
| 69 |
+
<li class="slider_wd">
|
| 70 |
+
<div class="product"></div>
|
| 71 |
+
<div class="title">
|
| 72 |
+
<strong class="heading">Slider WD</strong>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="description">
|
| 75 |
+
<p>Create responsive, highly configurable sliders with various effects for your WordPress site. </p>
|
| 76 |
+
</div>
|
| 77 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-slider-plugin.html" class="download">Download plugin ►</a>
|
| 78 |
+
</li>
|
| 79 |
+
<li class="catalog">
|
| 80 |
+
<div class="product"></div>
|
| 81 |
+
<div class="title">
|
| 82 |
+
<strong class="heading">Spider Catalog</strong>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="description">
|
| 85 |
+
<p>Spider Catalog for WordPress is a convenient tool for organizing the products represented on your website into catalogs.</p>
|
| 86 |
+
</div>
|
| 87 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-catalog.html" class="download">Download plugin ►</a>
|
| 88 |
+
</li>
|
| 89 |
+
<li class="player">
|
| 90 |
+
<div class="product"></div>
|
| 91 |
+
<div class="title">
|
| 92 |
+
<strong class="heading">Video Player</strong>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="description">
|
| 95 |
+
<p>Spider Video Player for WordPress is a Flash & HTML5 video player plugin that allows you to easily add videos to your website with the possibility</p>
|
| 96 |
+
</div>
|
| 97 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-player.html" class="download">Download plugin ►</a>
|
| 98 |
+
</li>
|
| 99 |
+
<li class="contacts">
|
| 100 |
+
<div class="product"></div>
|
| 101 |
+
<div class="title">
|
| 102 |
+
<strong class="heading">Spider Contacts</strong>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="description">
|
| 105 |
+
<p>Spider Contacts helps you to display information about the group of people more intelligible, effective and convenient.</p>
|
| 106 |
+
</div>
|
| 107 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-contacts-plugin.html" class="download">Download plugin ►</a>
|
| 108 |
+
</li>
|
| 109 |
+
<li class="facebook">
|
| 110 |
+
<div class="product"></div>
|
| 111 |
+
<div class="title">
|
| 112 |
+
<strong class="heading">Spider Facebook</strong>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="description">
|
| 115 |
+
<p>Spider Facebook is a WordPress integration tool for Facebook.It includes all the available Facebook social plugins and widgets.</p>
|
| 116 |
+
</div>
|
| 117 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-facebook.html" class="download">Download plugin ►</a>
|
| 118 |
+
</li>
|
| 119 |
+
<li class="faq">
|
| 120 |
+
<div class="product"></div>
|
| 121 |
+
<div class="title">
|
| 122 |
+
<strong class="heading">Spider FAQ</strong>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="description">
|
| 125 |
+
<p>The Spider FAQ WordPress plugin is for creating an FAQ (Frequently Asked Questions) section for your website.</p>
|
| 126 |
+
</div>
|
| 127 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-faq-plugin.html" class="download">Download plugin ►</a>
|
| 128 |
+
</li>
|
| 129 |
+
<li class="zoom">
|
| 130 |
+
<div class="product"></div>
|
| 131 |
+
<div class="title">
|
| 132 |
+
<strong class="heading">Zoom</strong>
|
| 133 |
+
</div>
|
| 134 |
+
<div class="description">
|
| 135 |
+
<p>Zoom enables site users to resize the predefined areas of the web site.</p>
|
| 136 |
+
</div>
|
| 137 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-zoom.html" class="download">Download plugin ►</a>
|
| 138 |
+
</li>
|
| 139 |
+
<li class="flash-calendar">
|
| 140 |
+
<div class="product"></div>
|
| 141 |
+
<div class="title">
|
| 142 |
+
<strong class="heading">Flash Calendar</strong>
|
| 143 |
+
</div>
|
| 144 |
+
<div class="description">
|
| 145 |
+
<p>Spider Flash Calendar is a highly configurable Flash calendar plugin which allows you to have multiple organized events.</p>
|
| 146 |
+
</div>
|
| 147 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-events-calendar.html" class="download">Download plugin ►</a>
|
| 148 |
+
</li>
|
| 149 |
+
<li class="contact-maker">
|
| 150 |
+
<div class="product"></div>
|
| 151 |
+
<div class="title">
|
| 152 |
+
<strong class="heading">Contact Form Maker</strong>
|
| 153 |
+
</div>
|
| 154 |
+
<div class="description">
|
| 155 |
+
<p>WordPress Contact Form Maker is an advanced and easy-to-use tool for creating forms.</p>
|
| 156 |
+
</div>
|
| 157 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-contact-form-maker-plugin.html" class="download">Download plugin ►</a>
|
| 158 |
+
</li>
|
| 159 |
+
<li class="twitter-widget">
|
| 160 |
+
<div class="product"></div>
|
| 161 |
+
<div class="title">
|
| 162 |
+
<strong class="heading">Widget Twitter</strong>
|
| 163 |
+
</div>
|
| 164 |
+
<div class="description">
|
| 165 |
+
<p>The Widget Twitter plugin lets you to fully integrate your WordPress site with your Twitter account.</p>
|
| 166 |
+
</div>
|
| 167 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-twitter-integration-plugin.html" class="download">Download plugin ►</a>
|
| 168 |
+
</li>
|
| 169 |
+
<li class="contact_form_bulder">
|
| 170 |
+
<div class="product"></div>
|
| 171 |
+
<div class="title">
|
| 172 |
+
<strong class="heading">Contact Form Builder</strong>
|
| 173 |
+
</div>
|
| 174 |
+
<div class="description">
|
| 175 |
+
<p>Contact Form Builder is the best tool for quickly arranging a contact form for your clients and visitors. </p>
|
| 176 |
+
</div>
|
| 177 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-contact-form-builder.html" class="download">Download plugin ►</a>
|
| 178 |
+
</li>
|
| 179 |
+
<li class="folder_menu">
|
| 180 |
+
<div class="product"></div>
|
| 181 |
+
<div class="title">
|
| 182 |
+
<strong class="heading">Folder Menu</strong>
|
| 183 |
+
</div>
|
| 184 |
+
<div class="description">
|
| 185 |
+
<p>Folder Menu Vertical is a WordPress Flash menu module for your website, designed to meet your needs and preferences. </p>
|
| 186 |
+
</div>
|
| 187 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-menu-vertical.html" class="download">Download plugin ►</a>
|
| 188 |
+
</li>
|
| 189 |
+
<li class="random_post">
|
| 190 |
+
<div class="product"></div>
|
| 191 |
+
<div class="title">
|
| 192 |
+
<strong class="heading">Random post</strong>
|
| 193 |
+
</div>
|
| 194 |
+
<div class="description">
|
| 195 |
+
<p>Spider Random Post is a small but very smart solution for your WordPress web site. </p>
|
| 196 |
+
</div>
|
| 197 |
+
<a target="_blank" href="https://web-dorado.com/products/wordpress-random-post.html" class="download">Download plugin ►</a>
|
| 198 |
+
</li>
|
| 199 |
+
</ul>
|
| 200 |
+
</form>
|
| 201 |
+
</div>
|
| 202 |
+
</div>
|
views/admin/ecwd-featured-themes.php
CHANGED
|
@@ -1,135 +1,132 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
<
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
</div>
|
| 134 |
-
<!-- #ecwd-settings -->
|
| 135 |
-
</div><!-- .wrap -->
|
| 1 |
+
<div id="main_featured_themes_page">
|
| 2 |
+
<table align="center" width="90%" style="margin-top: 0px;border-bottom: rgb(111, 111, 111) solid 1px;">
|
| 3 |
+
<tr>
|
| 4 |
+
<td colspan="2" style="height: 40px; padding: 30px 0px 0px 0px;">
|
| 5 |
+
<h3 style="margin: 0px;font-family:Segoe UI;padding-bottom: 15px;color: rgb(111, 111, 111); font-size:18pt;">Featured Themes</h3>
|
| 6 |
+
</td>
|
| 7 |
+
<td align="right" style="font-size:16px;"></td>
|
| 8 |
+
</tr>
|
| 9 |
+
</table>
|
| 10 |
+
<div class="featured_header">
|
| 11 |
+
<div>
|
| 12 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes.html?source=eventcalendarwd">
|
| 13 |
+
<h1>WORDPRESS THEMES</h1>
|
| 14 |
+
<h1 class="get_plugins">ALL FOR $40 ONLY <span>- SAVE 80%</span></h1>
|
| 15 |
+
</a>
|
| 16 |
+
</div>
|
| 17 |
+
<form method="post">
|
| 18 |
+
<ul id="featured-plugins-list">
|
| 19 |
+
<li class="portfolio">
|
| 20 |
+
<div class="product"></div>
|
| 21 |
+
<div class="title">
|
| 22 |
+
<strong class="heading">Portfolio Gallery Theme</strong>
|
| 23 |
+
</div>
|
| 24 |
+
<div class="description">
|
| 25 |
+
<p>Portfolio Gallery helps to display images using various color schemes and layouts combined with elegant fonts and content parts.</p>
|
| 26 |
+
</div>
|
| 27 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/portfolio-gallery.html" class="download">Download theme ►</a>
|
| 28 |
+
</li>
|
| 29 |
+
<li class="business_elite">
|
| 30 |
+
<div class="product"></div>
|
| 31 |
+
<div class="title">
|
| 32 |
+
<strong class="heading">Business Elite Theme</strong>
|
| 33 |
+
</div>
|
| 34 |
+
<div class="description">
|
| 35 |
+
<p>Business Elite is a robust parallax theme for business websites. The theme uses smooth transitions and many functional sections.</p>
|
| 36 |
+
</div>
|
| 37 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/business-elite.html" class="download">Download theme ►</a>
|
| 38 |
+
</li>
|
| 39 |
+
<li class="sauron">
|
| 40 |
+
<div class="product"></div>
|
| 41 |
+
<div class="title">
|
| 42 |
+
<strong class="heading">Sauron Theme</strong>
|
| 43 |
+
</div>
|
| 44 |
+
<div class="description">
|
| 45 |
+
<p>Sauron is a multipurpose parallax theme, which uses multiple interactive sections designed for the client-engagement.</p>
|
| 46 |
+
</div>
|
| 47 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/sauron.html" class="download">Download plugin ►</a>
|
| 48 |
+
</li>
|
| 49 |
+
<li class="mottomag">
|
| 50 |
+
<div class="product"></div>
|
| 51 |
+
<div class="title">
|
| 52 |
+
<strong class="heading">MottoMag Theme</strong>
|
| 53 |
+
</div>
|
| 54 |
+
<div class="description">
|
| 55 |
+
<p>MottoMag is a vibrant, responsive theme which is a perfect choice for the combination of textual content with videos and images.</p>
|
| 56 |
+
</div>
|
| 57 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/mottomag.html" class="download">Download plugin ►</a>
|
| 58 |
+
</li>
|
| 59 |
+
<li class="business_world">
|
| 60 |
+
<div class="product"></div>
|
| 61 |
+
<div class="title">
|
| 62 |
+
<strong class="heading">Business World Theme</strong>
|
| 63 |
+
</div>
|
| 64 |
+
<div class="description">
|
| 65 |
+
<p>Business World is an innovative WordPress theme great for Business websites.</p>
|
| 66 |
+
</div>
|
| 67 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/business-world.html" class="download">Download plugin ►</a>
|
| 68 |
+
</li>
|
| 69 |
+
<li class="best_magazine">
|
| 70 |
+
<div class="product"></div>
|
| 71 |
+
<div class="title">
|
| 72 |
+
<strong class="heading">Best Magazine Theme</strong>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="description">
|
| 75 |
+
<p>Best Magazine is an ultimate selection when you are dealing with multi-category news websites.</p>
|
| 76 |
+
</div>
|
| 77 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/best-magazine.html" class="download">Download plugin ►</a>
|
| 78 |
+
</li>
|
| 79 |
+
<li class="wedding_style">
|
| 80 |
+
<div class="product"></div>
|
| 81 |
+
<div class="title">
|
| 82 |
+
<strong class="heading">Wedding Style Theme</strong>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="description">
|
| 85 |
+
<p>Wedding style is a responsive theme designed for the organization and maintenance of wedding websites and blogs.</p>
|
| 86 |
+
</div>
|
| 87 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/wedding-style.html" class="download">Download plugin ►</a>
|
| 88 |
+
</li>
|
| 89 |
+
<li class="magazine">
|
| 90 |
+
<div class="product"></div>
|
| 91 |
+
<div class="title">
|
| 92 |
+
<strong class="heading">Magazine Theme</strong>
|
| 93 |
+
</div>
|
| 94 |
+
<div class="description">
|
| 95 |
+
<p>Magazine theme is a perfect solution when creating news and informational websites. It comes with a wide range of layout options.</p>
|
| 96 |
+
</div>
|
| 97 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/news-magazine.html" class="download">Download plugin ►</a>
|
| 98 |
+
</li>
|
| 99 |
+
<li class="weddings">
|
| 100 |
+
<div class="product"></div>
|
| 101 |
+
<div class="title">
|
| 102 |
+
<strong class="heading">Weddings Theme</strong>
|
| 103 |
+
</div>
|
| 104 |
+
<div class="description">
|
| 105 |
+
<p>Weddings is an elegant, responsive WordPress theme designed for wedding websites. The theme includes multiple pages, homepage slider and gallery support.</p>
|
| 106 |
+
</div>
|
| 107 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/wedding.html" class="download">Download plugin ►</a>
|
| 108 |
+
</li>
|
| 109 |
+
<li class="exclusive">
|
| 110 |
+
<div class="product"></div>
|
| 111 |
+
<div class="title">
|
| 112 |
+
<strong class="heading">Exclusive Theme</strong>
|
| 113 |
+
</div>
|
| 114 |
+
<div class="description">
|
| 115 |
+
<p>Exclusive is a unique theme designed to best fit business style websites. It comes with a large list of customizable features.</p>
|
| 116 |
+
</div>
|
| 117 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/exclusive.html" class="download">Download plugin ►</a>
|
| 118 |
+
</li>
|
| 119 |
+
<li class="expert">
|
| 120 |
+
<div class="product"></div>
|
| 121 |
+
<div class="title">
|
| 122 |
+
<strong class="heading">Expert Theme</strong>
|
| 123 |
+
</div>
|
| 124 |
+
<div class="description">
|
| 125 |
+
<p>WordPress Expert is a modern, user-friendly and stylish theme. It has a list of customizable layout, style, colors and fonts.</p>
|
| 126 |
+
</div>
|
| 127 |
+
<a target="_blank" href="https://web-dorado.com/wordpress-themes/business-responsive.html" class="download">Download plugin ►</a>
|
| 128 |
+
</li>
|
| 129 |
+
</ul>
|
| 130 |
+
</form>
|
| 131 |
+
</div>
|
| 132 |
+
</div >
|
|
|
|
|
|
|
|
|
