add_category( 'webcalendar', [ 'title' => __( 'WebCalendar', 'agenticdaisy-calendar' ), 'icon' => 'eicon-calendar', ] ); } /** * Register both WebCalendar widgets with Elementor. * * @param \Elementor\Widgets_Manager $widgets_manager Elementor widgets manager. */ public function register_widgets( $widgets_manager ): void { $widgets_manager->register( new CalendarWidget() ); $widgets_manager->register( new UpcomingEventsWidget() ); } /** * Enqueue frontend JS/CSS inside the Elementor editor preview iframe. */ public function enqueue_preview_assets(): void { wp_enqueue_script( 'webcal-frontend' ); wp_enqueue_style( 'webcal-frontend' ); } /** * Enqueue frontend JS/CSS on Elementor-rendered frontend pages. */ public function enqueue_frontend_assets(): void { wp_enqueue_script( 'webcal-frontend' ); wp_enqueue_style( 'webcal-frontend' ); } }