new function updated
This commit is contained in:
parent
83819892ff
commit
b47158fb34
|
@ -346,6 +346,12 @@ div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty {
|
|||
margin: 0;
|
||||
float: left;
|
||||
order: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.wrap.mage_settings_panel_wrap .error, .wrap.mage_settings_panel_wrap .notice {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.mp_tab_item .item .content input {
|
||||
display: block;
|
||||
|
@ -500,3 +506,102 @@ table.wp-list-table.widefat.striped.posts.mep-licensing-table thead th, table.wp
|
|||
a#mep_settings_licensing-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
ul.mep_ready_template_list {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
ul.mep_ready_template_list li {
|
||||
width: 20%;
|
||||
padding: 0 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #ddd;
|
||||
padding: 5px;
|
||||
margin: 0 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
ul.mep_ready_template_list li div.template-thumb{
|
||||
display: block;
|
||||
/* width: 300px; */
|
||||
height: 270px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
/* border: 2px solid #b3b3b3; */
|
||||
/* border-radius: 1px; */
|
||||
|
||||
}
|
||||
|
||||
ul.mep_ready_template_list li img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
/* border: 1px solid #ddd; */
|
||||
|
||||
bottom: -258px;
|
||||
|
||||
/* height: auto; */
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
margin:0;
|
||||
padding:0;
|
||||
left: 0;
|
||||
-webkit-transition: top 11s;
|
||||
-moz-transition: top 11s;
|
||||
-ms-transition: top 11s;
|
||||
-o-transition: top 11s;
|
||||
transition: bottom 11s;
|
||||
}
|
||||
|
||||
ul.mep_ready_template_list li:hover img {
|
||||
bottom: 0;
|
||||
-webkit-transition: all 11s;
|
||||
-moz-transition: all 11s;
|
||||
-ms-transition: all 11s;
|
||||
-o-transition: all 11s;
|
||||
transition: all 11s;
|
||||
}
|
||||
|
||||
ul.mep_ready_template_list li button.import_template, ul.mep_ready_template_list li a.preview-btn.btn {
|
||||
background: #607D8B;
|
||||
border: 0;
|
||||
padding: 5px 10px;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
margin: 5px 5px;
|
||||
}
|
||||
.mep-msg{
|
||||
border: 3px solid;
|
||||
text-align: center;
|
||||
|
||||
font-size: 15px;
|
||||
padding: 14px 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
.mep-msg-success {
|
||||
border-color:#05af05;
|
||||
color: #046f04;
|
||||
background: #e3ffe3;
|
||||
}
|
||||
.mep-msg-process {
|
||||
border-color:#76b306;
|
||||
color: #5b8a04;
|
||||
background: #d6f898;
|
||||
}
|
||||
.mep-msg-warning {
|
||||
border-color:#b32906;
|
||||
color: #701903;
|
||||
background: #ffb6a3;
|
||||
}
|
||||
p.mep-template-import-count {
|
||||
padding: 0;
|
||||
margin: -18px 0 0px 0;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
color: #099209;
|
||||
}
|
537
css/style.css
537
css/style.css
|
@ -193,7 +193,7 @@ span.mep_warning {
|
|||
label.mep-show{line-height: 1.4;}
|
||||
[name='option_qty[]'].mage_error{background-color: red;color:#fff;}
|
||||
/******Button*******/
|
||||
button.single_add_to_cart_button{padding: 0 15px !important;background: #ffbe30;color: #ffffff;font-size: 15px !important;line-height: 1 !important;
|
||||
button.single_add_to_cart_button{padding: 0 15px;background: #ffbe30;color: #ffffff;font-size: 15px;line-height: 1;
|
||||
text-transform: uppercase;font-weight: 600;-webkit-border-radius: 50px;border-radius: 50px;margin: 0 auto;min-width: 250px;height: 45px;
|
||||
}
|
||||
.mep-events-wrapper button[disabled="disabled"]{opacity: 0.5;cursor: no-drop;}
|
||||
|
@ -350,7 +350,9 @@ h3.mep_list_date {font-size: 16px; font-style: italic;font-weight: bold;color: #
|
|||
.mep-user-info-sec>label select{width: 100%;}
|
||||
.mep-user-info-sec textarea{width: 100%;padding: 10px;}
|
||||
|
||||
|
||||
.dNone {
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
.mep-list-footer .mep-more-date-lists li i {
|
||||
display: inline-block;
|
||||
|
@ -566,7 +568,7 @@ div.mep_event_native_list {
|
|||
width: 100%;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
font-size: 18px;
|
||||
color: #333!important;
|
||||
color: #333;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
|
@ -795,7 +797,7 @@ button.mep-cat-control.mixitup-control-active {
|
|||
overflow: hidden;
|
||||
}
|
||||
.mep_view_all_date{
|
||||
height: auto!important;
|
||||
overflow: scroll !important;;
|
||||
}
|
||||
|
||||
span.mep_single_date_btn {
|
||||
|
@ -1060,9 +1062,11 @@ CSS by Ariful
|
|||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
font-weight: 600;
|
||||
display: grid;
|
||||
}
|
||||
.mep-multidate-ribbon span{
|
||||
width: 100px;
|
||||
width: 90px;
|
||||
margin: auto;
|
||||
}
|
||||
.mep-eventtype-ribbon{
|
||||
line-height: 30px;
|
||||
|
@ -1112,7 +1116,7 @@ h3.mep_list_date{
|
|||
margin-top: 20px;
|
||||
width: max-content;
|
||||
border: 1px solid #ff5959;
|
||||
background: transparent !important;
|
||||
background: #fff;
|
||||
color: #ff5959;
|
||||
font-weight: 400;
|
||||
border-radius: 20px;
|
||||
|
@ -1151,7 +1155,7 @@ h3.mep_list_date{
|
|||
border: 2px solid #ff5959;
|
||||
}
|
||||
.mep_more_date_btn:hover, .mep_more_date_btn:focus, .mep_more_date_btn:active {
|
||||
color: #ffffff;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.mep_more_date_btn:hover:before, .mep_more_date_btn:focus:before, .mep_more_date_btn:active:before {
|
||||
-webkit-transform: scaleX(1);
|
||||
|
@ -1207,7 +1211,7 @@ div.df-dtl p {
|
|||
min-width: auto !important;
|
||||
}
|
||||
.mep_everyday_date_secs {
|
||||
background: #ff5959 !important;
|
||||
background: #ff5959;
|
||||
}
|
||||
h3.ex-sec-title{
|
||||
color: #ffffff;
|
||||
|
@ -1242,12 +1246,13 @@ h3.ex-sec-title{
|
|||
.mep-event-theme-1 .btn-mep-event-cart,
|
||||
.mep-template-2-hamza .btn-mep-event-cart,
|
||||
.mep-tem3-mid-sec .btn-mep-event-cart {
|
||||
background: #ff5959 !important;
|
||||
border: 1px solid #ff5959 !important;
|
||||
line-height: 35px !important;
|
||||
background: #ff5959;
|
||||
border: 1px solid #ff5959;
|
||||
line-height: 35px;
|
||||
font-weight: 500;
|
||||
height: 35px;
|
||||
min-width: auto;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.mep-event-review-list-wrapper{
|
||||
|
@ -1381,3 +1386,513 @@ div.mep-default-feature-content p{
|
|||
.mep-event-meta{
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
/***********************
|
||||
* Event List Caraousel Nav CSS
|
||||
* Dev: Ari
|
||||
* Date: 14 Aug 2021
|
||||
************************/
|
||||
.mep_event_list button.owl-next {
|
||||
right: -30px;
|
||||
}
|
||||
.mep_event_list button.owl-prev {
|
||||
left: -30px;
|
||||
}
|
||||
@media only screen and (max-width: 767px) {
|
||||
.mep_event_list button.owl-next {
|
||||
right:0;
|
||||
}
|
||||
.mep_event_list button.owl-prev {
|
||||
left:0;
|
||||
}
|
||||
}
|
||||
|
||||
.mep_event_list .owl-nav > button {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
margin-top: 25px !important;
|
||||
background: #fff !important;
|
||||
border-radius: 50% !important;
|
||||
box-shadow: 0 0 25px 0 rgb(0 0 0 / 25%)!important;
|
||||
border: none !important;
|
||||
outline: 0;
|
||||
}
|
||||
.mep_event_list .owl-nav > button:hover{
|
||||
background: #ff5959 !important;
|
||||
}
|
||||
.mep_event_list .owl-nav i,
|
||||
.mep_event_list button.owl-next,
|
||||
.mep_event_list button.owl-prev{
|
||||
font-size:14px !important;
|
||||
}
|
||||
.mep_event_list .owl-dots button.active {
|
||||
background: #ff5959 !important;
|
||||
}
|
||||
.mep_event_list .owl-dots button {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
display: inline-block;
|
||||
background: #cfcfd0 !important;
|
||||
margin-right: 5px;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
transition: all .4s;
|
||||
-webkit-transition: all .4s;
|
||||
outline: 0;
|
||||
}
|
||||
.mep_event_list .owl-dots button.active::before {
|
||||
border-bottom-color: #ff5959;
|
||||
}
|
||||
.mep_event_list .owl-dots button::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: -10px;
|
||||
border: 7px solid transparent;
|
||||
left: 52%;
|
||||
transform: translateX(-50%);
|
||||
border-bottom-color: #cfcfd0;
|
||||
transition: all .4s;
|
||||
-webkit-transition: all .4s;
|
||||
}
|
||||
.mep_event_list .owl-dots button span{
|
||||
display: none !important;
|
||||
}
|
||||
.mep_event_list .owl-dots{
|
||||
margin: auto;
|
||||
}
|
||||
@media only screen and (max-width: 991px){
|
||||
h2.mep_list_title{
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
span.mep-more-date i, span.mep-more-time i{
|
||||
min-width:25px;
|
||||
}
|
||||
.mep_event_grid_item span.mep_waitlist_label.mep-tem3-title-sec{
|
||||
max-width: 50%;
|
||||
border-radius: 0px 0px 0px 25px;
|
||||
}
|
||||
.mep-city-list li i{
|
||||
margin-right: 5px;
|
||||
}
|
||||
.wp-core-ui .quicktags-toolbar input.button.button-small{
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.mep-event-countdown-timer {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mep-event-countdown-timer > div {
|
||||
width: 25%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mep-event-countdown-timer div.wrapper {
|
||||
min-height: 100px;
|
||||
vertical-align: middle;
|
||||
background: #00000014;
|
||||
margin: 0 10px;
|
||||
border: 1px solid #cac2c2;
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.mep-event-countdown-timer div.wrapper .time {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mep-event-countdown-timer div.wrapper .label {
|
||||
font-size: 18px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.mep-elementor-event-add-to-cart-section-widget td.user-innnf {
|
||||
padding: 0!important;
|
||||
}
|
||||
.mep-elementor-event-add-to-cart-section-widget table td {
|
||||
border: 0px solid #000000;
|
||||
}
|
||||
|
||||
.mep-elementor-event-add-to-cart-section-widget .mep_everyday_date_secs {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mep-elementor-event-add-to-cart-section-widget h4.mep-cart-table-title{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
New Spring list style css added by ariful
|
||||
**************************************************************/
|
||||
.mep_event_spring_list{
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
background: #FCFCFC;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details{
|
||||
width: auto;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_spring_thumb{
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 50%;
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto
|
||||
}
|
||||
.mep_spring_event_time,
|
||||
.mep_spring_event_location,
|
||||
.mep_spring_event_date{
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_date_wrapper{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: linear-gradient(#FF5959, #FE7541);
|
||||
}
|
||||
.mep_event_spring_list .mep_list_date_wrapper .mep_list_date{
|
||||
color: #fff;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.mep_event_spring_list .mep_list_date_wrapper{
|
||||
float: left;
|
||||
width: 24%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details,
|
||||
.mep_event_spring_list .mep_list_spring_thumb_wrapper{
|
||||
float: left;
|
||||
width: 24%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_date_wrapper{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 767px) {
|
||||
.mep_event_spring_list .mep_list_date_wrapper,
|
||||
.mep_event_spring_list .mep_list_event_details,
|
||||
.mep_event_spring_list .mep_list_spring_thumb_wrapper{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-flow: column;
|
||||
min-height: auto;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_date_wrapper{
|
||||
height: 200px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.mep_event_spring_list h4{
|
||||
font-size: 20px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_spring_thumb {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_spring_list{
|
||||
display: flex !important;
|
||||
flex-flow: column;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_spring_thumb_wrapper{
|
||||
order: 1;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details.mep_list_details_col_one{
|
||||
order: 3;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details.mep_list_details_col_two{
|
||||
order: 2;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_date_wrapper{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mep_event_spring_list .mep_more_date_btn.mep-tem3-title-sec.mp_event_hide_event_time{
|
||||
display: none;
|
||||
}
|
||||
.mep_event_spring_list .mep_more_date_btn{
|
||||
margin-left: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_spring_list .mep_more_date_btn:before{
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_spring_list .mep_price{
|
||||
line-height: 25px;
|
||||
}
|
||||
.mep_event_spring_list .mp_event_hide_event_time{
|
||||
position: absolute;
|
||||
z-index: 999999;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
margin-top: 0;
|
||||
height: 38px;
|
||||
}
|
||||
.mep_event_spring_list ul.mp_event_more_date_list{
|
||||
top: 0;
|
||||
max-height: 100%;
|
||||
}
|
||||
.mep_event_spring_list ul.mp_event_more_date_list li{
|
||||
padding: 5px;
|
||||
}
|
||||
.mep_event_spring_list .mep_more_date_btn{
|
||||
background-color: #fff;
|
||||
}
|
||||
.mep_event_spring_list .mep_list_event_details.mep_list_details_col_one i{
|
||||
margin-right: 5px;
|
||||
}
|
||||
.mep_event_spring_list .mep_more_date_btn.mp_event_visible_event_time{
|
||||
display: block !important;
|
||||
}
|
||||
.mep_event_spring_list .mep-eventtype-ribbon{
|
||||
position: inherit;
|
||||
margin-top: 20px;
|
||||
width: max-content;
|
||||
background: #ff5959;
|
||||
}
|
||||
.mep_event_spring_list .mep_spring_list_date{
|
||||
color: #fff;
|
||||
}
|
||||
/*************************************************************
|
||||
New Winter list style css added by ariful
|
||||
**************************************************************/
|
||||
.mep_event_winter_list{
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
background: #1B3045;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_event_details{
|
||||
width: auto;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_winter_thumb{
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 50%;
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
margin: auto;
|
||||
border: 2px solid #F04D42;
|
||||
}
|
||||
.mep_winter_event_time,
|
||||
.mep_winter_event_location,
|
||||
.mep_winter_event_date{
|
||||
margin-bottom: 10px;
|
||||
display: block;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper{
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-image: linear-gradient(#FF5959, #FE7541);
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper .mep_list_date{
|
||||
color: #fff;
|
||||
}
|
||||
@media only screen and (min-width: 768px) {
|
||||
.mep_event_winter_list .mep_list_date_wrapper{
|
||||
float: left;
|
||||
width: 24%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_event_details{
|
||||
float: left;
|
||||
width: 50%;
|
||||
display: block;
|
||||
padding: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_winter_thumb_wrapper{
|
||||
float: left;
|
||||
width: 24%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper{
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper i{
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
color: #FF5959;
|
||||
font-size: 40px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_details_col_one,
|
||||
.mep_event_winter_list .mep_list_details_col_two{
|
||||
width: 50%;
|
||||
float: left;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_title{
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_title a{
|
||||
font-weight: 600;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_details_col_wrapper{
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 767px) {
|
||||
.mep_event_winter_list .mep_list_date_wrapper,
|
||||
.mep_event_winter_list .mep_list_event_details,
|
||||
.mep_event_winter_list .mep_list_winter_thumb_wrapper{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex-flow: column;
|
||||
min-height: auto;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper{
|
||||
height: 200px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_event_details{
|
||||
order: 2;
|
||||
padding: 10px;
|
||||
}
|
||||
.mep_event_winter_list h4{
|
||||
font-size: 20px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_winter_thumb {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_winter_list{
|
||||
display: flex !important;
|
||||
flex-flow: column;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_winter_thumb_wrapper{
|
||||
order: 1;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_event_details.mep_list_details_col_one{
|
||||
order: 3;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_event_details.mep_list_details_col_two{
|
||||
order: 2;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_date_wrapper{
|
||||
display: none;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_details_col_wrapper {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_title{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_details_col_one a{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.mep_event_winter_list .mep_more_date_btn.mep-tem3-title-sec.mp_event_hide_event_time{
|
||||
display: none;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn{
|
||||
margin-left: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn:before{
|
||||
border-radius: 0;
|
||||
}
|
||||
.mep_event_winter_list .mep_price{
|
||||
line-height: 25px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.mep_event_winter_list .mp_event_hide_event_time{
|
||||
position: absolute;
|
||||
z-index: 999999;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
margin-top: 0;
|
||||
height: 38px;
|
||||
}
|
||||
.mep_event_winter_list ul.mp_event_more_date_list{
|
||||
top: 0;
|
||||
max-height: 100%;
|
||||
}
|
||||
.mep_event_winter_list ul.mp_event_more_date_list li{
|
||||
padding: 5px;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn{
|
||||
background-color: #ff5959;
|
||||
color: #fff;
|
||||
}
|
||||
.mep_event_winter_list .mep_list_details_col_one i{
|
||||
margin-right: 5px;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn.mp_event_visible_event_time{
|
||||
display: block !important;
|
||||
}
|
||||
.mep_event_winter_list .mep-eventtype-ribbon{
|
||||
position: inherit;
|
||||
width: max-content;
|
||||
background: #ff5959;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.mep_event_winter_list a,
|
||||
.mep_event_winter_list .mep_price{
|
||||
color: #fff;
|
||||
}
|
||||
.mep_event_winter_list .mep_winter_list_dd{
|
||||
display: block;
|
||||
text-align: center;
|
||||
font-size: 45px;
|
||||
font-weight: 900;
|
||||
line-height: 45px;
|
||||
}
|
||||
.mep_event_winter_list .mep_winter_list_date{
|
||||
color: #fff;
|
||||
}
|
||||
.mep_event_winter_list .mep_winter_event_location span{
|
||||
margin-left: 5px;
|
||||
}
|
||||
.mep_event_winter_list .mep_more_date_btn{
|
||||
margin-top: 0;
|
||||
}
|
||||
.mep_event_winter_list .mep-multidate-ribbon span{
|
||||
width: 90px;
|
||||
}
|
||||
.mep_event_winter_list .mep-multidate-ribbon{
|
||||
background: #ff5959;
|
||||
}
|
|
@ -965,3 +965,104 @@ function mep_licensing_page($form){
|
|||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
add_action('wsa_form_bottom_mep_settings_templates','mep_settings_template_page',5);
|
||||
function mep_settings_template_page($form){
|
||||
?>
|
||||
<div class='mep-licensing-page'>
|
||||
<h3>Ready Templates For Event Details Page.</h3>
|
||||
|
||||
|
||||
<div class="mep_licensae_info"></div>
|
||||
|
||||
|
||||
<div class="mep-template-lists">
|
||||
|
||||
|
||||
<?php
|
||||
$url = 'https://vaincode.com/update/template/template.json';
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
$data = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
$obj = json_decode($data, true);
|
||||
|
||||
// print_r($data);
|
||||
|
||||
if(is_array($obj) && sizeof($obj) > 0){
|
||||
echo '<div class="mep_ready_template_sec"><ul class="mep_ready_template_list">';
|
||||
foreach ($obj as $list) {
|
||||
$name = $list['name'];
|
||||
$banner = $list['banner'];
|
||||
$url = $list['url'];
|
||||
$type = $list['type'];
|
||||
$editor = $list['editor'];
|
||||
$preview = $list['preview'];
|
||||
$name_slug = sanitize_title($name);
|
||||
$count_import = get_option('mep_import_template_'.$name_slug) ? get_option('mep_import_template_'.$name_slug) : 0;
|
||||
echo '<li>';
|
||||
echo '<div class="template-thumb"><img src='.$banner.'></div>';
|
||||
echo '<h3>'.$name.'</h3>';
|
||||
|
||||
if($count_import > 0){
|
||||
echo '<p class="mep-template-import-count"> Imported '.$count_import.' times</p>';
|
||||
}
|
||||
|
||||
if ( did_action( 'elementor/loaded' ) && $editor == 'elm' ) {
|
||||
echo "<button class='import_template' data-file='$url' data-name='$name' data-editor='$editor' data-type='$type'>Import</button>";
|
||||
}else{
|
||||
echo "<p class='mep-msg mep-msg-warning'>Elementor Not Installed</p>";
|
||||
}
|
||||
echo "<a href='$preview' class='preview-btn btn' target='_blank'>Preview</a>";
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
jQuery('.import_template').on('click', function() {
|
||||
if (confirm('Are You Sure to Import this Template ? \n\n 1. Ok : To Import . \n 2. Cancel : To Cancel .')) {
|
||||
var file = jQuery(this).data('file');
|
||||
var type = jQuery(this).data('type');
|
||||
var editor = jQuery(this).data('editor');
|
||||
var name = jQuery(this).data('name');
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
"action" : "mep_import_ajax_template",
|
||||
"file" : file,
|
||||
"editor" : editor,
|
||||
"name" : name,
|
||||
"type" : type
|
||||
|
||||
},
|
||||
beforeSend: function() {
|
||||
jQuery('.mep_licensae_info').html('<h5 class="mep-msg mep-msg-process">Please wait.. Importing Template..</h5>');
|
||||
},
|
||||
success: function(data) {
|
||||
jQuery('.mep_licensae_info').html(data);
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
|
@ -497,18 +497,14 @@ class MAGE_Setting_API {
|
|||
*/
|
||||
function show_navigation() {
|
||||
$html = '<h2 class="nav-tab-wrapper">';
|
||||
|
||||
$count = count( $this->settings_sections );
|
||||
|
||||
// don't show the navigation if only one section exists
|
||||
if ( $count === 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ( $this->settings_sections as $tab ) {
|
||||
$html .= sprintf( '<a href="#%1$s" class="nav-tab" id="%1$s-tab">%2$s</a>', $tab['id'], $tab['title'] );
|
||||
}
|
||||
|
||||
$html .= '</h2>';
|
||||
|
||||
echo $html;
|
||||
|
|
|
@ -79,6 +79,7 @@ function mep_event_enqueue_scripts()
|
|||
wp_enqueue_script('mep-moment-js', plugin_dir_url(__DIR__) . 'js/moment.js', array(), 1, true);
|
||||
wp_enqueue_script('mep-calendar-scripts', plugin_dir_url(__DIR__) . 'js/calendar.min.js', array('jquery', 'mep-moment-js'), 1, false);
|
||||
wp_enqueue_script('mep-mixitup-min-js', plugin_dir_url(__DIR__) . 'js/mixitup.min.js', array(), 1, true);
|
||||
wp_enqueue_script('mep-countdown-js', plugin_dir_url(__DIR__) . 'js/countdown.jquery.min.js', array(), 1, true);
|
||||
|
||||
wp_enqueue_script('mp_event_custom_script', plugin_dir_url(__DIR__) . 'js/mp_event_custom_script.js', array(), 1, true);
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ function mep_fw_meta_boxs()
|
|||
'type' => 'repeatable',
|
||||
'btn_text' => __('Add New F.A.Q','mage-eventpress'),
|
||||
'title_field' => 'mep_faq_title',
|
||||
'args' => '',
|
||||
'fields' => array(
|
||||
array(
|
||||
'type' => 'text',
|
||||
|
@ -141,7 +142,7 @@ function mep_fw_meta_boxs()
|
|||
'default' => '',
|
||||
'item_id' => 'mep_faq_content',
|
||||
'name' => __('Content','mage-eventpress')
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -851,6 +851,7 @@ class MP_Event_All_Info_In_One
|
|||
<table>
|
||||
<?php
|
||||
$this->mp_event_reg_status($post_id);
|
||||
$this->mp_event_enddatetime_status($post_id);
|
||||
$this->mp_event_available_seat_status($post_id);
|
||||
$this->mp_event_reset_booking_count($post_id);
|
||||
do_action('mp_event_switching_button_hook', $post_id);
|
||||
|
@ -859,6 +860,38 @@ class MP_Event_All_Info_In_One
|
|||
</table>
|
||||
<?php
|
||||
}
|
||||
// mep_show_end_datetime
|
||||
|
||||
|
||||
|
||||
public function mp_event_enddatetime_status($post_id)
|
||||
{
|
||||
$values = get_post_custom($post_id);
|
||||
// wp_nonce_field('mep_event_reg_btn_nonce', 'mep_event_reg_btn_nonce');
|
||||
$mep_show_end_datetime = '';
|
||||
if (array_key_exists('mep_show_end_datetime', $values)) {
|
||||
// echo $values['mep_show_end_datetime'][0];
|
||||
if ($values['mep_show_end_datetime'][0] == 'yes') {
|
||||
$mep_show_end_datetime = 'checked';
|
||||
}
|
||||
} else {
|
||||
$mep_show_end_datetime = 'checked';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<tr>
|
||||
<th><span><?php _e('Display End Datetime:', 'mage-eventpress'); ?></span></th>
|
||||
<td colspan="3">
|
||||
<label>
|
||||
<input class="mp_opacity_zero" type="checkbox" name="mep_show_end_datetime" value='yes' <?php echo $mep_show_end_datetime; ?> />
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
public function mp_event_reg_status($post_id)
|
||||
{
|
||||
|
@ -1314,6 +1347,7 @@ function mep_event_meta_save($post_id)
|
|||
|
||||
|
||||
$mep_reg_status = isset($_POST['mep_reg_status']) ? strip_tags($_POST['mep_reg_status']) : 'off';
|
||||
$mep_show_end_datetime = isset($_POST['mep_show_end_datetime']) ? strip_tags($_POST['mep_show_end_datetime']) : 'no';
|
||||
$mep_reset_status = isset($_POST['mep_reset_status']) ? strip_tags($_POST['mep_reset_status']) : 'off';
|
||||
$mep_available_seat = isset($_POST['mep_available_seat']) ? strip_tags($_POST['mep_available_seat']) : 'off';
|
||||
$_tax_status = isset($_POST['_tax_status']) ? strip_tags($_POST['_tax_status']) : 'none';
|
||||
|
@ -1326,6 +1360,7 @@ function mep_event_meta_save($post_id)
|
|||
mep_reset_event_booking($post_id);
|
||||
}
|
||||
|
||||
update_post_meta($post_id, 'mep_show_end_datetime', $mep_show_end_datetime);
|
||||
update_post_meta($post_id, 'mep_rich_text_status', $mep_rich_text_status);
|
||||
update_post_meta($post_id, 'mep_available_seat', $mep_available_seat);
|
||||
update_post_meta($post_id, 'mep_reg_status', $mep_reg_status);
|
||||
|
|
|
@ -8,6 +8,13 @@ if (!defined('ABSPATH')) {
|
|||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This Function Recieve the date from user selection and add them into the cart session data
|
||||
*/
|
||||
|
@ -41,14 +48,6 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
|
|||
// die();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Now Store the datas into Cart Session
|
||||
*/
|
||||
|
@ -71,10 +70,13 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
|
|||
$cart_item_data['event_recurring_date_arr'] = $recurring_event_date;
|
||||
$cart_item_data['event_cart_display_date'] = $mep_event_start_date[0];
|
||||
do_action('mep_event_cart_data_reg');
|
||||
}
|
||||
|
||||
$cart_item_data['event_id'] = $product_id;
|
||||
|
||||
return apply_filters('mep_event_cart_item_data',$cart_item_data,$product_id,$total_price,$user,$ticket_type_arr,$event_extra);
|
||||
}else{
|
||||
return $cart_item_data;
|
||||
}
|
||||
}
|
||||
add_filter('woocommerce_add_cart_item_data', 'mep_add_custom_fields_text_to_cart_item', 90, 3);
|
||||
|
||||
|
@ -190,10 +192,6 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
|
|||
echo '</li>';
|
||||
} else {
|
||||
if($hide_date_status == 'no'){
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<li><?php echo $event_label; _e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($cart_item['event_cart_display_date'],'date-time-text'); ?></li>
|
||||
<?php
|
||||
|
|
|
@ -29,4 +29,4 @@ if (!class_exists('EDD_SL_Plugin_Updater')) {
|
|||
require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
|
||||
require_once(dirname(__DIR__) . "/inc/mep_functions.php");
|
||||
require_once(dirname(__DIR__) . "/inc/mep_query.php");
|
||||
// require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");
|
||||
require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");
|
|
@ -2254,9 +2254,6 @@ if (!function_exists('mep_event_total_seat')) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('get_mep_datetime')) {
|
||||
function get_mep_datetime($date,$type){
|
||||
$date_format = get_option( 'date_format' );
|
||||
|
@ -2283,6 +2280,20 @@ function get_mep_datetime($date,$type){
|
|||
return wp_date( $time_format, $timestamp, wp_timezone());
|
||||
}
|
||||
|
||||
if($type == 'Hour'){
|
||||
return wp_date( 'H', $timestamp, wp_timezone());
|
||||
}
|
||||
if($type == 'hour'){
|
||||
return wp_date( 'h', $timestamp, wp_timezone());
|
||||
}
|
||||
if($type == 'minute'){
|
||||
return wp_date( 'i', $timestamp, wp_timezone());
|
||||
}
|
||||
|
||||
if($type == 'second'){
|
||||
return wp_date( 's', $timestamp, wp_timezone());
|
||||
}
|
||||
|
||||
if($type == 'day'){
|
||||
return wp_date( 'd', $timestamp );
|
||||
}
|
||||
|
@ -2290,11 +2301,88 @@ function get_mep_datetime($date,$type){
|
|||
return wp_date( 'D', $timestamp );
|
||||
}
|
||||
if($type == 'month'){
|
||||
return wp_date( 'm', $timestamp );
|
||||
}
|
||||
if($type == 'month-name'){
|
||||
return wp_date( 'M', $timestamp );
|
||||
}
|
||||
if($type == 'year'){
|
||||
return wp_date( 'y', $timestamp );
|
||||
}
|
||||
if($type == 'year-full'){
|
||||
return wp_date( 'Y', $timestamp );
|
||||
}
|
||||
if($type == 'timezone'){
|
||||
return wp_date( 'T', $timestamp );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function mep_get_location($event_id,$type){
|
||||
|
||||
$location_sts = get_post_meta($event_id, 'mep_org_address', true) ? get_post_meta($event_id, 'mep_org_address', true) : '';
|
||||
if ($location_sts) {
|
||||
$org_arr = get_the_terms($event_id, 'mep_org') ? get_the_terms($event_id, 'mep_org') : [];
|
||||
$org_id = sizeof($org_arr) > 0 ? $org_arr[0]->term_id : '';
|
||||
$location = !empty($org_id) && get_term_meta($org_id, 'org_location', true) ? get_term_meta($org_id, 'org_location', true) : '';
|
||||
$street = !empty($org_id) && get_term_meta($org_id, 'org_street', true) ? get_term_meta($org_id, 'org_street', true) : '';
|
||||
$city = !empty($org_id) && get_term_meta($org_id, 'org_city', true) ? get_term_meta($org_id, 'org_city', true) : '';
|
||||
$state = !empty($org_id) && get_term_meta($org_id, 'org_state', true) ? get_term_meta($org_id, 'org_state', true) : '';
|
||||
$zip = !empty($org_id) && get_term_meta($org_id, 'org_postcode', true) ? get_term_meta($org_id, 'org_postcode', true) : '';
|
||||
$country = !empty($org_id) && get_term_meta($org_id, 'org_country', true) ? get_term_meta($org_id, 'org_country', true) : '';
|
||||
} else {
|
||||
$location = get_post_meta($event_id, 'mep_location_venue', true) ? get_post_meta($event_id, 'mep_location_venue', true) : '';
|
||||
$street = get_post_meta($event_id, 'mep_street', true) ? get_post_meta($event_id, 'mep_street', true) : '';
|
||||
$city = get_post_meta($event_id, 'mep_city', true) ? get_post_meta($event_id, 'mep_city', true) : '';
|
||||
$state = get_post_meta($event_id, 'mep_state', true) ? get_post_meta($event_id, 'mep_state', true) : '';
|
||||
$zip = get_post_meta($event_id, 'mep_postcode', true) ? get_post_meta($event_id, 'mep_postcode', true) : '';
|
||||
$country = get_post_meta($event_id, 'mep_country', true) ? get_post_meta($event_id, 'mep_country', true) : '';
|
||||
}
|
||||
$location_arr = [$location, $street, $city, $state, $zip, $country];
|
||||
|
||||
if($type == 'full'){
|
||||
|
||||
echo implode(',', array_filter($location_arr));
|
||||
}
|
||||
|
||||
if($type == 'location'){
|
||||
echo $location;
|
||||
}
|
||||
|
||||
if($type == 'street'){
|
||||
echo $street;
|
||||
}
|
||||
|
||||
if($type == 'state'){
|
||||
echo $state;
|
||||
}
|
||||
|
||||
if($type == 'city'){
|
||||
echo $city;
|
||||
}
|
||||
|
||||
if($type == 'zip'){
|
||||
echo $zip;
|
||||
}
|
||||
|
||||
if($type == 'country'){
|
||||
echo $country;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('mep_get_event_upcomming_date')) {
|
||||
function mep_get_event_upcomming_date($event_id,$type){
|
||||
|
||||
|
@ -2315,7 +2403,6 @@ if (!function_exists('mep_get_event_upcomming_date')) {
|
|||
$all_datetime[] = date('Y-m-d H:i:s',strtotime($mdate['event_more_start_date'].' '.$mdate['event_more_start_time']));
|
||||
}
|
||||
}
|
||||
|
||||
$adt = [];
|
||||
foreach($all_datetime as $ald){
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($ald)) {
|
||||
|
@ -2469,15 +2556,33 @@ if (!function_exists('mep_on_post_publish')) {
|
|||
}
|
||||
}
|
||||
|
||||
add_action('wp_head','mep_exclude_hidden_product_from_search_engine');
|
||||
function mep_exclude_hidden_product_from_search_engine(){
|
||||
global $post;
|
||||
if(is_single() && is_product()){
|
||||
$post_id = $post->ID;
|
||||
$visibility = get_the_terms( $post_id, 'product_visibility' ) ? get_the_terms( $post_id, 'product_visibility' ) : [0];
|
||||
if(is_object($visibility[0])){
|
||||
if($visibility[0]->name == 'exclude-from-catalog'){
|
||||
$check_event_hidden = get_post_meta($post_id,'link_mep_event',true) ? get_post_meta($post_id,'link_mep_event',true) : 0;
|
||||
if($check_event_hidden > 0){
|
||||
echo '<!--Exclude Hidden Event Wc Product From Search Engine--> <meta name="robots" content="noindex, nofollow">';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_action('wp','mep_hide_hidden_product_from_single');
|
||||
|
||||
|
||||
add_action('wp','mep_hide_hidden_product_from_single',90);
|
||||
if (!function_exists('mep_hide_hidden_product_from_single')) {
|
||||
function mep_hide_hidden_product_from_single(){
|
||||
global $post,$wp_query;
|
||||
if(is_product()){
|
||||
$post_id = $post->ID;
|
||||
$visibility = get_the_terms( $post_id, 'product_visibility' );
|
||||
if(is_object($visibility)){
|
||||
$visibility = get_the_terms( $post_id, 'product_visibility' ) ? get_the_terms( $post_id, 'product_visibility' ) : [0];
|
||||
if(is_object($visibility[0])){
|
||||
if($visibility[0]->name == 'exclude-from-catalog'){
|
||||
$check_event_hidden = get_post_meta($post_id,'link_mep_event',true) ? get_post_meta($post_id,'link_mep_event',true) : 0;
|
||||
if($check_event_hidden > 0){
|
||||
|
@ -2750,9 +2855,8 @@ function mep_event_rich_text_data(){
|
|||
if(is_single()){
|
||||
$event_id = $post->ID;
|
||||
if($event_id && get_post_type($event_id) == 'mep_events'){
|
||||
|
||||
$event_name = get_the_title($event_id);
|
||||
$event_start_date = get_post_meta($post->ID,'event_start_datetime',true) ? get_post_meta($post->ID,'event_start_datetime',true) : '';
|
||||
$event_start_date = get_post_meta($post->ID,'event_start_datetime',true) ? wp_date( 'Y-m-d H:i:s T',strtotime(get_post_meta($post->ID,'event_start_datetime',true))) : '';
|
||||
$event_end_date = get_post_meta($post->ID,'event_end_datetime',true) ? get_post_meta($post->ID,'event_end_datetime',true) : '';
|
||||
$event_rt_status = get_post_meta($post->ID,'mep_rt_event_status',true) ? get_post_meta($post->ID,'mep_rt_event_status',true) : 'EventRescheduled';
|
||||
$event_rt_atdnce_mode = get_post_meta($post->ID,'mep_rt_event_attandence_mode',true) ? get_post_meta($post->ID,'mep_rt_event_attandence_mode',true) : 'OfflineEventAttendanceMode';
|
||||
|
@ -2771,6 +2875,8 @@ if($event_id && get_post_type($event_id) == 'mep_events'){
|
|||
"name": "<?php echo $event_name; ?>",
|
||||
"startDate": "<?php echo $event_start_date; ?>",
|
||||
"endDate": "<?php echo $event_end_date; ?>",
|
||||
"organizer": "<?php echo $org_name; ?>",
|
||||
|
||||
"eventStatus": "https://schema.org/<?php echo $event_rt_status; ?>",
|
||||
"eventAttendanceMode": "https://schema.org/<?php echo $event_rt_atdnce_mode; ?>",
|
||||
"previousStartDate": "<?php echo $event_rt_prv_date; ?>",
|
||||
|
@ -2855,6 +2961,10 @@ function mep_custom_css_settings_reg($default_sec){
|
|||
'id' => 'mep_settings_custom_css',
|
||||
'title' => __( 'Custom CSS', 'mage-eventpress' )
|
||||
),
|
||||
array(
|
||||
'id' => 'mep_settings_templates',
|
||||
'title' => __( 'Templates', 'mage-eventpress' )
|
||||
),
|
||||
array(
|
||||
'id' => 'mep_settings_licensing',
|
||||
'title' => __( 'License', 'mage-eventpress' )
|
||||
|
@ -3150,7 +3260,7 @@ ob_start();
|
|||
if (!function_exists('mep_cart_order_data_save_ticket_type')) {
|
||||
function mep_cart_order_data_save_ticket_type($item,$ticket_type_arr,$eid){
|
||||
foreach ($ticket_type_arr as $ticket) {
|
||||
$ticket_type_name = $ticket['ticket_name'] . " - " . mep_get_price_including_tax($eid,(int) $ticket['ticket_price']) . ' x ' . $ticket['ticket_qty'] . ' = ';
|
||||
$ticket_type_name = $ticket['ticket_name'] . " - " . wc_price(mep_get_price_including_tax($eid,(int) $ticket['ticket_price'])) . ' x ' . $ticket['ticket_qty'] . ' = ';
|
||||
$ticket_type_val = wc_price(mep_get_price_including_tax($eid,(int) (float) $ticket['ticket_price'] * (float) $ticket['ticket_qty']));
|
||||
$ticket_name_meta = apply_filters('mep_event_order_meta_ticket_name_filter',$ticket_type_name,$ticket);
|
||||
$item->add_meta_data($ticket_name_meta, $ticket_type_val);
|
||||
|
@ -3788,13 +3898,12 @@ function mep_get_event_add_cart_sec($post_id){
|
|||
do_action('mep_event_ticket_type_extra_service', $post_id);
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id, "_price", true); ?>" />
|
||||
|
||||
<input type="hidden" name='currency_symbol' value="<?php echo get_woocommerce_currency_symbol(); ?>">
|
||||
<input type="hidden" name='currency_position' value="<?php echo get_option('woocommerce_currency_pos'); ?>">
|
||||
<input type="hidden" name='currency_decimal' value="<?php echo wc_get_price_decimal_separator(); ?>">
|
||||
<input type="hidden" name='currency_thousands_separator' value="<?php echo wc_get_price_thousand_separator(); ?>">
|
||||
<input type="hidden" name='currency_number_of_decimal' value="<?php echo wc_get_price_decimals(); ?>">
|
||||
|
||||
<?php do_action('mep_add_term_condition',$post_id); ?>
|
||||
<!--The Add to cart button table start Here-->
|
||||
<table class='table table-bordered mep_event_add_cart_table'>
|
||||
<tr>
|
||||
|
@ -3971,7 +4080,7 @@ function mep_wl_ajax_license_activate(){
|
|||
$license_data = json_decode(wp_remote_retrieve_body($response));
|
||||
|
||||
if (is_wp_error($response) || 200 !== wp_remote_retrieve_response_code($response)) {
|
||||
$message = (is_wp_error($response) && !empty($response->get_error_message())) ? $response->get_error_message() : __('An error occurred, please try again.');
|
||||
$message = (is_wp_error($response) && !empty($response->get_error_message())) ? $response->get_error_message() : __('<h5 class="mep-msg mep-msg-warning">An error occurred, please try again.</h5>');
|
||||
}else{
|
||||
|
||||
if (false === $license_data->success) {
|
||||
|
@ -3979,7 +4088,7 @@ function mep_wl_ajax_license_activate(){
|
|||
}else{
|
||||
$payment_id = $license_data->payment_id;
|
||||
$expire = $license_data->expires;
|
||||
$message = __("Success, License Key is valid for the plugin $item_name. Your Order id is $payment_id. Validity of this licenses is $expire.","mage-eventpress");
|
||||
$message = __("<h5 class='mep-msg mep-msg-success'>Success, License Key is valid for the plugin $item_name. Your Order id is $payment_id. Validity of this licenses is $expire.</h5>","mage-eventpress");
|
||||
}
|
||||
}
|
||||
if($license_data->success){
|
||||
|
@ -3998,6 +4107,9 @@ die();
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('wp_ajax_mep_wl_ajax_license_deactivate', 'mep_wl_ajax_license_deactivate');
|
||||
add_action('wp_ajax_nopriv_mep_wl_ajax_license_deactivate', 'mep_wl_ajax_license_deactivate');
|
||||
function mep_wl_ajax_license_deactivate(){
|
||||
|
@ -4095,6 +4207,30 @@ function mep_location_existis($meta_name,$event_id){
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************
|
||||
* Functions Dev by @Ariful
|
||||
**************************/
|
||||
function mep_elementor_get_events($default) {
|
||||
$args = array('post_type' => 'mep_events', );
|
||||
$list = array( '0' => $default );
|
||||
|
||||
$the_query = new WP_Query( $args );
|
||||
|
||||
|
||||
if ( $the_query->have_posts() ) {
|
||||
while ( $the_query->have_posts() ) {
|
||||
$the_query->the_post();
|
||||
$list[get_the_id()] = get_the_title();
|
||||
}
|
||||
}
|
||||
|
||||
wp_reset_postdata();
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
function mep_get_list_thumbnail_src($event_id){
|
||||
|
||||
$thumbnail_id = get_post_meta($event_id,'mep_list_thumbnail',true) ? get_post_meta($event_id,'mep_list_thumbnail',true) : 0;
|
||||
|
@ -4107,3 +4243,54 @@ function mep_get_list_thumbnail_src($event_id){
|
|||
echo $thumbnail[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function mep_import_elementor_template( $filepath ) {
|
||||
$fileContent = file_get_contents( $filepath );
|
||||
$fileJson = json_decode( $fileContent, true );
|
||||
$result = \Elementor\Plugin::instance()->templates_manager->import_template( [
|
||||
'fileData' => base64_encode( $fileContent ),
|
||||
'fileName' => 'test.json',
|
||||
]
|
||||
);
|
||||
if ( empty( $result ) || empty( $result[0] ) ) {
|
||||
return;
|
||||
}
|
||||
update_post_meta( $result[0]['template_id'], '_elementor_location', 'myCustomLocation' );
|
||||
update_post_meta( $result[0]['template_id'], '_elementor_conditions', [ 'include/general' ] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('wp_ajax_mep_import_ajax_template', 'mep_import_ajax_template');
|
||||
add_action('wp_ajax_nopriv_mep_import_ajax_template', 'mep_import_ajax_template');
|
||||
function mep_import_ajax_template(){
|
||||
$file = esc_url($_REQUEST['file']);
|
||||
$type = sanitize_text_field($_REQUEST['type']);
|
||||
$editor = sanitize_text_field($_REQUEST['editor']);
|
||||
$name = sanitize_text_field($_REQUEST['name']);
|
||||
$name_slug = sanitize_title($name);
|
||||
$count_import = get_option('mep_import_template_'.$name_slug) ? get_option('mep_import_template_'.$name_slug) : 0;
|
||||
$increase_count = $count_import +1;
|
||||
if($editor == 'elm'){
|
||||
mep_import_elementor_template($file);
|
||||
$increase_count = $count_import +1;
|
||||
update_option('mep_import_template_'.$name_slug, $increase_count);
|
||||
echo '<h5 class="mep-msg mep-msg-success">The Template: '.$name.' Imported Successfully</h5>';
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
add_filter('mep_check_product_into_cart','mep_disable_add_to_cart_if_product_is_in_cart',10,2);
|
||||
function mep_disable_add_to_cart_if_product_is_in_cart ( $is_purchasable, $product ){
|
||||
// Loop through cart items checking if the product is already in cart
|
||||
if(!is_admin() && !empty(WC()->cart->get_cart())){
|
||||
foreach ( WC()->cart->get_cart() as $cart_item ){
|
||||
if( $cart_item['data']->get_id() == $product ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $is_purchasable;
|
||||
}
|
|
@ -61,7 +61,8 @@ function mep_event_query($show, $sort = '', $cat = '', $org = '', $city = '', $c
|
|||
'posts_per_page' => $show,
|
||||
'order' => $sort,
|
||||
'orderby' => 'meta_value',
|
||||
'meta_key' => 'event_start_datetime',
|
||||
// 'meta_key' => 'event_start_datetime',
|
||||
'meta_key' => 'event_upcoming_datetime',
|
||||
'meta_query' => array(
|
||||
$expire_filter,
|
||||
$city_filter,
|
||||
|
|
|
@ -295,13 +295,17 @@ function mep_expire_event_list($atts, $content = null)
|
|||
*/
|
||||
$loop = mep_event_query($show, $sort, $cat, $org, $city, $country, 'expired');
|
||||
$total_post = $loop->post_count;
|
||||
echo '<div class="mage_grid_box">';
|
||||
echo $main_div;
|
||||
while ($loop->have_posts()) {
|
||||
$loop->the_post();
|
||||
if ($style == 'grid' && (int)$column>0) {
|
||||
$columnNumber='column_style';
|
||||
if($pagination == 'carousal'){
|
||||
$width=100;
|
||||
}else{
|
||||
$width=100/(int)$column;
|
||||
} else {
|
||||
}
|
||||
}else {
|
||||
$columnNumber = 'one_column';
|
||||
$width=100;
|
||||
}
|
||||
|
@ -317,7 +321,36 @@ function mep_expire_event_list($atts, $content = null)
|
|||
* The Pagination function mep_event_pagination is locet in inc/mep_query.php File
|
||||
*/
|
||||
mep_event_pagination($loop->max_num_pages);
|
||||
} ?>
|
||||
}elseif($pagination == 'carousal'){
|
||||
?>
|
||||
<script>
|
||||
jQuery(function(){
|
||||
jQuery("<?php echo '#mep-carousel'.$cid; ?>").owlCarousel({
|
||||
autoplay: <?php echo mep_get_option('mep_autoplay_carousal', 'carousel_setting_sec', 'true'); ?>,
|
||||
autoplayTimeout:<?php echo mep_get_option('mep_speed_carousal', 'carousel_setting_sec', '5000'); ?>,
|
||||
autoplayHoverPause: true,
|
||||
loop: <?php echo mep_get_option('mep_loop_carousal', 'carousel_setting_sec', 'true'); ?>,
|
||||
margin:20,
|
||||
nav:<?php echo $nav; ?>,
|
||||
dots:<?php echo $dot; ?>,
|
||||
navText: ["<i class='fas fa-chevron-left'></i>","<i class='fas fa-chevron-right'></i>"],
|
||||
responsive:{
|
||||
0:{
|
||||
items:1
|
||||
},
|
||||
600:{
|
||||
items:<?php echo $column; ?>
|
||||
},
|
||||
1000:{
|
||||
items:<?php echo $column; ?>
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
@ -332,18 +365,20 @@ function mep_expire_event_list($atts, $content = null)
|
|||
}
|
||||
|
||||
|
||||
|
||||
add_shortcode('event-add-cart-section', 'mep_event_add_to_cart_section');
|
||||
function mep_event_add_to_cart_section($atts, $content = null)
|
||||
{
|
||||
$defaults = array(
|
||||
"event" => "0"
|
||||
"event" => "0",
|
||||
"cart-btn-label" => "Register For This Event",
|
||||
"ticket-label" => "Ticket Type",
|
||||
"extra-service-label" => "Extra Service"
|
||||
);
|
||||
$params = shortcode_atts($defaults, $atts);
|
||||
$event = $params['event'];
|
||||
ob_start();
|
||||
if($event > 0){
|
||||
echo mep_shortcode_add_cart_section_html($event);
|
||||
echo mep_shortcode_add_cart_section_html($event,$params);
|
||||
do_action('mep_after_event_cart_shortcode',$event);
|
||||
}
|
||||
return ob_get_clean();
|
||||
|
|
|
@ -28,10 +28,25 @@ function mep_user_custom_styles()
|
|||
ul.mp_event_more_date_list li:hover{
|
||||
background-color:<?php echo $base_color; ?>;
|
||||
}
|
||||
.mep-default-sidrbar-events-schedule ul li i, .mep-ev-start-date, h3.mep_list_date i, .mep-list-footer ul li i, .df-ico i, .mep-default-sidrbar-meta i, .mep-default-sidrbar-address ul li i, .mep-default-sidrbar-social ul li a, .mep-tem3-title-sec, button.mep-cat-control, .pagination-sec a {
|
||||
.mep-default-sidrbar-events-schedule ul li i, .mep-ev-start-date, h3.mep_list_date i, .df-ico i, .mep-default-sidrbar-address ul li i, .mep-default-sidrbar-social ul li a, button.mep-cat-control, .pagination-sec a {
|
||||
background: <?php echo $base_color; ?>;
|
||||
}
|
||||
|
||||
.mep-default-sidrbar-meta .fa-list-alt,.mep-list-footer ul li i {
|
||||
background: transparent;
|
||||
color: <?php echo $base_color; ?>;
|
||||
}
|
||||
.mep_more_date_btn{
|
||||
border: 1px solid <?php echo $base_color; ?>;
|
||||
background: transparent;
|
||||
color: <?php echo $base_color; ?>;
|
||||
}
|
||||
.mep-default-sidrbar-meta p a{
|
||||
color: <?php echo $base_color; ?>;
|
||||
}
|
||||
.mep_more_date_btn:before{
|
||||
background: <?php echo $base_color; ?>;
|
||||
border-color: <?php echo $base_color; ?>;
|
||||
}
|
||||
.mep-default-sidrbar-events-schedule h3 i, .mep_event_list .mep_list_date, .mep-event-theme-1 .mep-social-share li a, .mep-template-2-hamza .mep-social-share li a {
|
||||
color: <?php echo $base_color; ?>;
|
||||
}
|
||||
|
@ -46,7 +61,7 @@ function mep_user_custom_styles()
|
|||
|
||||
|
||||
/*Cart sec Label Style*/
|
||||
.mep-default-feature-cart-sec h3, .mep-event-theme-1 h3.ex-sec-title, .mep-tem3-mid-sec h3.ex-sec-title {
|
||||
.mep-default-feature-cart-sec h3, .mep-event-theme-1 h3.ex-sec-title, .mep-tem3-mid-sec h3.ex-sec-title, .mep-tem3-title-sec {
|
||||
background: <?php echo $label_bg_color; ?>;
|
||||
color: <?php echo $label_text_color; ?>;
|
||||
}
|
||||
|
|
|
@ -3,18 +3,22 @@ if (!defined('ABSPATH')) {
|
|||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_add_to_cart', 'mep_get_event_reg_btn');
|
||||
add_action('mep_add_to_cart', 'mep_get_event_reg_btn',10,2);
|
||||
if (!function_exists('mep_get_event_reg_btn')) {
|
||||
// Get Event Registration Button
|
||||
function mep_get_event_reg_btn($event_id = '')
|
||||
function mep_get_event_reg_btn($event_id = '',$params=[])
|
||||
{
|
||||
|
||||
// print_r($params);
|
||||
global $post, $event_meta;
|
||||
$saved_user_role = get_post_meta($event_id, 'mep_member_only_user_role', true) ? get_post_meta($event_id, 'mep_member_only_user_role', true) : [];
|
||||
$event_member_type = get_post_meta($event_id, 'mep_member_only_event', true) ? get_post_meta($event_id, 'mep_member_only_event', true) : 'for_all';
|
||||
|
||||
|
||||
|
||||
$cart_btn_label = array_key_exists('cart-btn-label',$params) ? $params['cart-btn-label'] : mep_get_label($event_id, 'mep_cart_btn_text', __('Register This Event','mage-eventpress'));
|
||||
$ticket_type_label = array_key_exists('ticket-label',$params) ? $params['ticket-label'] : mep_get_label($event_id, 'mep_event_ticket_type_text', __('Ticket Type:','mage-eventpress'));
|
||||
$extra_service_label = array_key_exists('extra-service-label',$params) ? $params['extra-service-label'] : mep_get_label($event_id, 'mep_event_extra_service_text', __('Extra Service:','mage-eventpress'));
|
||||
$select_date_label = array_key_exists('select-date-label',$params) ? $params['select-date-label'] : mep_get_option('mep_event_rec_select_event_date_text', 'label_setting_sec', __('Select Event Date:', 'mage-eventpress'));
|
||||
$select_date_label = 'U lala lala';
|
||||
|
||||
$total_book = 0;
|
||||
$post_id = $event_id ? $event_id : get_the_id();
|
||||
|
@ -74,7 +78,7 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
|||
$mm = $minutes > 0 ? $minutes . " minutes " : '';
|
||||
// $qty_typec = array_key_exists('qty_box_type',$event_meta) ? $event_meta['qty_box_type'][0] : '';
|
||||
$cart_product_id = get_post_meta($post_id, 'link_wc_product', true) ? esc_attr(get_post_meta($post_id, 'link_wc_product', true)) : esc_attr($post_id);
|
||||
|
||||
$not_in_the_cart = apply_filters('mep_check_product_into_cart',true,$cart_product_id);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -109,7 +113,8 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
|||
|
||||
if( $event_member_type == 'for_all' || ($event_member_type != 'for_all' && is_user_logged_in() && ( in_array(wp_get_current_user()->roles[0],$saved_user_role) || in_array('all',$saved_user_role) ) )){
|
||||
|
||||
|
||||
echo "<input type='hidden' value='$extra_service_label' id='mep_extra_service_label'/>";
|
||||
echo "<input type='hidden' value='$select_date_label' id='mep_select_date_label'/>";
|
||||
|
||||
//if( in_array($user_role,$saved_user_role) ){
|
||||
?>
|
||||
|
@ -119,11 +124,12 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
|||
</h4>
|
||||
<!--The event add to cart main form start here-->
|
||||
<form action="" method='post' id="mage_event_submit">
|
||||
|
||||
<?php
|
||||
/**
|
||||
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
||||
*/
|
||||
do_action('mep_event_ticket_type_extra_service', $post_id);
|
||||
do_action('mep_event_ticket_type_extra_service', $post_id, $ticket_type_label,$extra_service_label,$select_date_label );
|
||||
?>
|
||||
<input type='hidden' id='rowtotal' value="<?php echo get_post_meta($post_id, "_price", true); ?>" />
|
||||
|
||||
|
@ -132,7 +138,7 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
|||
<input type="hidden" name='currency_decimal' value="<?php echo wc_get_price_decimal_separator(); ?>">
|
||||
<input type="hidden" name='currency_thousands_separator' value="<?php echo wc_get_price_thousand_separator(); ?>">
|
||||
<input type="hidden" name='currency_number_of_decimal' value="<?php echo wc_get_price_decimals(); ?>">
|
||||
|
||||
<?php do_action('mep_add_term_condition',$post_id); ?>
|
||||
<!--The Add to cart button table start Here-->
|
||||
<table class='table table-bordered mep_event_add_cart_table'>
|
||||
<tr>
|
||||
|
@ -152,7 +158,13 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
|||
<?php do_action('mep_before_add_cart_btn',$post_id); ?>
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id, $event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?> </button>
|
||||
<?php if($not_in_the_cart){ ?>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php echo $cart_btn_label; ?></button>
|
||||
<?php }else{
|
||||
?>
|
||||
<button disabled class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e('Already Added into Cart!', 'mage-eventpress'); ?> </button>
|
||||
<?php
|
||||
} ?>
|
||||
<?php do_action('mep_after_add_cart_btn',$post_id); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -253,8 +265,7 @@ if (!function_exists('mep_get_event_reg_btn_list')) {
|
|||
$mm = $minutes > 0 ? $minutes . " minutes " : '';
|
||||
// $qty_typec = $event_meta['qty_box_type'][0];
|
||||
$cart_product_id = get_post_meta($post_id, 'link_wc_product', true) ? esc_attr(get_post_meta($post_id, 'link_wc_product', true)) : esc_attr($post_id);
|
||||
|
||||
|
||||
$not_in_the_cart = apply_filters('mep_check_product_into_cart',true,$cart_product_id);
|
||||
/**
|
||||
* First Checking If the registration status enable or disable
|
||||
*/
|
||||
|
@ -302,9 +313,9 @@ if (!function_exists('mep_get_event_reg_btn_list')) {
|
|||
<input type="hidden" name='currency_decimal' value="<?php echo wc_get_price_decimal_separator(); ?>">
|
||||
<input type="hidden" name='currency_thousands_separator' value="<?php echo wc_get_price_thousand_separator(); ?>">
|
||||
<input type="hidden" name='currency_number_of_decimal' value="<?php echo wc_get_price_decimals(); ?>">
|
||||
|
||||
<!--The Add to cart button table start Here-->
|
||||
<table class='table table-bordered mep_event_add_cart_table'>
|
||||
<?php do_action('mep_add_term_condition',$post_id); ?>
|
||||
<!--The Add to cart button table start Here fff-->
|
||||
<table class='table table-bordered mep_event_add_cart_table xxx'>
|
||||
<tr>
|
||||
<td align="left" class='total-col'><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec') ? mep_get_option('mep_quantity_text', 'label_setting_sec') : _e('Quantity:', 'mage-eventpress');
|
||||
if ($mep_event_ticket_type) { ?>
|
||||
|
@ -318,7 +329,11 @@ if (!function_exists('mep_get_event_reg_btn_list')) {
|
|||
<td align="right">
|
||||
<input type="hidden" name="mep_event_location_cart" value="<?php trim(mep_ev_location_ticket($post_id, $event_meta)); ?>">
|
||||
<input type="hidden" name="mep_event_date_cart" value="<?php do_action('mep_event_date'); ?>">
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?> </button>
|
||||
<?php if($not_in_the_cart){ ?>
|
||||
<button type="submit" name="add-to-cart" value="<?php echo $cart_product_id; ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e(mep_get_label($post_id, 'mep_cart_btn_text', 'Register This Event'), 'mage-eventpress'); ?></button>
|
||||
<?php }else{ ?>
|
||||
<a href="<?php echo wc_get_cart_url(); ?>" class="single_add_to_cart_button button alt btn-mep-event-cart"><?php _e('Already Added into Cart!', 'mage-eventpress'); ?> </a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -76,9 +76,9 @@ if (!function_exists('mep_ev_datetime')) {
|
|||
}
|
||||
}
|
||||
|
||||
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme');
|
||||
add_action('mep_event_date_default_theme', 'mep_date_in_default_theme',10,2);
|
||||
if (!function_exists('mep_date_in_default_theme')) {
|
||||
function mep_date_in_default_theme($event_id)
|
||||
function mep_date_in_default_theme($event_id,$title='yes')
|
||||
{
|
||||
$event_meta = get_post_custom($event_id);
|
||||
$start_datetime = $event_meta['event_start_datetime'][0];
|
||||
|
@ -92,7 +92,14 @@ if (!function_exists('mep_date_in_default_theme')) {
|
|||
$cn = 1;
|
||||
$_more_date = array_key_exists('mep_event_more_date', $event_meta) ? unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||
$more_date = apply_filters('mep_event_date_more_date_array',$_more_date,$event_id);
|
||||
$show_end_date = get_post_meta($event_id, 'mep_show_end_datetime', true) ? get_post_meta($event_id, 'mep_show_end_datetime', true) : 'yes';
|
||||
$end_date_display_status = apply_filters('mep_event_datetime_status',$show_end_date,$event_id);
|
||||
|
||||
|
||||
|
||||
if($title == 'yes'){
|
||||
require(mep_template_file_path('single/date_list_title.php'));
|
||||
}
|
||||
if (sizeof($more_date) > 2) {
|
||||
echo '<ul id="mep_event_date_sch">';
|
||||
} else {
|
||||
|
|
|
@ -3,17 +3,21 @@ if (!defined('ABSPATH')) {
|
|||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_extra_service', 'mep_ev_extra_serv');
|
||||
add_action('mep_event_extra_service', 'mep_ev_extra_serv',10,2);
|
||||
if (!function_exists('mep_ev_extra_serv')) {
|
||||
function mep_ev_extra_serv($post_id)
|
||||
function mep_ev_extra_serv($post_id,$extra_service_label)
|
||||
{
|
||||
// echo $extra_service_label;
|
||||
global $post, $product;
|
||||
$post_id = $post_id;
|
||||
$count = 1;
|
||||
$mep_events_extra_prices = get_post_meta($post_id, 'mep_events_extra_prices', true) ? get_post_meta($post_id, 'mep_events_extra_prices', true) : array();
|
||||
$event_date = get_post_meta($post_id, 'event_start_date', true) . ' ' . get_post_meta($post_id, 'event_start_time', true);
|
||||
|
||||
ob_start();
|
||||
|
||||
if (sizeof($mep_events_extra_prices) > 0) {
|
||||
|
||||
require(mep_template_file_path('single/extra_service_list.php'));
|
||||
}
|
||||
$content = ob_get_clean();
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event native list shortcode
|
||||
*/
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode', 'mep_event_loop_spring_style', 10, 4);
|
||||
|
||||
if (!function_exists('mep_event_loop_spring_style')) {
|
||||
function mep_event_loop_spring_style($content, $event_id, $style, $unq_id='')
|
||||
{
|
||||
if ($style == 'spring') {
|
||||
$now = current_time('Y-m-d H:i:s');
|
||||
$show_price = mep_get_option('mep_event_price_show', 'general_setting_sec', 'yes');
|
||||
$show_price_label = mep_get_option('event-price-label', 'general_setting_sec', 'Price Starts from:');
|
||||
$event_meta = get_post_custom($event_id);
|
||||
$author_terms = get_the_terms($event_id, 'mep_org');
|
||||
$start_time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
|
||||
$end_time = strtotime($event_meta['event_end_date'][0] . ' ' . $event_meta['event_end_time'][0]);
|
||||
$start_date_format = date_i18n('M d, Y', $start_time);
|
||||
$start_time_format = date_i18n('g:i A', $start_time);
|
||||
$end_date_format = date_i18n('M d, Y', $end_time);
|
||||
$end_time_format = date_i18n('g:i A', $end_time);
|
||||
$tt = get_the_terms($event_id, 'mep_cat');
|
||||
$torg = get_the_terms($event_id, 'mep_org');
|
||||
$org_class = mep_get_term_as_class($event_id, 'mep_org', $unq_id);
|
||||
$cat_class = mep_get_term_as_class($event_id, 'mep_cat', $unq_id);
|
||||
$event_multidate = array_key_exists('mep_event_more_date', $event_meta) ? maybe_unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||
$available_seat = mep_get_total_available_seat($event_id, $event_meta);
|
||||
$hide_org_list = mep_get_option('mep_event_hide_organizer_list', 'general_setting_sec', 'no');
|
||||
$hide_location_list = mep_get_option('mep_event_hide_location_list', 'general_setting_sec', 'no');
|
||||
$hide_time_list = mep_get_option('mep_event_hide_time_list', 'general_setting_sec', 'no');
|
||||
$hide_only_end_time_list = mep_get_option('mep_event_hide_end_time_list', 'general_setting_sec', 'no');
|
||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
|
||||
ob_start();
|
||||
require(mep_template_file_path('list/spring.php'));
|
||||
$content = ob_get_clean();
|
||||
return $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
/**
|
||||
* This is the templates of the event native list shortcode
|
||||
*/
|
||||
|
||||
add_filter('mage_event_loop_list_shortcode', 'mep_event_loop_winter_style', 10, 4);
|
||||
|
||||
if (!function_exists('mep_event_loop_winter_style')) {
|
||||
function mep_event_loop_winter_style($content, $event_id, $style, $unq_id='')
|
||||
{
|
||||
if ($style == 'winter') {
|
||||
$now = current_time('Y-m-d H:i:s');
|
||||
$show_price = mep_get_option('mep_event_price_show', 'general_setting_sec', 'yes');
|
||||
$show_price_label = mep_get_option('event-price-label', 'general_setting_sec', 'Price Starts from:');
|
||||
$event_meta = get_post_custom($event_id);
|
||||
$author_terms = get_the_terms($event_id, 'mep_org');
|
||||
$start_time = strtotime($event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0]);
|
||||
$end_time = strtotime($event_meta['event_end_date'][0] . ' ' . $event_meta['event_end_time'][0]);
|
||||
$start_date_format = date_i18n('M d, Y', $start_time);
|
||||
$start_dd = date_i18n('d', $start_time);
|
||||
$start_mm_yy = date_i18n('M, Y', $start_time);
|
||||
$start_time_format = date_i18n('g:i A', $start_time);
|
||||
$end_date_format = date_i18n('M d, Y', $end_time);
|
||||
$end_time_format = date_i18n('g:i A', $end_time);
|
||||
$tt = get_the_terms($event_id, 'mep_cat');
|
||||
$torg = get_the_terms($event_id, 'mep_org');
|
||||
$org_class = mep_get_term_as_class($event_id, 'mep_org', $unq_id);
|
||||
$cat_class = mep_get_term_as_class($event_id, 'mep_cat', $unq_id);
|
||||
$event_multidate = array_key_exists('mep_event_more_date', $event_meta) ? maybe_unserialize($event_meta['mep_event_more_date'][0]) : array();
|
||||
$available_seat = mep_get_total_available_seat($event_id, $event_meta);
|
||||
$hide_org_list = mep_get_option('mep_event_hide_organizer_list', 'general_setting_sec', 'no');
|
||||
$hide_location_list = mep_get_option('mep_event_hide_location_list', 'general_setting_sec', 'no');
|
||||
$hide_time_list = mep_get_option('mep_event_hide_time_list', 'general_setting_sec', 'no');
|
||||
$hide_only_end_time_list = mep_get_option('mep_event_hide_end_time_list', 'general_setting_sec', 'no');
|
||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
|
||||
ob_start();
|
||||
require(mep_template_file_path('list/winter.php'));
|
||||
$content = ob_get_clean();
|
||||
return $content;
|
||||
} else {
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@ if (!defined('ABSPATH')) {
|
|||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_ticket_types', 'mep_ev_ticket_type');
|
||||
add_action('mep_event_ticket_types', 'mep_ev_ticket_type',10,3);
|
||||
if (!function_exists('mep_ev_ticket_type')) {
|
||||
function mep_ev_ticket_type($post_id)
|
||||
function mep_ev_ticket_type($post_id,$ticket_type_label,$select_date_label)
|
||||
{
|
||||
global $post, $product, $event_meta;
|
||||
$count = 1;
|
||||
|
@ -15,7 +15,7 @@ if (!function_exists('mep_ev_ticket_type')) {
|
|||
|
||||
if ($mep_event_ticket_type) {
|
||||
?>
|
||||
<?php echo "<h3 class='ex-sec-title'>" . mep_get_label($post_id, 'mep_event_ticket_type_text', 'Ticket Type:') . "</h3>"; ?>
|
||||
<?php echo "<h3 class='ex-sec-title mep_ticket_type_title'>" .$ticket_type_label. "</h3>"; ?>
|
||||
<table id='mep_event_ticket_type_table'>
|
||||
<?php do_action('mep_event_ticket_type_loop_list', $post_id); ?>
|
||||
</table>
|
||||
|
@ -23,7 +23,7 @@ if (!function_exists('mep_ev_ticket_type')) {
|
|||
}
|
||||
|
||||
$content = ob_get_clean();
|
||||
echo apply_filters('mage_event_ticket_type_list', $content, $post_id, $event_meta);
|
||||
echo apply_filters('mage_event_ticket_type_list', $content, $post_id, $event_meta,$ticket_type_label,$select_date_label);
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
|
|
|
@ -3,10 +3,10 @@ if (!defined('ABSPATH')) {
|
|||
die;
|
||||
} // Cannot access pages directly.
|
||||
|
||||
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10);
|
||||
add_action('mep_event_ticket_type_extra_service', 'mep_output_add_to_cart_custom_fields', 10,4);
|
||||
|
||||
if (!function_exists('mep_output_add_to_cart_custom_fields')) {
|
||||
function mep_output_add_to_cart_custom_fields($post_id)
|
||||
function mep_output_add_to_cart_custom_fields($post_id,$ticket_type_label,$extra_service_label,$select_date_label)
|
||||
{
|
||||
global $post, $event_meta, $total_book;
|
||||
|
||||
|
@ -16,8 +16,9 @@ if (!function_exists('mep_output_add_to_cart_custom_fields')) {
|
|||
$total_left = $total_seat - ($total_sold + $total_resv);
|
||||
$total_left = apply_filters('mep_event_total_seat_count', $total_left, $post_id);
|
||||
if ($total_left > 0) {
|
||||
do_action('mep_event_ticket_types', $post_id);
|
||||
do_action('mep_event_extra_service', $post_id);
|
||||
|
||||
do_action('mep_event_ticket_types', $post_id,$ticket_type_label,$select_date_label);
|
||||
do_action('mep_event_extra_service', $post_id,$extra_service_label);
|
||||
} else {
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
|
|
|
@ -8,6 +8,7 @@ if (!function_exists('mep_faq_part')) {
|
|||
function mep_faq_part($event_id)
|
||||
{
|
||||
ob_start();
|
||||
get_post_meta($event_id, 'mep_event_faq', true);
|
||||
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_faq', true)) : '';
|
||||
if ($mep_event_faq) {
|
||||
require(mep_template_file_path('single/faq.php'));
|
||||
|
|
|
@ -8,10 +8,9 @@ if (!function_exists('mep_event_google_map')) {
|
|||
function mep_event_google_map($event_id)
|
||||
{
|
||||
global $post, $event_meta, $user_api;
|
||||
|
||||
|
||||
$map_type = mep_get_option('mep_google_map_type', 'general_setting_sec', 'iframe');
|
||||
$location_sts = get_post_meta($event_id, 'mep_org_address', true) ? get_post_meta($event_id, 'mep_org_address', true) : '';
|
||||
$status = get_post_meta($event_id, 'mep_sgm', true) ? get_post_meta($event_id, 'mep_sgm', true) : '';
|
||||
ob_start();
|
||||
do_action('mep_event_before_google_map');
|
||||
if ($location_sts) {
|
||||
|
@ -20,12 +19,10 @@ if (!function_exists('mep_event_google_map')) {
|
|||
$lat = get_term_meta($org_id, 'latitude', true) ? get_term_meta($org_id, 'latitude', true) : 0;
|
||||
$lon = get_term_meta($org_id, 'longitude', true) ? get_term_meta($org_id, 'longitude', true) : 0;
|
||||
} else {
|
||||
$lat = $event_meta['latitude'][0] ? $event_meta['latitude'][0] : 0;
|
||||
$lon = $event_meta['longitude'][0] ? $event_meta['longitude'][0] : 0;
|
||||
$lat = get_post_meta($event_id, 'latitude', true) ? get_post_meta($event_id, 'latitude', true) : 0;
|
||||
$lon = get_post_meta($event_id, 'longitude', true) ? get_post_meta($event_id, 'longitude', true) : 0;
|
||||
}
|
||||
|
||||
if ($event_meta['mep_sgm'][0]) {
|
||||
|
||||
if ($status) {
|
||||
if ($map_type == 'iframe') {
|
||||
?>
|
||||
<div class="mep-gmap-sec">
|
||||
|
@ -33,7 +30,6 @@ if (!function_exists('mep_event_google_map')) {
|
|||
</div>
|
||||
<?php
|
||||
} else {
|
||||
|
||||
if ($user_api) {
|
||||
?>
|
||||
<div class="mep-gmap-sec">
|
||||
|
@ -41,7 +37,6 @@ if (!function_exists('mep_event_google_map')) {
|
|||
</div>
|
||||
<script>
|
||||
var map;
|
||||
|
||||
function initMap() {
|
||||
map = new google.maps.Map(document.getElementById('map'), {
|
||||
center: {
|
||||
|
@ -71,7 +66,7 @@ if (!function_exists('mep_event_google_map')) {
|
|||
}
|
||||
</script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=<?php echo $user_api; ?>&callback=initMap" async defer></script>
|
||||
<?php }
|
||||
<?php }
|
||||
}
|
||||
}
|
||||
do_action('mep_event_after_google_map');
|
||||
|
|
|
@ -5,13 +5,15 @@ if (!defined('ABSPATH')) {
|
|||
|
||||
add_action('mep_shortcode_add_cart_section', 'mep_shortcode_add_cart_section_html');
|
||||
if (!function_exists('mep_shortcode_add_cart_section_html')) {
|
||||
function mep_shortcode_add_cart_section_html($event)
|
||||
function mep_shortcode_add_cart_section_html($event,$params)
|
||||
{
|
||||
|
||||
// print_r($params);
|
||||
?>
|
||||
<div class='mep-events-shortcode-cart-section'>
|
||||
<div class='mep-events-wrapper'>
|
||||
<div class='mep-default-feature-cart-sec'>
|
||||
<?php mep_get_event_reg_btn($event); ?>
|
||||
<?php mep_get_event_reg_btn($event,$params); ?>
|
||||
<?php mep_single_page_js_script($event); //do_action('mep_add_to_cart_shortcode_js',$event);
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -26,6 +26,8 @@ require_once(dirname(__FILE__) . "/event_loop_minimal.php");
|
|||
require_once(dirname(__FILE__) . "/event_loop_native.php");
|
||||
require_once(dirname(__FILE__) . "/event_loop_timeline.php");
|
||||
require_once(dirname(__FILE__) . "/event_loop_title.php");
|
||||
require_once(dirname(__FILE__) . "/event_loop_spring.php");
|
||||
require_once(dirname(__FILE__) . "/event_loop_winter.php");
|
||||
require_once(dirname(__FILE__) . "/event_speakers_list.php");
|
||||
require_once(dirname(__FILE__) . "/shortcode_add_cart_section.php");
|
||||
require_once(dirname(__FILE__) . "/shortcode_speaker_list.php");
|
||||
|
|
|
@ -128,8 +128,6 @@
|
|||
<h1 class="textCenter">Addons</h1>
|
||||
<div class="justifyBetween">
|
||||
<?php
|
||||
|
||||
|
||||
$url = 'https://vaincode.com/update/addon-list.json';
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
!function(n){"use strict";n.fn.countdown=function(e){return n.fn.countdown.begin(this,n.extend({year:2016,month:1,day:1,hour:0,minute:0,second:0,timezone:-6,labels:!0,onFinish:function(){}},e))},n.fn.countdown.begin=function(e,t){var o,a,i;i=new Date(t.year,t.month-1,t.day,t.hour,t.minute,t.second),a=n.fn.countdown.convertTimezone(t.timezone),o=n.fn.countdown.getTimeRemaining(a,i,t),t.init?n.each(o,function(e,t){n(".time","#"+e).text(t<10?"0"+t:t.toLocaleString()),n(".label","#"+e).text(1===t?n.fn.countdown.singularize(e):e)}):(n.each(o,function(o,a){var i,d,r,u;i=n("<div/>").addClass("col-xs-6 col-sm-3").attr("id",o),d=n("<div/>").addClass("wrapper"),r=n("<span/>").addClass("time").text(a<10?"0"+a:a.toLocaleString()),t.labels?(u=n("<span/>").addClass("label").text(1===a?n.fn.countdown.singularize(o):o),i.append(d.append(r).append(u))):i.append(d.append(r)),e.append(i.addClass("animated rotateIn"))}),t.init=!0),t.target_reached?t.onFinish():setTimeout(function(){n.fn.countdown.begin(e,t)},1e3)},n.fn.countdown.singularize=function(n){return n.substr(0,n.length-1)},n.fn.countdown.convertTimezone=function(n){var e,t,o;return t=(e=new Date).getTime(),o=6e4*e.getTimezoneOffset(),new Date(t+o+36e5*n)},n.fn.countdown.getTimeRemaining=function(n,e,t){var o,a;return a={},0===(o=(o=e.getTime()-n.getTime())<0?0:o)&&(t.target_reached=!0),a.days=Math.floor(o/864e5),a.hours=Math.floor(24*(o/864e5-a.days)),a.minutes=Math.floor(60*(24*(o/864e5-a.days)-a.hours)),a.seconds=Math.floor(o/1e3%60),a}}(jQuery);
|
|
@ -7,7 +7,7 @@ function mp_event_wo_commerce_price_format(price) {
|
|||
let price_text = '';
|
||||
|
||||
price = price.toFixed(currency_number_of_decimal);
|
||||
console.log('price= '+ price);
|
||||
// console.log('price= '+ price);
|
||||
let total_part = price.toString().split(".");
|
||||
total_part[0] = total_part[0].replace(/\B(?=(\d{3})+(?!\d))/g, currency_thousands_separator);
|
||||
price = total_part.join(currency_decimal);
|
||||
|
@ -21,7 +21,7 @@ console.log('price= '+ price);
|
|||
} else {
|
||||
price_text = currency_symbol + ' ' + price;
|
||||
}
|
||||
console.log('price= '+ price_text);
|
||||
// console.log('price= '+ price_text);
|
||||
return price_text;
|
||||
}
|
||||
(function ($) {
|
||||
|
|
|
@ -8444,14 +8444,13 @@ if( ! class_exists( 'FormFieldsGenerator' ) ) {
|
|||
|
||||
$new_title = explode('/',$title_field);
|
||||
$title_field = $new_title;
|
||||
|
||||
foreach ($fields as $key => $value) {
|
||||
# code...
|
||||
$new[$key]['type'] = $fields[$key]['type'];
|
||||
$new[$key]['default'] = $fields[$key]['default'];
|
||||
$new[$key]['item_id'] = $fields[$key]['item_id'];
|
||||
$new[$key]['name'] = $fields[$key]['name'];
|
||||
if($args){
|
||||
if(array_key_exists('args',$value)){
|
||||
$new[$key]['args'] = !is_array($fields[$key]['args']) ? $this->args_from_string($fields[$key]['args']) : $fields[$key]['args'];
|
||||
}
|
||||
|
||||
|
@ -8621,17 +8620,17 @@ if( ! class_exists( 'FormFieldsGenerator' ) ) {
|
|||
<?php endif; ?>
|
||||
html+='<div class="item-title">'+element.name+'</div>';
|
||||
if(type == 'text'){
|
||||
html+='<input type="text" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
html+='<input type="text" value="'+default_val+'" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'number'){
|
||||
html+='<input type="number" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
html+='<input type="number" value="'+default_val+'" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'tel'){
|
||||
html+='<input type="tel" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
html+='<input type="tel" value="'+default_val+'" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'time'){
|
||||
html+='<input type="time" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'url'){
|
||||
html+='<input type="url" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
html+='<input type="url" value="'+default_val+'" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'date'){
|
||||
html+='<input type="date" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
html+='<input type="date" value="'+default_val+'" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'month'){
|
||||
html+='<input type="month" name="<?php echo $field_name; ?>['+now+']['+element.item_id+']"/>';
|
||||
}else if(type == 'search'){
|
||||
|
@ -8723,6 +8722,9 @@ if( ! class_exists( 'FormFieldsGenerator' ) ) {
|
|||
$item_id = $field['item_id'];
|
||||
$name = $field['name'];
|
||||
$title_field_class = ($title_field == $field_index) ? 'title-field':'';
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="item <?php echo $title_field_class; ?>">
|
||||
<?php if($collapsible):?>
|
||||
|
@ -8788,6 +8790,8 @@ if( ! class_exists( 'FormFieldsGenerator' ) ) {
|
|||
$args = isset($field['args']) ? $field['args'] : array();
|
||||
$default = isset($field['default']) ? $field['default'] : '';
|
||||
$value = !empty($val[$item_id]) ? $val[$item_id] : $default;
|
||||
|
||||
|
||||
?>
|
||||
<select class="" name="<?php echo $field_name; ?>[<?php echo $index; ?>][<?php echo $item_id; ?>]">
|
||||
<?php
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<?php
|
||||
|
||||
namespace MEPPlugin;
|
||||
|
||||
class MEPPluginElementor {
|
||||
|
||||
private static $_instance = null;
|
||||
|
||||
public static function instance() {
|
||||
if ( is_null( self::$_instance ) ) {
|
||||
self::$_instance = new self();
|
||||
}
|
||||
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
public function widget_scripts() {
|
||||
//wp_register_script( 'tour-booking-helper-script', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );
|
||||
}
|
||||
|
||||
public function add_widget_categories( $elements_manager ) {
|
||||
|
||||
$elements_manager->add_category(
|
||||
'mep-elementor-support',
|
||||
[
|
||||
'title' => __( 'WooCommerce Event Manager', 'mage-eventpress'),
|
||||
'icon' => 'fa fa-plug',
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
private function include_widgets_files() {
|
||||
require_once( __DIR__ . '/widget/event-calendar.php' );
|
||||
require_once( __DIR__ . '/widget/event-list.php' );
|
||||
// require_once( __DIR__ . '/widget/expired-event-list.php' );
|
||||
require_once( __DIR__ . '/widget/event-speaker-list.php' );
|
||||
require_once( __DIR__ . '/widget/event-add-cart-section.php' );
|
||||
require_once( __DIR__ . '/widget/event-list-recurring.php' );
|
||||
require_once( __DIR__ . '/widget/event-city-list.php' );
|
||||
require_once( __DIR__ . '/widget/event-title.php' );
|
||||
// require_once( __DIR__ . '/widget/event-thumbnail.php' );
|
||||
// require_once( __DIR__ . '/widget/event-details.php' );
|
||||
require_once( __DIR__ . '/widget/event-faq.php' );
|
||||
require_once( __DIR__ . '/widget/event-date.php' );
|
||||
require_once( __DIR__ . '/widget/event-location.php' );
|
||||
require_once( __DIR__ . '/widget/event-map.php' );
|
||||
require_once( __DIR__ . '/widget/event-total-seat.php' );
|
||||
require_once( __DIR__ . '/widget/event-org.php' );
|
||||
require_once( __DIR__ . '/widget/event-schedule.php' );
|
||||
require_once( __DIR__ . '/widget/event-share-btn.php' );
|
||||
require_once( __DIR__ . '/widget/event-add-calender.php' );
|
||||
require_once( __DIR__ . '/widget/event-countdown.php' );
|
||||
}
|
||||
|
||||
public function register_widgets() {
|
||||
|
||||
// Its is now safe to include Widgets files
|
||||
$this->include_widgets_files();
|
||||
|
||||
// Register Widgets
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPCalendarWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventListWidget() );
|
||||
// \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPExpiredEventWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPSpeakerListWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPAddToCartSectionWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventListRecurringWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventCityListWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventTitletWidget() );
|
||||
// \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventThumbnailtWidget() );
|
||||
// \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventDetailstWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventFaqtWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventDateWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventLocationWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventMaptWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventSeattWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventOrgWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventScheduleWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventShareBTNtWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventAddCalendarWidget() );
|
||||
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Widgets\MEPEventCountdownWidget() );
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
||||
if ( \is_plugin_active( 'elementor/elementor.php' ) ) {
|
||||
add_action( 'elementor/frontend/after_register_scripts', [ $this, 'widget_scripts' ] );
|
||||
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
|
||||
add_action( 'elementor/elements/categories_registered', [ $this, 'add_widget_categories' ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Instantiate Plugin Class
|
||||
MEPPluginElementor::instance();
|
|
@ -0,0 +1,112 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventAddCalendarWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-calender-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Add Calender', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-calendar';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Add Calender Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_share-btn_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-calender-btn ul#mep_add_calender_links li a' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_share-btn_icon_color',
|
||||
[
|
||||
'label' => __( 'Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-calender-btn ul#mep_add_calender_links li a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-calender mep-elementor-widget-calender-btn">
|
||||
<div class="calender-url">
|
||||
<?php
|
||||
do_action('mep_before_add_calendar_button');
|
||||
mep_add_to_google_calender_link($event_id);
|
||||
do_action('mep_after_add_calendar_button');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,506 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPAddToCartSectionWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-add-to-cart-section-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Add to Cart Section', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-cart-solid';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_speaker_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Add to Cart Section Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_savq_display',
|
||||
[
|
||||
'label' => __( 'Display Available Quantity?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .xtra-item-left' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_cart_btn_label',
|
||||
[
|
||||
'label' => __( 'Cart Button Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( 'Register For This Event', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_cart_ticket_type_style_settings',
|
||||
[
|
||||
'label' => __( 'Ticket Type Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_tt_display',
|
||||
[
|
||||
'label' => __( 'Display Ticket Type Title?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_ticket_type_title' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ticket_label',
|
||||
[
|
||||
'label' => __( 'Ticket Type Title', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( 'Ticket Type:', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_stqc_display',
|
||||
[
|
||||
'label' => __( 'Display Ticket Quantity Column?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'table-cell',
|
||||
'options' => [
|
||||
'table-cell' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget td.ticket-qty' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_stpc_display',
|
||||
[
|
||||
'label' => __( 'Display Ticket Price Column?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'table-cell',
|
||||
'options' => [
|
||||
'table-cell' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget td.ticket-price' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_display_tkt_qty',
|
||||
[
|
||||
'label' => __( 'Display Ticket Qty: text?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget td span.tkt-qty' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_display_tkt_price_txt',
|
||||
[
|
||||
'label' => __( 'Display Per Ticket Price: text?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget td span.tkt-pric' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cart_ttt_typo',
|
||||
'label' => __( 'Title Text Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_ticket_type_title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_cart_ttt_bg_color',
|
||||
[
|
||||
'label' => __( 'Title Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_ticket_type_title' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_cart_ttt_txt_color',
|
||||
[
|
||||
'label' => __( 'Title Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_ticket_type_title' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cart_ttt_padding',
|
||||
[
|
||||
'label' => __( 'Title Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_ticket_type_title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
// Extra Service Table Styling Sec
|
||||
$this->start_controls_section(
|
||||
'mep_event_cart_extra_service_style_settings',
|
||||
[
|
||||
'label' => __( 'Extra Service Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_exs_display',
|
||||
[
|
||||
'label' => __( 'Display Extra Service Title?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_extra_service_title' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ex_service_label',
|
||||
[
|
||||
'label' => __( 'Extra Service Title', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( 'Extra Service:', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_exs_table_head_display',
|
||||
[
|
||||
'label' => __( 'Display Extra Service Table Head?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'table-row' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget table tr.mep_extra_service_table_head' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cart_exst_typo',
|
||||
'label' => __( 'Title Text Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_extra_service_title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_cart_exst_bg_color',
|
||||
[
|
||||
'label' => __( 'Title Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_extra_service_title' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_cart_exst_txt_color',
|
||||
[
|
||||
'label' => __( 'Title Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_extra_service_title' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cart_exst_padding',
|
||||
[
|
||||
'label' => __( 'Title Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h3.mep_extra_service_title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_add_to_cart_section_style_settings',
|
||||
[
|
||||
'label' => __( 'Cart Section & Button Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_title_typography',
|
||||
'label' => __( 'Event Table Title Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget h4.mep-cart-table-title',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_table_headline_color',
|
||||
[
|
||||
'label' => __( 'Event Table Header Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep_re_datelist_label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_table_headline_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Table Header Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep_everyday_date_secs' => 'background-color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_button_text_color',
|
||||
[
|
||||
'label' => __( 'Cart Button Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .single_add_to_cart_button' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .single_add_to_cart_button:hover' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_button_typography',
|
||||
'label' => __( 'Cart Button Text Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .single_add_to_cart_button',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Cart Button Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .single_add_to_cart_button' => 'background-color: {{VALUE}} !important;border-color:{{VALUE}} !important',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_btn_padding',
|
||||
[
|
||||
'label' => __( 'Cart Button Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .single_add_to_cart_button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_section_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Section Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep-events-wrapper' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_section_text_color',
|
||||
[
|
||||
'label' => __( 'Event Section Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep-events-wrapper' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep-events-wrapper table td' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_section_padding',
|
||||
[
|
||||
'label' => __( 'Event Section Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep-events-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'box_shadow',
|
||||
'label' => __( 'Box Shadow', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-add-to-cart-section-widget .mep-events-wrapper',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'] > 0 ? $settings['mep_event_list'] : 0;
|
||||
$ticket_table = $settings['mep_ticket_label'] ? $settings['mep_ticket_label'] : 'Ticket Type:';
|
||||
$cart_label = $settings['mep_cart_btn_label'] ? $settings['mep_cart_btn_label'] : 'Register For This Event';
|
||||
$ex_service_table = $settings['mep_ex_service_label'] ? $settings['mep_ex_service_label'] : 'Extra Service:';
|
||||
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-elementor-event-add-to-cart-section-widget">
|
||||
<?php echo do_shortcode('[event-add-cart-section ticket-label="'.$ticket_table.'" cart-btn-label="'.$cart_label.'" extra-service-label="'.$ex_service_table.'" event="'.$event_id.'"]'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Group_Control_Box_Shadow;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPCalendarWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-elementor-support';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Calendar', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-calendar';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
?>
|
||||
<div class="mep-elementor-event-calebdar-widget">
|
||||
<?php echo do_shortcode('[event-calendar]'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventCityListWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-city-list-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event City List', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-skill-bar';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event City List Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_city_list_icon',
|
||||
[
|
||||
'label' => __( 'Icon Before Title', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::ICON,
|
||||
'include' => [
|
||||
'fas fa-check-circle',
|
||||
'fas fa-check',
|
||||
'fas fa-check-square',
|
||||
'far fa-check-square',
|
||||
'far fa-check-circle',
|
||||
'fas fa-check-double',
|
||||
'fas fa-calendar-check'
|
||||
],
|
||||
'default' => 'fas fa-check-circle',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Event City Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_city_title_color',
|
||||
[
|
||||
'label' => __( 'Event City Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-city-list-widget .mep-city-list ul li a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_city_icon_color',
|
||||
[
|
||||
'label' => __( 'Event City Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-city-list-widget .mep-city-list ul li a i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
$mep_event_city_list_icon_html = '<i class="' . $settings['mep_event_city_list_icon'] . '" aria-hidden="true"></i>';
|
||||
?>
|
||||
<div class="mep-elementor-event-city-list-widget">
|
||||
<?php echo do_shortcode('[event-city-list]'); ?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function(){
|
||||
jQuery('.mep-city-list li a').prepend('<?php echo $mep_event_city_list_icon_html; ?>');
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,522 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventCountdownWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-countdown-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Countdown', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-countdown';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Countdown Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_type',
|
||||
[
|
||||
'label' => __( 'Event Start/End Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'event_start_datetime',
|
||||
'options' => [
|
||||
'event_start_datetime' => __( 'Start Datetime', 'mage-eventpress' ),
|
||||
'event_expire_datetime' => __( 'End Datetime', 'mage-eventpress' ),
|
||||
'event_upcoming_datetime' => __( 'Upcoming Datetime', 'mage-eventpress' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Days Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_day_display',
|
||||
[
|
||||
'label' => __( 'Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_day_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days span',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_day_border',
|
||||
'label' => __( 'Border', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .wrapper',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_cd_day_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .wrapper' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_day_time_color',
|
||||
[
|
||||
'label' => __( 'Time Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_day_label_color',
|
||||
[
|
||||
'label' => __( 'Label Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_day_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_day_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_day_box_shadow',
|
||||
'label' => __( 'Box Shadow', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#days .wrapper',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_cd_hours_style_settings',
|
||||
[
|
||||
'label' => __( 'Hours Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_hours_display',
|
||||
[
|
||||
'label' => __( 'Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_hours_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours span',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_hours_border',
|
||||
'label' => __( 'Border', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .wrapper',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_hours_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .wrapper' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_hours_time_color',
|
||||
[
|
||||
'label' => __( 'Time Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_hours_label_color',
|
||||
[
|
||||
'label' => __( 'Label Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_hours_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_hours_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_hours_box_shadow',
|
||||
'label' => __( 'Box Shadow', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#hours .wrapper',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_cd_minutes_style_settings',
|
||||
[
|
||||
'label' => __( 'Minutes Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_minutes_display',
|
||||
[
|
||||
'label' => __( 'Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_minutes_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes span',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_minutes_border',
|
||||
'label' => __( 'Border', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .wrapper',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_minutes_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .wrapper' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_minutes_time_color',
|
||||
[
|
||||
'label' => __( 'Time Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_minutes_label_color',
|
||||
[
|
||||
'label' => __( 'Label Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_minutes_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_minutes_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_minutes_box_shadow',
|
||||
'label' => __( 'Box Shadow', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#minutes .wrapper',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_cd_seconds_style_settings',
|
||||
[
|
||||
'label' => __( 'Seconds Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_seconds_display',
|
||||
[
|
||||
'label' => __( 'Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_seconds_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds span',
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_seconds_border',
|
||||
'label' => __( 'Border', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .wrapper',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_seconds_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .wrapper' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_seconds_time_color',
|
||||
[
|
||||
'label' => __( 'Time Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_cd_seconds_label_color',
|
||||
[
|
||||
'label' => __( 'Label Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .label' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_seconds_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_cd_seconds_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
\Elementor\Group_Control_Box_Shadow::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_cd_seconds_box_shadow',
|
||||
'label' => __( 'Box Shadow', 'plugin-domain' ),
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-countdown .mep-event-countdown-timer div#seconds .wrapper',
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$datetype = $settings['mep_event_date_type'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
$event_datetime = get_post_meta($event_id,$datetype,true) ? get_post_meta($event_id,$datetype,true) : '';
|
||||
$year = get_mep_datetime($event_datetime,'year-full');
|
||||
$month = get_mep_datetime($event_datetime,'month');
|
||||
$day = get_mep_datetime($event_datetime,'day');
|
||||
$hour = get_mep_datetime($event_datetime,'Hour');
|
||||
$minute = get_mep_datetime($event_datetime,'minute');
|
||||
$second = get_mep_datetime($event_datetime,'second');
|
||||
$timezone = get_mep_datetime($event_datetime,'timezone');
|
||||
?>
|
||||
<div class="mep-default-title mep-elementor-widget-countdown mep-event-countdown-sec">
|
||||
<div id="countdown<?php echo $event_id; ?>" class="mep-event-countdown-timer"></div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
jQuery('#countdown<?php echo $event_id; ?>').countdown({
|
||||
year: <?php echo $year; ?>, // YYYY Format
|
||||
month: <?php echo $month; ?>, // 1-12
|
||||
day: <?php echo $day; ?>, // 1-31
|
||||
hour: <?php echo $hour; ?>, // 24 hour format 0-23
|
||||
minute: <?php echo $minute; ?>, // 0-59
|
||||
second: <?php echo $second; ?>, // 0-59
|
||||
timezone: <?php echo $timezone; ?>, // http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
labels: true, // Show/Hide label elements
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventDateWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-date-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event DateTime', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-date';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Date Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_date_before_text',
|
||||
[
|
||||
'label' => __( 'Before Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_date_after_text',
|
||||
[
|
||||
'label' => __( 'After Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_type',
|
||||
[
|
||||
'label' => __( 'Event Start/End Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'event_start_datetime',
|
||||
'options' => [
|
||||
'event_start_datetime' => __( 'Start Datetime', 'mage-eventpress' ),
|
||||
'event_expire_datetime' => __( 'End Datetime', 'mage-eventpress' ),
|
||||
'event_upcoming_datetime' => __( 'Upcoming Datetime', 'mage-eventpress' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_date_display_style',
|
||||
[
|
||||
'label' => __( 'DateTime Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'date-time-text',
|
||||
'options' => [
|
||||
'date-time-text' => __( 'DateTime', 'mage-eventpress' ),
|
||||
'date-text' => __( 'Date', 'mage-eventpress' ),
|
||||
'day' => __( 'Day', 'mage-eventpress' ),
|
||||
'Dday' => __( 'Day Name', 'mage-eventpress' ),
|
||||
'month' => __( 'Month', 'mage-eventpress' ),
|
||||
'month-name' => __( 'Month Name', 'mage-eventpress' ),
|
||||
'year' => __( 'Year', 'mage-eventpress' ),
|
||||
'year-full' => __( 'Year Full', 'mage-eventpress' ),
|
||||
'time' => __( 'Time', 'mage-eventpress' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-datetime span',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_color',
|
||||
[
|
||||
'label' => __( 'Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-datetime span' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$datetdisplaystyle = $settings['mep_event_date_display_style'];
|
||||
$datetype = $settings['mep_event_date_type'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
$event_datetime = get_post_meta($event_id,$datetype,true) ? get_post_meta($event_id,$datetype,true) : '';
|
||||
$before_text = $settings['mep_ele_date_before_text'];
|
||||
$after_text = $settings['mep_ele_date_after_text'];
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
if(!empty($event_datetime)){
|
||||
?>
|
||||
<div class="mep-default-datetime mep-elementor-widget-datetime">
|
||||
<span><?php echo $before_text; ?></span><span><?php echo get_mep_datetime($event_datetime,$datetdisplaystyle); ?></span> <span><?php echo $after_text; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventDetailstWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-details-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Details', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-kit-details';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Details Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-details',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-details' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
$content_event = get_post($event_id);
|
||||
$content = $content_event->post_content;
|
||||
$content = apply_filters('the_content', $content);
|
||||
$content = str_replace(']]>', ']]>', $content);
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-feature-content mep-elementor-widget-details">
|
||||
<?php echo $content; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventFaqtWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-faq-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event F.A.Q', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-accordion';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event F.A.Q Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-title h2',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_color',
|
||||
[
|
||||
'label' => __( 'Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-title h2' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_faq', true)) : '';
|
||||
?>
|
||||
<div class="mep-default-title mep-elementor-widget-faq">
|
||||
|
||||
<div class="mep-event-faq-part">
|
||||
<div id='mep-event-accordion' class="">
|
||||
<?php
|
||||
foreach ($mep_event_faq as $field) {
|
||||
?>
|
||||
<h3><?php if ($field['mep_faq_title'] != '') echo esc_attr($field['mep_faq_title']); ?></h3>
|
||||
<p><?php if ($field['mep_faq_content'] != '') echo esc_attr($field['mep_faq_content']); ?></p>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,987 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventListRecurringWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-elementor-event-list-recurring-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event List Recurring', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-sync';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_list_recurring_recurring_settings',
|
||||
[
|
||||
'label' => __( 'Event List Recurring Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_cat',
|
||||
[
|
||||
'label' => __( 'Event Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_cat'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_org',
|
||||
[
|
||||
'label' => __( 'Event Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_org'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_show',
|
||||
[
|
||||
'label' => __( 'No. of Events Show','mage-eventpress' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => __( '3', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider3',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_style',
|
||||
[
|
||||
'label' => __( 'Event List Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'grid',
|
||||
'options' => [
|
||||
'grid' => __( 'Grid', 'mage-eventpress' ),
|
||||
'list' => __( 'List', 'mage-eventpress' ),
|
||||
'minimal' => __( 'Minimal', 'mage-eventpress' ),
|
||||
'native' => __( 'Native', 'mage-eventpress' ),
|
||||
'timeline' => __( 'Timeline', 'mage-eventpress' ),
|
||||
'title' => __( 'Title Only', 'mage-eventpress' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider4',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_timeline_mode',
|
||||
[
|
||||
'label' => __( 'Timeline Events Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'vertical',
|
||||
'options' => [
|
||||
'vertical' => __( 'Vertical', 'mage-eventpress' ),
|
||||
'horizontal' => __( 'Horizontal', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_style',
|
||||
'operator' => '==',
|
||||
'value' => 'timeline'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider4_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_style',
|
||||
'operator' => '==',
|
||||
'value' => 'timeline'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_column',
|
||||
[
|
||||
'label' => __( 'Event Grid Column', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '3',
|
||||
'options' => [
|
||||
'1' => __( '1', 'mage-eventpress' ),
|
||||
'2' => __( '2', 'mage-eventpress' ),
|
||||
'3' => __( '3', 'mage-eventpress' ),
|
||||
'4' => __( '4', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_style',
|
||||
'operator' => '==',
|
||||
'value' => 'grid'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider5',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_style',
|
||||
'operator' => '==',
|
||||
'value' => 'grid'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_cat_filter',
|
||||
[
|
||||
'label' => __( 'Filter Events by Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __('Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_org_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider6',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_org_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_org_filter',
|
||||
[
|
||||
'label' => __( 'Filter Events by Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __('Yes', 'mage-eventpress' ),
|
||||
'no' => __('No', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_cat_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider7',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_cat_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_sort',
|
||||
[
|
||||
'label' => __( 'Sort Events', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => [
|
||||
'ASC' => __( 'Ascending', 'mage-eventpress' ),
|
||||
'DESC' => __( 'Descending', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider8',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_pagination',
|
||||
[
|
||||
'label' => __( 'Pagination', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Number Mode', 'mage-eventpress' ),
|
||||
'carousal' => __( 'Carousel Mode', 'mage-eventpress' ),
|
||||
'no' => __( 'None', 'mage-eventpress' )
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_carousel_id',
|
||||
[
|
||||
'label' => __( 'Carousel Unique ID', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '102448', 'mage-eventpress' ),
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_carousel_nav',
|
||||
[
|
||||
'label' => __( 'On/Off Carousel Navigation', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'On', 'mage-eventpress' ),
|
||||
'no' => __( 'Off', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_carousel_dot',
|
||||
[
|
||||
'label' => __( 'On/Off Carousel Dot', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'yes',
|
||||
'options' => [
|
||||
'yes' => __('On', 'mage-eventpress' ),
|
||||
'no' => __('Off', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_recurring_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider10',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_show_date',
|
||||
[
|
||||
'label' => __( 'Show Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-ev-start-date' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_list_recurring_style_settings',
|
||||
[
|
||||
'label' => __( 'Event List Recurring Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_day_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Day Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-ev-start-date .mep-day' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider11',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_month_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Month Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-ev-start-date .mep-month' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider12',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_date_text_color',
|
||||
[
|
||||
'label' => __( 'Event Date Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-ev-start-date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider13',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_text_typography',
|
||||
'label' => __( 'Event Date Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-ev-start-date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider14',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_title_text_color',
|
||||
[
|
||||
'label' => __( 'Event Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_list_title' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_title_list_item a' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider14_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_title_typography',
|
||||
'label' => __( 'Event Title Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_list_title',
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_title_list_item a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_desc_color',
|
||||
[
|
||||
'label' => __( 'Event Description Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-event-excerpt' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_desc_typography',
|
||||
'label' => __( 'Event Description Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-event-excerpt',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_price_text_color',
|
||||
[
|
||||
'label' => __( 'Event Price Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-header .mep_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_3',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_price_typography',
|
||||
'label' => __( 'Event Price Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_list_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider16',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_border_color',
|
||||
[
|
||||
'label' => __( 'Event Header Border Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-header:before' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider17',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_icon_color',
|
||||
[
|
||||
'label' => __( 'Event Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-footer ul li i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_minimal_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_native_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_timeline_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider18',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_footer_title_color',
|
||||
[
|
||||
'label' => __( 'Event Footer Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-footer ul li h5' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_location' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider19',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_footer_text_color',
|
||||
[
|
||||
'label' => __( 'Event Footer Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-footer ul li h6' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_location' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_footer_text_typography',
|
||||
'label' => __( 'Event Footer Text Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-footer ul li h5, {{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-list-footer ul li h6, {{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_location, {{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_minimal_list_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_button_color',
|
||||
[
|
||||
'label' => __( 'Event Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_more_date_btn' => 'color: {{VALUE}};border-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_more_date_btn:before' => 'background: {{VALUE}};border-color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_button_typography',
|
||||
'label' => __( 'Event Button Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_more_date_btn',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider21',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_carousel_nav_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Carousel Nav Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_list_recurring .owl-nav > button:hover' => 'background: {{VALUE}} !important',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_list_recurring .owl-dots button.active' => 'background: {{VALUE}} !important',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_event_list_recurring .owl-dots button.active::before' => 'border-bottom-color: {{VALUE}} !important',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider21_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_badge_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Badge Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-multidate-ribbon' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider22',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_details_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Details Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_list_event_details' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider23',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_details_padding',
|
||||
[
|
||||
'label' => __( 'Event Details Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep_list_event_details' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider24',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_item_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Box Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .mep-event-list-loop' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider25',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget button.mep-cat-control' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider26',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_active_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Active Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget button.mep-cat-control.mixitup-control-active' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider27',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_active_button_text_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Active Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget button.mep-cat-control.mixitup-control-active' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider28',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_pagination_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .page-numbers' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider29',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_pagination_active_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Active Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .page-numbers.current' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider30',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_recurring_pagination_active_button_text_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Active Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-recurring-widget .page-numbers.current' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
$cat = $settings['mep_event_list_recurring_cat'] > 0 ? $settings['mep_event_list_recurring_cat'] : '';
|
||||
$org = $settings['mep_event_list_recurring_org'] > 0 ? $settings['mep_event_list_recurring_org'] : '';
|
||||
$show = $settings['mep_event_list_recurring_show'] ? $settings['mep_event_list_recurring_show'] : '3';
|
||||
$style = $settings['mep_event_list_recurring_style'] ? $settings['mep_event_list_recurring_style'] : 'grid';
|
||||
$timeline_style = $settings['mep_event_list_recurring_timeline_mode'] ? $settings['mep_event_list_recurring_timeline_mode'] : 'vertical';
|
||||
$column = $settings['mep_event_list_recurring_column'] ? $settings['mep_event_list_recurring_column'] : '3';
|
||||
$cat_filter = $settings['mep_event_list_recurring_cat_filter'] ? $settings['mep_event_list_recurring_cat_filter'] : 'no';
|
||||
$org_filter = $settings['mep_event_list_recurring_org_filter'] ? $settings['mep_event_list_recurring_org_filter'] : 'no';
|
||||
$sort = $settings['mep_event_list_recurring_sort'] ? $settings['mep_event_list_recurring_sort'] : 'DESC';
|
||||
$pagination = $settings['mep_event_list_recurring_pagination'] ? $settings['mep_event_list_recurring_pagination'] : 'no';
|
||||
$carousel_id = $settings['mep_event_list_recurring_carousel_id'] ? $settings['mep_event_list_recurring_carousel_id'] : '102448';
|
||||
$carousel_nav = $settings['mep_event_list_recurring_carousel_nav'] ? $settings['mep_event_list_recurring_carousel_nav'] : 'no';
|
||||
$carousel_dot = $settings['mep_event_list_recurring_carousel_dot'] ? $settings['mep_event_list_recurring_carousel_dot'] : 'yes';
|
||||
?>
|
||||
<div class="mep-elementor-event-list-recurring-widget">
|
||||
<?php echo do_shortcode('[event-list-recurring cat='.$cat.' org='.$org.' show='.$show.' style='.$style.' timeline-mode='.$timeline_style.' column='.$column.' cat-filter='.$cat_filter.' org-filter='.$org_filter.' sort='.$sort.' pagination='.$pagination.' carousal-id='.$carousel_id.' carousal-nav='.$carousel_nav.' carousal-dots='.$carousel_dot.']'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,862 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Group_Control_Box_Shadow;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
|
||||
class MEPEventListWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-list-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event List', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-archive-posts';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'section_content',
|
||||
[
|
||||
'label' => __( 'Event List', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_cat',
|
||||
[
|
||||
'label' => __( 'Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_cat'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org',
|
||||
[
|
||||
'label' => __( 'Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_org'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_style',
|
||||
[
|
||||
'label' => __( 'List Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'grid',
|
||||
'options' => [
|
||||
'grid' => __( 'Grid', 'mage-eventpress' ),
|
||||
'list' => __( 'List', 'mage-eventpress' ),
|
||||
'minimal' => __( 'Minimal', 'mage-eventpress' ),
|
||||
'native' => __( 'Native', 'mage-eventpress' ),
|
||||
'timeline' => __( 'Timeline', 'mage-eventpress' ),
|
||||
'title' => __( 'Title Only', 'mage-eventpress' ),
|
||||
'spring' => __( 'Spring', 'mage-eventpress' ),
|
||||
'winter' => __( 'Winter', 'mage-eventpress' ),
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_column',
|
||||
[
|
||||
'label' => __( 'Column', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '3',
|
||||
'options' => [
|
||||
'1' => __( '1', 'mage-eventpress' ),
|
||||
'2' => __( '2', 'mage-eventpress' ),
|
||||
'3' => __( '3', 'mage-eventpress' ),
|
||||
'4' => __( '4', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_cat_filter',
|
||||
[
|
||||
'label' => __( 'Category Filter', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org_filter',
|
||||
[
|
||||
'label' => __( 'Organizer Filter', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_show',
|
||||
[
|
||||
'label' => __( 'No of Item Show', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '10', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_pagination',
|
||||
[
|
||||
'label' => __( 'Pagination', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'carousal' => __( 'Carousal', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_carousal_id',
|
||||
[
|
||||
'label' => __( 'Carousal Unique ID', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '102448', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_list_carousal_nav',
|
||||
[
|
||||
'label' => __( 'Carousal Navigation', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_carousal_dot',
|
||||
[
|
||||
'label' => __( 'Carousal Dot', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'yes',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_timeline_mode',
|
||||
[
|
||||
'label' => __( 'Timeline Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'vertical',
|
||||
'options' => [
|
||||
'vertical' => __( 'Vertical', 'mage-eventpress' ),
|
||||
'horizontal' => __( 'Horizontal', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_sort',
|
||||
[
|
||||
'label' => __( 'Sort', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'ASC',
|
||||
'options' => [
|
||||
'ASC' => __( 'Assending', 'mage-eventpress' ),
|
||||
'DESC' => __( 'Dessending', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_status',
|
||||
[
|
||||
'label' => __( 'Status', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'upcoming',
|
||||
'options' => [
|
||||
'upcoming' => __( 'Upcoming', 'mage-eventpress' ),
|
||||
'expired' => __( 'Expired', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_thumbnail',
|
||||
[
|
||||
'label' => __( 'Show Thumbnail', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_thumb' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_spring_thumb_wrapper' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_winter_thumb_wrapper' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_multidate_ribbon',
|
||||
[
|
||||
'label' => __( 'Show Ribbon', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'flex',
|
||||
'options' => [
|
||||
'flex' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-multidate-ribbon.mep-tem3-title-sec' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_view_more_date_ribbon',
|
||||
[
|
||||
'label' => __( 'Show View More Date Button', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'inline',
|
||||
'options' => [
|
||||
'inline' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_more_date_btn.mep-tem3-title-sec:not(.mep_more_date_btn.mep-tem3-title-sec.mp_event_hide_event_time)' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Date Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_list_date_style',
|
||||
[
|
||||
'label' => __( 'Date', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_show_date',
|
||||
[
|
||||
'label' => __( 'Show Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_width',
|
||||
[
|
||||
'label' => __( 'Width', 'simple-email-mailchimp-subscriber' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 1200,
|
||||
'step' => 5,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_border',
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_date_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_date_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_date_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_date_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'background: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_spring_list .mep_list_date_wrapper' => 'background: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list .mep_list_date_wrapper' => 'background: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list .mep_list_date_wrapper i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_date_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_spring_list .mep_list_date_wrapper .mep_spring_list_date' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list .mep_list_date_wrapper .mep_winter_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date,{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_spring_list .mep_list_date_wrapper .mep_spring_list_date,{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date,{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list .mep_list_date_wrapper .mep_winter_list_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
// Title Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_title_style',
|
||||
[
|
||||
'label' => __( 'Title', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_title',
|
||||
[
|
||||
'label' => __( 'Show Title', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_title_style_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_title_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_style_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_style_border_color',
|
||||
[
|
||||
'label' => __( 'Border Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_grid_item .mep-list-header:before' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
// Price Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_price_style',
|
||||
[
|
||||
'label' => __( 'Price', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_price',
|
||||
[
|
||||
'label' => __( 'Show Price', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_price' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_price_style_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_price' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_price_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date',
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep_price',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_price_style_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_price' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
// Event Info Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_info_style',
|
||||
[
|
||||
'label' => __( 'Event Information List', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_info',
|
||||
[
|
||||
'label' => __( 'Show Event Info', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_spring_list .mep_list_details_col_one' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list .mep_list_details_col_one' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_org_name',
|
||||
[
|
||||
'label' => __( 'Show Organiztion?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'flex',
|
||||
'options' => [
|
||||
'flex' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_org_name' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_location_name',
|
||||
[
|
||||
'label' => __( 'Show Location?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_location_name' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_spring_event_location' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_winter_event_location' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_date',
|
||||
[
|
||||
'label' => __( 'Show Date?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_event_date' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_spring_event_date' => 'display: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_winter_event_date' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_info_style_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer,{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_details_col_one',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer h5, {{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer h6, {{WRAPPER}} ul.mep-more-date-lists li,{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_details_col_one span' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_icon_bg_color',
|
||||
[
|
||||
'label' => __( 'Icon Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer li .evl-ico i, {{WRAPPER}} ul.mep-more-date-lists i,{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_details_col_one span i' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_icon_color',
|
||||
[
|
||||
'label' => __( 'Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer li .evl-ico i, {{WRAPPER}} ul.mep-more-date-lists i,{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_details_col_one span i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_info_style_thumb_border_color',
|
||||
[
|
||||
'label' => __( 'Thumbnail Border Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_winter_thumb' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'winter'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_info_style_list_bg_color',
|
||||
[
|
||||
'label' => __( 'List Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_spring_list' => 'background: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_winter_list' => 'background: {{VALUE}};',
|
||||
],
|
||||
'conditions' => [
|
||||
'relation' => 'or',
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'winter'
|
||||
],
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'spring'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_info_style_ribbon_bg_color',
|
||||
[
|
||||
'label' => __( 'Ribbon Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-multidate-ribbon' => 'background: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-eventtype-ribbon' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_btn_style',
|
||||
[
|
||||
'label' => __( 'Button Style', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_btn_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_btn_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_more_date_btn.mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_btn_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_more_date_btn.mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
// $this->add_inline_editing_attributes( 'title', 'none' );
|
||||
// $this->add_inline_editing_attributes( 'description', 'basic' );
|
||||
// $this->add_inline_editing_attributes( 'content', 'advanced' );
|
||||
// $id = $settings['wpmsems_form_id'] ? $settings['wpmsems_form_id'] : 102448;
|
||||
|
||||
|
||||
|
||||
$cat = $settings['mep_event_list_cat'] > 0 ? $settings['mep_event_list_cat'] : '';
|
||||
$org = $settings['mep_event_list_org'] > 0 ? $settings['mep_event_list_org'] : '';
|
||||
|
||||
$style = $settings['mep_event_list_style'] ? $settings['mep_event_list_style'] : 'grid';
|
||||
$column = $settings['mep_event_list_column'] ? $settings['mep_event_list_column'] : '3';
|
||||
$cat_filter = $settings['mep_event_list_cat_filter'] ? $settings['mep_event_list_cat_filter'] : 'no';
|
||||
$org_filter = $settings['mep_event_list_org_filter'] ? $settings['mep_event_list_org_filter'] : 'no';
|
||||
$show = $settings['mep_event_list_show'] ? $settings['mep_event_list_show'] : '10';
|
||||
$pagination = $settings['mep_event_list_pagination'] ? $settings['mep_event_list_pagination'] : 'no';
|
||||
$carousal_id = $settings['mep_event_carousal_id'] ? $settings['mep_event_carousal_id'] : '102448';
|
||||
$carousal_nav = $settings['mep_event_list_carousal_nav'] ? $settings['mep_event_list_carousal_nav'] : 'no';
|
||||
$carousal_dot = $settings['mep_event_list_carousal_dot'] ? $settings['mep_event_list_carousal_dot'] : 'yes';
|
||||
$timeline_style = $settings['mep_event_list_timeline_mode'] ? $settings['mep_event_list_timeline_mode'] : 'vertical';
|
||||
$sort = $settings['mep_event_list_sort'] ? $settings['mep_event_list_sort'] : 'ASC';
|
||||
$status = $settings['mep_event_list_status'] ? $settings['mep_event_list_status'] : 'upcoming';
|
||||
|
||||
|
||||
|
||||
// "cat" => "0",
|
||||
// "org" => "0",
|
||||
// "style" => "grid",
|
||||
// "column" => 3,
|
||||
// "cat-filter" => "no",
|
||||
// "org-filter" => "no",
|
||||
// "show" => "-1",
|
||||
// "pagination" => "no",
|
||||
// "city" => "",
|
||||
// "country" => "",
|
||||
// "carousal-nav" => "no",
|
||||
// "carousal-dots" => "yes",
|
||||
// "carousal-id" => "102448",
|
||||
// "timeline-mode" => "vertical",
|
||||
// 'sort' => 'ASC',
|
||||
// 'status' => 'upcoming'
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="mep-elementor-event-list-widget">
|
||||
<?php echo do_shortcode("[event-list cat='$cat' org='$org' style='$style' column='$column' cat-filter='$cat_filter' org-filter='$org_filter' show='$show' pagination='$pagination' carousal-nav='$carousal_nav' carousal-dots='$carousal_dot' carousal-id='$carousal_id' timeline-mode='$timeline_style' sort='$sort' status='$status']"); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventLocationWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-location-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Location', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-call-to-action';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Location Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_location_before_text',
|
||||
[
|
||||
'label' => __( 'Before Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_location_after_text',
|
||||
[
|
||||
'label' => __( 'After Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_location_style',
|
||||
[
|
||||
'label' => __( 'Location Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'full',
|
||||
'options' => [
|
||||
'full' => __( 'Full Location Address', 'mage-eventpress' ),
|
||||
'location' => __( 'location Name', 'mage-eventpress' ),
|
||||
'street' => __( 'Street', 'mage-eventpress' ),
|
||||
'state' => __( 'State', 'mage-eventpress' ),
|
||||
'city' => __( 'City', 'mage-eventpress' ),
|
||||
'zip' => __( 'Postcode', 'mage-eventpress' ),
|
||||
'country' => __( 'Country', 'mage-eventpress' )
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-location span',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_color',
|
||||
[
|
||||
'label' => __( 'Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-location span' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$mep_event_location_style = $settings['mep_event_location_style'];
|
||||
$before_text = $settings['mep_ele_location_before_text'];
|
||||
$after_text = $settings['mep_ele_location_after_text'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
if(!empty($mep_event_location_style)){
|
||||
?>
|
||||
<div class="mep-default-location mep-elementor-widget-location">
|
||||
<span><?php echo $before_text; ?></span> <span><?php echo mep_get_location($event_id,$mep_event_location_style); ?></span> <span><?php echo $after_text; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventMaptWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-map-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Google Map', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-google-maps';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Map Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
// $this->start_controls_section(
|
||||
// 'mep_event_city_style_settings',
|
||||
// [
|
||||
// 'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
// 'tab' => Controls_Manager::TAB_CONTENT,
|
||||
// ]
|
||||
// );
|
||||
// $this->add_group_control(
|
||||
// Group_Control_Typography::get_type(),
|
||||
// [
|
||||
// 'name' => 'mep_title_typo',
|
||||
// 'scheme' => Typography::TYPOGRAPHY_3,
|
||||
// 'selector' => '{{WRAPPER}} .mep-elementor-widget-title h2',
|
||||
// ]
|
||||
// );
|
||||
// $this->add_control(
|
||||
// 'mep_event_title_color',
|
||||
// [
|
||||
// 'label' => __( 'Title Color', 'mage-eventpress' ),
|
||||
// 'type' => Controls_Manager::COLOR,
|
||||
// 'selectors' => [
|
||||
// '{{WRAPPER}} .mep-elementor-widget-title h2' => 'color: {{VALUE}};',
|
||||
// ],
|
||||
// ]
|
||||
// );
|
||||
|
||||
|
||||
|
||||
// $this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-map mep-elementor-widget-map">
|
||||
|
||||
<?php do_action('mep_event_map',$event_id); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventOrgWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-org-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Org', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-banner';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Org Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_ele_org_before_text',
|
||||
[
|
||||
'label' => __( 'Before Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_org_after_text',
|
||||
[
|
||||
'label' => __( 'After Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-org',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_color',
|
||||
[
|
||||
'label' => __( 'Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-org' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$before_text = $settings['mep_ele_org_before_text'];
|
||||
$after_text = $settings['mep_ele_org_after_text'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
$author_terms = get_the_terms($event_id, 'mep_org');
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
if(sizeof($author_terms) > 0){
|
||||
?>
|
||||
<div class="mep-default-org mep-elementor-widget-org">
|
||||
<span><?php echo $before_text; ?></span> <span><?php echo $author_terms[0]->name; ?></span> <span><?php echo $after_text; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventScheduleWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-schedule-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Schedule', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-price-list';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Schedule Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_sch_sec_height',
|
||||
[
|
||||
'label' => __( 'Section Height', 'plugin-name' ),
|
||||
'type' => \Elementor\Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 100,
|
||||
'max' => 900,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 270,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul#mep_event_date_sch' => 'height: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-schedule',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_icon_color',
|
||||
[
|
||||
'label' => __( 'Date Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul li span.mep-more-date i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_text_color',
|
||||
[
|
||||
'label' => __( 'Date Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul li span.mep-more-date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_time_icon_color',
|
||||
[
|
||||
'label' => __( 'Time Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul li span.mep-more-time i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_time_text_color',
|
||||
[
|
||||
'label' => __( 'Time Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul li span.mep-more-time' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_sch_item_space',
|
||||
[
|
||||
'label' => __( 'Item Space', 'plugin-name' ),
|
||||
'type' => \Elementor\Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px'],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 1,
|
||||
'max' => 200,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 10,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule ul li' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_sch_view_more-btn_style',
|
||||
[
|
||||
'label' => __( 'View More Button Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' ),
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule #mep_single_view_all_date' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_btn_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-schedule #mep_single_view_all_date, {{WRAPPER}} .mep-elementor-widget-schedule #mep_single_hide_all_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_btn_bg_color',
|
||||
[
|
||||
'label' => __( 'View Button Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule #mep_single_view_all_date, {{WRAPPER}} .mep-elementor-widget-schedule #mep_single_hide_all_date' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_btn_text_color',
|
||||
[
|
||||
'label' => __( 'View Button Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-schedule #mep_single_view_all_date, {{WRAPPER}} .mep-elementor-widget-schedule #mep_single_hide_all_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-schedule mep-elementor-widget-schedule">
|
||||
<?php echo do_action('mep_event_date_default_theme',$event_id,'no'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventShareBTNtWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-share-btn-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Share Buttons', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-social-icons';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Share Button Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_share-btn_style',
|
||||
[
|
||||
'label' => __( 'Title Display?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' ),
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-share-btn span.mep-share-btn-title' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_share-btn_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-share-btn ul.mep-social-share a' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_share-btn_icon_color',
|
||||
[
|
||||
'label' => __( 'Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-share-btn ul.mep-social-share a i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-share-btn mep-elementor-widget-share-btn">
|
||||
<?php do_action('mep_event_social_share',$event_id); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPSpeakerListWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-speaker-list-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Speaker List', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-nerd-wink';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_speaker_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Speaker List Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('Show All'),
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_speaker_style_settings',
|
||||
[
|
||||
'label' => __( 'Event Speaker Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_speaker_title_color',
|
||||
[
|
||||
'label' => __( 'Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-speaker-list-widget .mep-default-sidebar-speaker-list ul li h6' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
$mep_event_list = $settings['mep_event_list'] > 0 ? $settings['mep_event_list'] : '';
|
||||
?>
|
||||
<div class="mep-elementor-event-speaker-list-widget">
|
||||
<?php echo do_shortcode('[event-speaker-list event="'.$mep_event_list.'"]'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventThumbnailtWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-thumb-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Feature Image', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-image';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Feature Image Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
// $this->start_controls_section(
|
||||
// 'mep_event_thumbnail_settings',
|
||||
// [
|
||||
// 'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
// 'tab' => Controls_Manager::TAB_CONTENT,
|
||||
// ]
|
||||
// );
|
||||
// $this->add_group_control(
|
||||
// Group_Control_Typography::get_type(),
|
||||
// [
|
||||
// 'name' => 'mep_title_typo',
|
||||
// 'scheme' => Typography::TYPOGRAPHY_3,
|
||||
// 'selector' => '{{WRAPPER}} .mep-elementor-widget-title h2',
|
||||
// ]
|
||||
// );
|
||||
// $this->add_control(
|
||||
// 'mep_event_title_color',
|
||||
// [
|
||||
// 'label' => __( 'Title Color', 'mage-eventpress' ),
|
||||
// 'type' => Controls_Manager::COLOR,
|
||||
// 'selectors' => [
|
||||
// '{{WRAPPER}} .mep-elementor-widget-title h2' => 'color: {{VALUE}};',
|
||||
// ],
|
||||
// ]
|
||||
// );
|
||||
// $this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-event-thumbnail mep-elementor-widget-thumb">
|
||||
<h2><?php echo get_the_post_thumbnail( $event_id, 'full'); ?></h2>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventTitletWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-title-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Title', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-post-title';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Title Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-title h2',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_color',
|
||||
[
|
||||
'label' => __( 'Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-title h2' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
?>
|
||||
<div class="mep-default-title mep-elementor-widget-title">
|
||||
<h2><?php echo get_the_title($event_id); ?></h2>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPEventSeattWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-seat-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event Availabe Seat', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-gallery-grid';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_list_settings',
|
||||
[
|
||||
'label' => __( 'Event Seat Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list',
|
||||
[
|
||||
'label' => __( 'Select Event', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_events('None'),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_seat_before_text',
|
||||
[
|
||||
'label' => __( 'Before Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_ele_seat_after_text',
|
||||
[
|
||||
'label' => __( 'After Text', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_city_style_settings',
|
||||
[
|
||||
'label' => __( 'Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_title_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-widget-seat',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_color',
|
||||
[
|
||||
'label' => __( 'Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-widget-seat' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
global $post;
|
||||
$settings = $this->get_settings_for_display();
|
||||
$user_select_event = $settings['mep_event_list'];
|
||||
$before_text = $settings['mep_ele_seat_before_text'];
|
||||
$after_text = $settings['mep_ele_seat_after_text'];
|
||||
$event_id = $user_select_event > 0 ? $user_select_event : $post->ID;
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
?>
|
||||
<div class="mep-default-seat mep-elementor-widget-seat">
|
||||
<span><?php echo $before_text; ?></span> <span><?php do_action('mep_event_seat',$event_id); ?></span><span><?php echo $after_text; ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,995 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
class MEPExpiredEventWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-expired-event-list-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Expired Event List', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'fas fa-history';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_list_settings',
|
||||
[
|
||||
'label' => __( 'Event List Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_list_cat',
|
||||
[
|
||||
'label' => __( 'Event Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_cat'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org',
|
||||
[
|
||||
'label' => __( 'Event Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_org'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_show',
|
||||
[
|
||||
'label' => __( 'No. of Events Show','mage-eventpress' ),
|
||||
'type' => Controls_Manager::NUMBER,
|
||||
'default' => __( '3', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider3',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_style',
|
||||
[
|
||||
'label' => __( 'Event List Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'grid',
|
||||
'options' => [
|
||||
'grid' => __( 'Grid', 'mage-eventpress' ),
|
||||
'list' => __( 'List', 'mage-eventpress' ),
|
||||
'minimal' => __( 'Minimal', 'mage-eventpress' ),
|
||||
'native' => __( 'Native', 'mage-eventpress' ),
|
||||
'timeline' => __( 'Timeline', 'mage-eventpress' ),
|
||||
'title' => __( 'Title Only', 'mage-eventpress' ),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider4',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_timeline_mode',
|
||||
[
|
||||
'label' => __( 'Timeline Events Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'vertical',
|
||||
'options' => [
|
||||
'vertical' => __( 'Vertical', 'mage-eventpress' ),
|
||||
'horizontal' => __( 'Horizontal', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'timeline'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider4_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'timeline'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_column',
|
||||
[
|
||||
'label' => __( 'Event Grid Column', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '3',
|
||||
'options' => [
|
||||
'1' => __( '1', 'mage-eventpress' ),
|
||||
'2' => __( '2', 'mage-eventpress' ),
|
||||
'3' => __( '3', 'mage-eventpress' ),
|
||||
'4' => __( '4', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'grid'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider5',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_style',
|
||||
'operator' => '==',
|
||||
'value' => 'grid'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_cat_filter',
|
||||
[
|
||||
'label' => __( 'Filter Events by Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __('Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_org_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider6',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_org_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org_filter',
|
||||
[
|
||||
'label' => __( 'Filter Events by Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __('Yes', 'mage-eventpress' ),
|
||||
'no' => __('No', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_cat_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider7',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_cat_filter',
|
||||
'operator' => '==',
|
||||
'value' => 'no'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_sort',
|
||||
[
|
||||
'label' => __( 'Sort Events', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'DESC',
|
||||
'options' => [
|
||||
'ASC' => __( 'Ascending', 'mage-eventpress' ),
|
||||
'DESC' => __( 'Descending', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider8',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_pagination',
|
||||
[
|
||||
'label' => __( 'Pagination', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Number Mode', 'mage-eventpress' ),
|
||||
'carousal' => __( 'Carousel Mode', 'mage-eventpress' ),
|
||||
'no' => __( 'None', 'mage-eventpress' )
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_carousel_id',
|
||||
[
|
||||
'label' => __( 'Carousel Unique ID', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '102448', 'mage-eventpress' ),
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_carousel_nav',
|
||||
[
|
||||
'label' => __( 'On/Off Carousel Navigation', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'On', 'mage-eventpress' ),
|
||||
'no' => __( 'Off', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider9_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_carousel_dot',
|
||||
[
|
||||
'label' => __( 'On/Off Carousel Dot', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'yes',
|
||||
'options' => [
|
||||
'yes' => __('On', 'mage-eventpress' ),
|
||||
'no' => __('Off', 'mage-eventpress' )
|
||||
],
|
||||
'conditions' => [
|
||||
'terms' => [
|
||||
[
|
||||
'name' => 'mep_event_list_pagination',
|
||||
'operator' => '==',
|
||||
'value' => 'carousal'
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider10',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_date',
|
||||
[
|
||||
'label' => __( 'Show Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-ev-start-date' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
/*****************
|
||||
* Event List Style
|
||||
******************/
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_style_settings',
|
||||
[
|
||||
'label' => __( 'Event Style Settings', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_day_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Day Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-ev-start-date .mep-day' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider11',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_month_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Month Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-ev-start-date mep-month' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider12',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_date_text_color',
|
||||
[
|
||||
'label' => __( 'Event Date Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-ev-start-date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider13',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_text_typography',
|
||||
'label' => __( 'Event Date Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep-ev-start-date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider14',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_title_text_color',
|
||||
[
|
||||
'label' => __( 'Event Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_list_title' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_title_list_item a' => 'color: {{VALUE}} !important;',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider14_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_title_typography',
|
||||
'label' => __( 'Event Title Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep_list_title',
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_title_list_item a',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_desc_color',
|
||||
[
|
||||
'label' => __( 'Event Description Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-event-excerpt' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_desc_typography',
|
||||
'label' => __( 'Event Description Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep-event-excerpt',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_price_text_color',
|
||||
[
|
||||
'label' => __( 'Event Price Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-header .mep_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider15_3',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_price_typography',
|
||||
'label' => __( 'Event Price Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep_list_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider16',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_border_color',
|
||||
[
|
||||
'label' => __( 'Event Header Border Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-header:before' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider17',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_icon_color',
|
||||
[
|
||||
'label' => __( 'Event Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-footer ul li i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_minimal_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_native_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_timeline_list h3.mep_list_date i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider18',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_footer_title_color',
|
||||
[
|
||||
'label' => __( 'Event Footer Title Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-footer ul li h5' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_location' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider19',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_footer_text_color',
|
||||
[
|
||||
'label' => __( 'Event Footer Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-footer ul li h6' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_location' => 'color: {{VALUE}};',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_footer_text_typography',
|
||||
'label' => __( 'Event Footer Text Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-footer ul li h5, {{WRAPPER}} .mep-elementor-expired-event-widget .mep-list-footer ul li h6, {{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_location, {{WRAPPER}} .mep-elementor-expired-event-widget .mep_minimal_list_date',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_button_color',
|
||||
[
|
||||
'label' => __( 'Event Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_more_date_btn' => 'color: {{VALUE}};border-color: {{VALUE}}',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_more_date_btn:before' => 'background: {{VALUE}};border-color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider20_2',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_button_typography',
|
||||
'label' => __( 'Event Button Typography', 'mage-eventpress' ),
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-expired-event-widget .mep_more_date_btn',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider21',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_carousel_nav_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Carousel Nav Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_list .owl-nav > button:hover' => 'background: {{VALUE}} !important',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_list .owl-dots button.active' => 'background: {{VALUE}} !important',
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_event_list .owl-dots button.active::before' => 'border-bottom-color: {{VALUE}} !important',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider21_1',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_badge_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Badge Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-multidate-ribbon' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider22',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_details_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Details Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_list_event_details' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider23',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_event_details_padding',
|
||||
[
|
||||
'label' => __( 'Event Details Padding', 'elementor' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%', 'rem' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep_list_event_details' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider24',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_item_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Box Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .mep-event-list-loop' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider25',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget button.mep-cat-control' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider26',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_active_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Active Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget button.mep-cat-control.mixitup-control-active' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider27',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_filter_active_button_text_color',
|
||||
[
|
||||
'label' => __( 'Event Filter Active Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget button.mep-cat-control.mixitup-control-active' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider28',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_pagination_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .page-numbers' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider29',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_pagination_active_button_bg_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Active Button Background', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .page-numbers.current' => 'background: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'divider30',
|
||||
[
|
||||
'type' => Controls_Manager::DIVIDER,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_pagination_active_button_text_color',
|
||||
[
|
||||
'label' => __( 'Event Pagination Active Button Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-expired-event-widget .page-numbers.current' => 'color: {{VALUE}}',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
|
||||
$settings = $this->get_settings_for_display();
|
||||
$cat = $settings['mep_event_list_cat'] > 0 ? $settings['mep_event_list_cat'] : '';
|
||||
$org = $settings['mep_event_list_org'] > 0 ? $settings['mep_event_list_org'] : '';
|
||||
$show = $settings['mep_event_list_show'] ? $settings['mep_event_list_show'] : '3';
|
||||
$style = $settings['mep_event_list_style'] ? $settings['mep_event_list_style'] : 'grid';
|
||||
$timeline_style = $settings['mep_event_list_timeline_mode'] ? $settings['mep_event_list_timeline_mode'] : 'vertical';
|
||||
$column = $settings['mep_event_list_column'] ? $settings['mep_event_list_column'] : '3';
|
||||
$cat_filter = $settings['mep_event_list_cat_filter'] ? $settings['mep_event_list_cat_filter'] : 'no';
|
||||
$org_filter = $settings['mep_event_list_org_filter'] ? $settings['mep_event_list_org_filter'] : 'no';
|
||||
$sort = $settings['mep_event_list_sort'] ? $settings['mep_event_list_sort'] : 'DESC';
|
||||
$pagination = $settings['mep_event_list_pagination'] ? $settings['mep_event_list_pagination'] : 'no';
|
||||
$carousel_id = $settings['mep_event_carousel_id'] ? $settings['mep_event_carousel_id'] : '102448';
|
||||
$carousel_nav = $settings['mep_event_list_carousel_nav'] ? $settings['mep_event_list_carousel_nav'] : 'no';
|
||||
$carousel_dot = $settings['mep_event_list_carousel_dot'] ? $settings['mep_event_list_carousel_dot'] : 'yes';
|
||||
|
||||
?>
|
||||
<div class="mep-elementor-expired-event-widget">
|
||||
<?php echo do_shortcode('[expire-event-list cat='.$cat.' org='.$org.' show='.$show.' style='.$style.' timeline-mode='.$timeline_style.' column='.$column.' cat-filter='.$cat_filter.' org-filter='.$org_filter.' sort='.$sort.' pagination='.$pagination.' carousal-id='.$carousel_id.' carousal-nav='.$carousel_nav.' carousal-dots='.$carousel_dot.']'); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,795 @@
|
|||
<?php
|
||||
namespace MEPPlugin\Widgets;
|
||||
|
||||
use Elementor\Widget_Base;
|
||||
use Elementor\Controls_Manager;
|
||||
use Elementor\Group_Control_Border;
|
||||
use Elementor\Group_Control_Box_Shadow;
|
||||
use Elementor\Group_Control_Text_Shadow;
|
||||
use Elementor\Group_Control_Typography;
|
||||
use Elementor\Core\Schemes\Typography;
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
/**
|
||||
* @since 1.1.0
|
||||
*/
|
||||
|
||||
class MEPEventListWidget extends Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'mep-event-list-widget';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return __( 'Event List', 'mage-eventpress' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-archive-posts';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'mep-elementor-support' ];
|
||||
}
|
||||
|
||||
protected function _register_controls() {
|
||||
|
||||
$this->start_controls_section(
|
||||
'section_content',
|
||||
[
|
||||
'label' => __( 'Event List', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_cat',
|
||||
[
|
||||
'label' => __( 'Category', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_cat'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org',
|
||||
[
|
||||
'label' => __( 'Organizer', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '0',
|
||||
'options' => mep_elementor_get_tax_term('mep_org'),
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_style',
|
||||
[
|
||||
'label' => __( 'List Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'grid',
|
||||
'options' => [
|
||||
'grid' => __( 'Grid', 'mage-eventpress' ),
|
||||
'list' => __( 'List', 'mage-eventpress' ),
|
||||
'minimal' => __( 'Minimal', 'mage-eventpress' ),
|
||||
'native' => __( 'Native', 'mage-eventpress' ),
|
||||
'timeline' => __( 'Timeline', 'mage-eventpress' ),
|
||||
'title' => __( 'Title Only', 'mage-eventpress' ),
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_column',
|
||||
[
|
||||
'label' => __( 'Column', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => '3',
|
||||
'options' => [
|
||||
'1' => __( '1', 'mage-eventpress' ),
|
||||
'2' => __( '2', 'mage-eventpress' ),
|
||||
'3' => __( '3', 'mage-eventpress' ),
|
||||
'4' => __( '4', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_cat_filter',
|
||||
[
|
||||
'label' => __( 'Category Filter', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_org_filter',
|
||||
[
|
||||
'label' => __( 'Organizer Filter', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_show',
|
||||
[
|
||||
'label' => __( 'No of Item Show', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '10', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_pagination',
|
||||
[
|
||||
'label' => __( 'Pagination', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'carousal' => __( 'Carousal', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_carousal_id',
|
||||
[
|
||||
'label' => __( 'Carousal Unique ID', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::TEXT,
|
||||
'default' => __( '102448', 'mage-eventpress' ),
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_list_carousal_nav',
|
||||
[
|
||||
'label' => __( 'Carousal Navigation', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'no',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_carousal_dot',
|
||||
[
|
||||
'label' => __( 'Carousal Dot', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'yes',
|
||||
'options' => [
|
||||
'yes' => __( 'Yes', 'mage-eventpress' ),
|
||||
'no' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_timeline_mode',
|
||||
[
|
||||
'label' => __( 'Timeline Style', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'vertical',
|
||||
'options' => [
|
||||
'vertical' => __( 'Vertical', 'mage-eventpress' ),
|
||||
'horizontal' => __( 'Horizontal', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_sort',
|
||||
[
|
||||
'label' => __( 'Sort', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'ASC',
|
||||
'options' => [
|
||||
'ASC' => __( 'Assending', 'mage-eventpress' ),
|
||||
'DESC' => __( 'Dessending', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_list_status',
|
||||
[
|
||||
'label' => __( 'Status', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'upcoming',
|
||||
'options' => [
|
||||
'upcoming' => __( 'Upcoming', 'mage-eventpress' ),
|
||||
'expired' => __( 'Expired', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_thumbnail',
|
||||
[
|
||||
'label' => __( 'Show Thumbnail', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_thumb' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_multidate_ribbon',
|
||||
[
|
||||
'label' => __( 'Show Multi Date Ribbon', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'inline',
|
||||
'options' => [
|
||||
'inline' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-multidate-ribbon.mep-tem3-title-sec' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_view_more_date_ribbon',
|
||||
[
|
||||
'label' => __( 'Show View More Date Ribbon', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'inline',
|
||||
'options' => [
|
||||
'inline' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_more_date_btn.mep-tem3-title-sec' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Date Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_list_date_style',
|
||||
[
|
||||
'label' => __( 'Date', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_show_date',
|
||||
[
|
||||
'label' => __( 'Show Date', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_date_width',
|
||||
[
|
||||
'label' => __( 'Width', 'simple-email-mailchimp-subscriber' ),
|
||||
'type' => Controls_Manager::SLIDER,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'range' => [
|
||||
'px' => [
|
||||
'min' => 0,
|
||||
'max' => 1200,
|
||||
'step' => 5,
|
||||
],
|
||||
'%' => [
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
],
|
||||
],
|
||||
'default' => [
|
||||
'unit' => 'px',
|
||||
'size' => 50,
|
||||
],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'width: {{SIZE}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Border::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_border',
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date',
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_date_border_radius',
|
||||
[
|
||||
'label' => __( 'Border Radius', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_responsive_control(
|
||||
'mep_date_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_date_margin',
|
||||
[
|
||||
'label' => __( 'Margin', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_date_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'background: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_date_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_date_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-ev-start-date',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Title Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_title_style',
|
||||
[
|
||||
'label' => __( 'Title', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_title',
|
||||
[
|
||||
'label' => __( 'Show Title', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_title_style_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_title_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_style_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_title' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_title_style_border_color',
|
||||
[
|
||||
'label' => __( 'Border Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_event_grid_item .mep-list-header:before' => 'border-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
// Price Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_price_style',
|
||||
[
|
||||
'label' => __( 'Price', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_price',
|
||||
[
|
||||
'label' => __( 'Show Price', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'display: {{VALUE}};',
|
||||
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_responsive_control(
|
||||
'mep_event_price_style_padding',
|
||||
[
|
||||
'label' => __( 'Padding', 'plugin-name' ),
|
||||
'type' => Controls_Manager::DIMENSIONS,
|
||||
'size_units' => [ 'px', 'em', '%' ],
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_price_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_price_style_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_date' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
// Event Info Style
|
||||
$this->start_controls_section(
|
||||
'mep_event_info_style',
|
||||
[
|
||||
'label' => __( 'Event Information List', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_show_info',
|
||||
[
|
||||
'label' => __( 'Show Event Info', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'block',
|
||||
'options' => [
|
||||
'block' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_org_name',
|
||||
[
|
||||
'label' => __( 'Show Organiztion?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'flex',
|
||||
'options' => [
|
||||
'flex' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_org_name' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_location_name',
|
||||
[
|
||||
'label' => __( 'Show Location?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'flex',
|
||||
'options' => [
|
||||
'flex' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_location_name' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_date',
|
||||
[
|
||||
'label' => __( 'Show Date?', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::SELECT,
|
||||
'default' => 'flex',
|
||||
'options' => [
|
||||
'flex' => __( 'Yes', 'mage-eventpress' ),
|
||||
'none' => __( 'No', 'mage-eventpress' )
|
||||
],
|
||||
'separator' => 'none',
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep_list_event_date' => 'display: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_info_style_typo',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer',
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer h5, {{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer h6, {{WRAPPER}} ul.mep-more-date-lists li' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_icon_bg_color',
|
||||
[
|
||||
'label' => __( 'Icon Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer li .evl-ico i, {{WRAPPER}} ul.mep-more-date-lists i' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$this->add_control(
|
||||
'mep_event_info_style_icon_color',
|
||||
[
|
||||
'label' => __( 'Icon Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-list-footer li .evl-ico i, {{WRAPPER}} ul.mep-more-date-lists i' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
$this->start_controls_section(
|
||||
'mep_event_btn_style',
|
||||
[
|
||||
'label' => __( 'Button Style', 'mage-eventpress' ),
|
||||
'tab' => Controls_Manager::TAB_STYLE,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
$this->add_group_control(
|
||||
Group_Control_Typography::get_type(),
|
||||
[
|
||||
'name' => 'mep_event_btn_style_type',
|
||||
'scheme' => Typography::TYPOGRAPHY_3,
|
||||
'selector' => '{{WRAPPER}} .mep-elementor-event-list-widget .mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a',
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_btn_bg_color',
|
||||
[
|
||||
'label' => __( 'Background Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a' => 'background-color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->add_control(
|
||||
'mep_event_btn_text_color',
|
||||
[
|
||||
'label' => __( 'Text Color', 'mage-eventpress' ),
|
||||
'type' => Controls_Manager::COLOR,
|
||||
'selectors' => [
|
||||
'{{WRAPPER}} .mep-elementor-event-list-widget .mep-tem3-title-sec, {{WRAPPER}} .mep-elementor-event-list-widget .pagination-sec a' => 'color: {{VALUE}};',
|
||||
],
|
||||
]
|
||||
);
|
||||
$this->end_controls_section();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
$settings = $this->get_settings_for_display();
|
||||
// $this->add_inline_editing_attributes( 'title', 'none' );
|
||||
// $this->add_inline_editing_attributes( 'description', 'basic' );
|
||||
// $this->add_inline_editing_attributes( 'content', 'advanced' );
|
||||
// $id = $settings['wpmsems_form_id'] ? $settings['wpmsems_form_id'] : 102448;
|
||||
|
||||
|
||||
|
||||
$cat = $settings['mep_event_list_cat'] > 0 ? $settings['mep_event_list_cat'] : '';
|
||||
$org = $settings['mep_event_list_org'] > 0 ? $settings['mep_event_list_org'] : '';
|
||||
|
||||
$style = $settings['mep_event_list_style'] ? $settings['mep_event_list_style'] : 'grid';
|
||||
$column = $settings['mep_event_list_column'] ? $settings['mep_event_list_column'] : '3';
|
||||
$cat_filter = $settings['mep_event_list_cat_filter'] ? $settings['mep_event_list_cat_filter'] : 'no';
|
||||
$org_filter = $settings['mep_event_list_org_filter'] ? $settings['mep_event_list_org_filter'] : 'no';
|
||||
$show = $settings['mep_event_list_show'] ? $settings['mep_event_list_show'] : '10';
|
||||
$pagination = $settings['mep_event_list_pagination'] ? $settings['mep_event_list_pagination'] : 'no';
|
||||
$carousal_id = $settings['mep_event_carousal_id'] ? $settings['mep_event_carousal_id'] : '102448';
|
||||
$carousal_nav = $settings['mep_event_list_carousal_nav'] ? $settings['mep_event_list_carousal_nav'] : 'no';
|
||||
$carousal_dot = $settings['mep_event_list_carousal_dot'] ? $settings['mep_event_list_carousal_dot'] : 'yes';
|
||||
$timeline_style = $settings['mep_event_list_timeline_mode'] ? $settings['mep_event_list_timeline_mode'] : 'vertical';
|
||||
$sort = $settings['mep_event_list_sort'] ? $settings['mep_event_list_sort'] : 'ASC';
|
||||
$status = $settings['mep_event_list_status'] ? $settings['mep_event_list_status'] : 'upcoming';
|
||||
|
||||
|
||||
|
||||
// "cat" => "0",
|
||||
// "org" => "0",
|
||||
// "style" => "grid",
|
||||
// "column" => 3,
|
||||
// "cat-filter" => "no",
|
||||
// "org-filter" => "no",
|
||||
// "show" => "-1",
|
||||
// "pagination" => "no",
|
||||
// "city" => "",
|
||||
// "country" => "",
|
||||
// "carousal-nav" => "no",
|
||||
// "carousal-dots" => "yes",
|
||||
// "carousal-id" => "102448",
|
||||
// "timeline-mode" => "vertical",
|
||||
// 'sort' => 'ASC',
|
||||
// 'status' => 'upcoming'
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<div class="mep-elementor-event-list-widget">
|
||||
<?php echo do_shortcode("[event-list cat='$cat' org='$org' style='$style' column='$column' cat-filter='$cat_filter' org-filter='$org_filter' show='$show' pagination='$pagination' carousal-nav='$carousal_nav' carousal-dots='$carousal_dot' carousal-id='$carousal_id' timeline-mode='$timeline_style' sort='$sort' status='$status']"); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
|
||||
?>
|
||||
<div class='mep-event-list-loop mep_event_list_item mep_event_spring_list mix <?php echo $org_class.' '.$cat_class; ?>'>
|
||||
<?php do_action('mep_event_spring_list_loop_header',$event_id); ?>
|
||||
<div class="mep_list_date_wrapper">
|
||||
<h4 class='mep_spring_list_date'> <?php echo $start_date_format; ?></h4>
|
||||
</div>
|
||||
|
||||
<div class="mep_list_event_details mep_list_details_col_one">
|
||||
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
|
||||
<span class="mep_spring_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
|
||||
<span class='mep_spring_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
|
||||
<span class="mep_spring_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
|
||||
|
||||
</a>
|
||||
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="mep_list_event_details mep_list_details_col_two">
|
||||
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
|
||||
<?php if ($available_seat == 0) {
|
||||
do_action('mep_show_waitlist_label');
|
||||
} ?>
|
||||
<span class="mep_price">
|
||||
<?php if ($show_price == 'yes') {
|
||||
echo $show_price_label . " " . mep_event_list_price($event_id);
|
||||
} ?>
|
||||
</span>
|
||||
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
|
||||
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
|
||||
</div>
|
||||
<?php } elseif($recurring != 'no'){
|
||||
?>
|
||||
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ($event_type == 'online') { ?>
|
||||
<div class='mep-eventtype-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_virtual_label', 'label_setting_sec') ? mep_get_option('mep_event_virtual_label', 'label_setting_sec') : _e('Virtual Event', 'mage-eventpress'); ?></span>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
</div>
|
||||
<div class="mep_list_spring_thumb_wrapper">
|
||||
<a href="<?php echo get_the_permalink($event_id); ?>">
|
||||
<div class="mep_list_spring_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php do_action('mep_event_spring_list_loop_end',$event_id); ?>
|
||||
</div>
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
$event_type = get_post_meta(get_the_id(), 'mep_event_type', true) ? get_post_meta(get_the_id(), 'mep_event_type', true) : 'offline';
|
||||
?>
|
||||
<div class='mep-event-list-loop mep_event_list_item mep_event_winter_list mix <?php echo $org_class.' '.$cat_class; ?>'>
|
||||
<?php do_action('mep_event_winter_list_loop_header',$event_id); ?>
|
||||
<div class="mep_list_date_wrapper">
|
||||
<i class="fas fa-caret-right"></i>
|
||||
<h4 class='mep_winter_list_date'> <span class="mep_winter_list_dd"><?php echo $start_dd; ?></span><span class="mep_winter_list_mm_yy"><?php echo $start_mm_yy; ?></span></h4>
|
||||
</div>
|
||||
<div class="mep_list_winter_thumb_wrapper">
|
||||
<a href="<?php echo get_the_permalink($event_id); ?>">
|
||||
<div class="mep_list_winter_thumb" style="background-image:url(<?php mep_get_list_thumbnail_src($event_id); ?>)">
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mep_list_event_details">
|
||||
<h4 class="mep_list_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
|
||||
<div class="mep_list_details_col_wrapper">
|
||||
<div class="mep_list_details_col_one">
|
||||
<span class="mep_price">
|
||||
<?php if ($show_price == 'yes') {
|
||||
echo $show_price_label . " " . mep_event_list_price($event_id);
|
||||
} ?>
|
||||
</span>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
|
||||
<span class="mep_winter_event_time"><i class="far fa-clock"></i> <?php echo $start_time_format; ?> - <?php echo $end_time_format; ?></span>
|
||||
<span class='mep_winter_event_location'><i class="fas fa-map-marker-alt"></i> <?php mep_get_event_city($event_id); ?></span>
|
||||
<span class="mep_winter_event_date"><i class="far fa-calendar-alt"></i> <?php echo $start_date_format; ?> - <?php echo $end_date_format; ?></span>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="mep_list_details_col_two">
|
||||
<?php if ($available_seat == 0) {
|
||||
do_action('mep_show_waitlist_label');
|
||||
} ?>
|
||||
|
||||
<?php if (is_array($event_multidate) && sizeof($event_multidate) > 0 && $recurring == 'no') { ?>
|
||||
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
|
||||
</div>
|
||||
<?php } elseif($recurring != 'no'){
|
||||
?>
|
||||
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ($event_type == 'online') { ?>
|
||||
<div class='mep-eventtype-ribbon mep-tem3-title-sec'>
|
||||
<span><?php echo mep_get_option('mep_event_virtual_label', 'label_setting_sec') ? mep_get_option('mep_event_virtual_label', 'label_setting_sec') : _e('Virtual Event', 'mage-eventpress'); ?></span>
|
||||
</div>
|
||||
<?php }
|
||||
?>
|
||||
<?php do_action('mep_event_list_loop_footer',$event_id); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('mep_event_winter_list_loop_end',$event_id); ?>
|
||||
</div>
|
|
@ -12,11 +12,10 @@ the_post();
|
|||
<div class="mep_speaker_details">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='mep_event_list'>
|
||||
<div class="mep_cat-details">
|
||||
<h3><?php _e('All Event Of ','mage-eventpress'); the_title(); ?></h3>
|
||||
<h3><?php _e('All Events Of ', 'mage-eventpress');
|
||||
the_title(); ?></h3>
|
||||
</div>
|
||||
<div class='mage_grid_box'>
|
||||
<?php
|
||||
|
@ -24,7 +23,6 @@ the_post();
|
|||
$args = array(
|
||||
'post_type' => array('mep_events'),
|
||||
'paged' => $paged,
|
||||
// 'posts_per_page' => -1,
|
||||
'orderby' => 'meta_value',
|
||||
'meta_key' => 'event_start_datetime',
|
||||
'meta_query' => array(
|
||||
|
@ -37,7 +35,6 @@ the_post();
|
|||
);
|
||||
|
||||
$loop = new WP_Query($args);
|
||||
// $loop = mep_event_query(20, 'ASC', $term_id, '', '', '', 'upcoming');
|
||||
while ($loop->have_posts()) {
|
||||
$loop->the_post();
|
||||
do_action('mep_event_list_shortcode', get_the_id(), 'three_column', 'grid');
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<li>
|
||||
<span class="mep-more-date"><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_datetime, 'date-text'); ?></span>
|
||||
<span class='mep-more-time'><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime, 'time'); ?> <?php if ($start_date != $end_date) { echo ' - ' . get_mep_datetime($end_datetime, 'date-text'); } echo ' - ' . get_mep_datetime($end_datetime, 'time'); ?></span>
|
||||
<span class='mep-more-time'><i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime, 'time'); ?> <?php if($end_date_display_status == 'yes'){ if ($start_date != $end_date) { echo ' - ' . get_mep_datetime($end_datetime, 'date-text'); } echo ' - ' . get_mep_datetime($end_datetime, 'time'); } ?></span>
|
||||
</li>
|
|
@ -1,6 +1,6 @@
|
|||
<h3 class='ex-sec-title'><?php echo mep_get_label($post_id, 'mep_event_extra_service_text', 'Extra Service:'); ?></h3>
|
||||
<h3 class='ex-sec-title mep_extra_service_title'><?php echo $extra_service_label; ?></h3>
|
||||
<table id='mep_event_extra_service_table'>
|
||||
<tr>
|
||||
<tr class='mep_extra_service_table_head'>
|
||||
<td align="left"><?php echo mep_get_option('mep_name_text', 'label_setting_sec', __('Name:', 'mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_quantity_text', 'label_setting_sec', __('Quantity:', 'mage-eventpress')); ?></td>
|
||||
<td class="mage_text_center"><?php echo mep_get_option('mep_price_text', 'label_setting_sec', __('Price:', 'mage-eventpress')); ?></td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="mep-event-meta">
|
||||
<?php _e(mep_get_label($post_id, 'mep_share_text', "Share This $event_label:"), 'mage-eventpress'); ?>
|
||||
<span class='mep-share-btn-title'> <?php _e(mep_get_label($post_id, 'mep_share_text', "Share This $event_label:"), 'mage-eventpress'); ?></span>
|
||||
<ul class='mep-social-share'>
|
||||
<?php do_action('mep_before_social_share_list',get_the_id()); ?>
|
||||
<li> <a data-toggle="tooltip" title="" class="facebook" onclick="window.open('https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>','Facebook','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" data-original-title="Share on Facebook"><i class="fab fa-facebook-f"></i></a></li>
|
||||
|
|
Loading…
Reference in New Issue