add_category( 'notificationx', [ 'title' => esc_html__( 'NotificationX', 'notificationx' ), 'icon' => 'fa fa-bell', ] ); } /** * Register NX widgets with Elementor. * * @param \Elementor\Widgets_Manager $widgets_manager */ public function register_widgets( $widgets_manager ) { $widgets_manager->register( new CountdownWidget() ); $widgets_manager->register( new FormWidget() ); } /** * Register JS assets. * Called on `elementor/frontend/after_register_scripts` — runs in * both editor preview and public frontend. */ public function register_scripts() { wp_register_script( 'nx-countdown', NOTIFICATIONX_PUBLIC_URL . 'js/nx-countdown.js', [ 'jquery' ], NOTIFICATIONX_VERSION, true // in footer ); wp_register_script( 'nx-elementor-form', NOTIFICATIONX_PUBLIC_URL . 'js/nx-elementor-form.js', [], NOTIFICATIONX_VERSION, true ); } /** * Register CSS assets. * Called on `elementor/frontend/after_register_styles`. */ public function register_styles() { wp_register_style( 'nx-countdown', NOTIFICATIONX_PUBLIC_URL . 'css/nx-countdown.css', [], NOTIFICATIONX_VERSION ); wp_register_style( 'nx-elementor-form', NOTIFICATIONX_PUBLIC_URL . 'css/nx-elementor-form.css', [], NOTIFICATIONX_VERSION ); } }