rtsb_name = esc_html__( 'Fun Facts', 'shopbuilder' ); $this->rtsb_base = 'rtsb-counter'; parent::__construct( $data, $args ); $this->rtsb_category = 'rtsb-shopbuilder-general'; } /** * Whether the element returns dynamic content. * * @return bool */ protected function is_dynamic_content(): bool { return false; } /** * Widget Field * * @return array */ public function widget_fields() { return array_merge( Controls::content( $this ), Controls::style( $this ) ); } /** * Set Widget Keyword. * * @return array */ public function get_keywords() { return [ 'Counter','Count' ] + parent::get_keywords(); } /** * Style dependencies. * * @return array */ public function get_style_depends(): array { return [ 'rtsb-odometer', 'rtsb-general-addons', 'elementor-icons-shared-0', 'elementor-icons-fa-solid', ]; } /** * Scripts dependencies. * * @return array */ public function get_script_depends(): array { return [ 'rtsb-odometer', 'rtsb-waypoints', ]; } /** * Addon Render. * * @return void */ protected function render() { $settings = $this->get_settings_for_display(); $template = 'counter'; $template = apply_filters( 'rtsb/general_widget/counter/template', $template, $settings ); $data = [ 'template' => 'elementor/general/counter/' . $template, 'id' => $this->get_id(), 'unique_name' => $this->get_unique_name(), 'layout' => $settings['layout_style'], 'settings' => $settings, 'is_carousel' => false, 'container_class' => '', 'content_class' => '', ]; // Render initialization. $this->theme_support(); // Call the template rendering method. Fns::print_html( ( new Render() )->display_content( $data, $settings ), true ); $this->edit_mode_flip_box_script(); $this->theme_support( 'render_reset' ); } /** * Edit mode script. * * @return void */ private function edit_mode_flip_box_script() { if ( ! $this->is_edit_mode() ) { return; } ?>