Skip to content

Commit

Permalink
fix for Elementor 3.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga committed Mar 31, 2022
1 parent 935818f commit 6a9160a
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 58 deletions.
29 changes: 9 additions & 20 deletions modern-events-calendar-lite-details.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Modern Events Calendar Lite - Detail pages
* Plugin URI: https://github.com/m1ga/mec_lite_elementor
* Description: Link to normal pages for Modern Events Calendar Lite event details and edit them with Elementor
* Version: 1.2
* Version: 1.3
* Author: Michael Gangolf
* Author URI: https://www.migaweb.de/
**/
Expand Down Expand Up @@ -84,25 +84,14 @@ function mec_set_detailpage()
require_once(__DIR__ . '/widgets/EventOrganizer.php');


if (version_compare(ELEMENTOR_VERSION, "3.5.0", '>')) {
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventTitle());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventDateStart());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventDateEnd());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventContent());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventPlace());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventPlaceImage());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventOrganizerImage());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventOrganizer());
} else {
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventTitle());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventDateStart());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventDateEnd());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventContent());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventPlace());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventPlaceImage());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventOrganizerImage());
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Elementor_Widget_MCE_EventOrganizer());
}
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventTitle());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventDateStart());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventDateEnd());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventContent());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventPlace());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventPlaceImage());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventOrganizerImage());
\Elementor\Plugin::instance()->widgets_manager->register(new \Elementor_Widget_MCE_EventOrganizer());
});


Expand Down
7 changes: 2 additions & 5 deletions widgets/EventContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ protected function _register_controls()
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__content' => 'color: {{VALUE}}',
Expand All @@ -68,7 +68,4 @@ protected function render()
}
}

protected function _content_template()
{
}
}
8 changes: 4 additions & 4 deletions widgets/EventDateControls.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__datetime' => 'color: {{VALUE}}',
Expand All @@ -119,8 +119,8 @@
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__time' => 'color: {{VALUE}}',
Expand Down
4 changes: 0 additions & 4 deletions widgets/EventDateEnd.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@ protected function render()
$var_get2 = 'mec_end_day_seconds';
require("EventDateRender.php");
}

protected function _content_template()
{
}
}
3 changes: 0 additions & 3 deletions widgets/EventDateStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ protected function render()
require("EventDateRender.php");
}

protected function _content_template()
{
}
}
7 changes: 2 additions & 5 deletions widgets/EventOrganizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ protected function _register_controls()
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__organizer' => 'color: {{VALUE}}',
Expand Down Expand Up @@ -78,7 +78,4 @@ protected function render()
}
}

protected function _content_template()
{
}
}
3 changes: 0 additions & 3 deletions widgets/EventOrganizerImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,4 @@ protected function render()
}
}

protected function _content_template()
{
}
}
7 changes: 2 additions & 5 deletions widgets/EventPlace.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ protected function _register_controls()
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__location' => 'color: {{VALUE}}',
Expand Down Expand Up @@ -106,7 +106,4 @@ protected function render()
}
}

protected function _content_template()
{
}
}
3 changes: 0 additions & 3 deletions widgets/EventPlaceImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,4 @@ protected function render()
}
}

protected function _content_template()
{
}
}
8 changes: 2 additions & 6 deletions widgets/EventTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ protected function _register_controls()
'label' => __('Title Color', 'mec_lite_dp'),
'type' => \Elementor\Controls_Manager::COLOR,
'scheme' => [
'type' => \Elementor\Scheme_Color::get_type(),
'value' => \Elementor\Scheme_Color::COLOR_1,
'type' => \Elementor\Core\Schemes\Color::get_type(),
'value' => \Elementor\Core\Schemes\Color::COLOR_1,
],
'selectors' => [
'{{WRAPPER}} .event__title' => 'color: {{VALUE}}',
Expand All @@ -116,8 +116,4 @@ protected function render()
$id = $query[0]->ID;
echo '<'.$settings['title_tag'].' class="event__title" style="text-align: ' . $settings['event_title_align'] . '; color: ' . $settings['event_title_color'] . '">'.get_the_title($id).'</'.$settings['title_tag'].'>';
}

protected function _content_template()
{
}
}

0 comments on commit 6a9160a

Please sign in to comment.