Skip to content

Commit

Permalink
Support new Elementor API #1053
Browse files Browse the repository at this point in the history
  • Loading branch information
zahardev committed Sep 13, 2023
1 parent 643b9be commit 374a619
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions php/classes/integrations/elementor/class-elementor-widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ public function init() {
$this->template_importer = new Elementor_Template_Importer();
$this->settings_extender = new Settings_Extender();

add_action( 'elementor/widgets/widgets_registered', [ $this, 'init_widgets' ] );
add_action( 'elementor/widgets/register', [ $this, 'init_widgets' ] );
}

public function init_widgets() {
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor_Media_Player_Widget() );
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor_Html_Player_Widget() );
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor_Subscribe_Buttons_Widget() );
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor_Recent_Episodes_Widget() );
\Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Elementor_Episode_List_Widget() );
$manager = \Elementor\Plugin::instance()->widgets_manager;
$manager->register( new Elementor_Media_Player_Widget() );
$manager->register( new Elementor_Html_Player_Widget() );
$manager->register( new Elementor_Subscribe_Buttons_Widget() );
$manager->register( new Elementor_Recent_Episodes_Widget() );
$manager->register( new Elementor_Episode_List_Widget() );
}
}

0 comments on commit 374a619

Please sign in to comment.