reflection = new \ReflectionClass( $this ); add_action( 'elementor/widgets/register', [ $this, 'init_widgets' ] ); } /** * Init Widgets * * @since 2.2.1 */ public function init_widgets() { $widget_manager = \Elementor\Plugin::instance()->widgets_manager; foreach ( $this->get_widgets() as $widget ) { if ( HFE_Helper::is_widget_active( $widget ) ) { $class_name = $this->reflection->getNamespaceName() . '\\' . ucfirst( $widget ); if ( $this->is_widget() ) { $widget_manager->register( new $class_name() ); } } } } /** * Get Widgets * * @since 2.2.1 * * @return array */ public function get_widgets() { return []; } }