register_contents(); $this->register_styles(); } protected function register_contents(): void { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Listing - Edit Actions', 'addonskit-for-elementor' ), ] ); $this->add_control( 'important_note', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => '
'. esc_html__( 'This widget will display Back, Edit, Continue actions for the listing author on a single listing.', 'addonskit-for-elementor' ) . '
', ] ); $this->add_control( "actions", [ 'label' => esc_html__( 'Select Action', 'addonskit-for-elementor' ), 'type' => Controls_Manager::SELECT2, 'options' => [ 'back' => 'Back', 'edit' => 'Edit', 'continue' => 'Continue', ], 'multiple' => true, 'default' => ['back', 'edit', 'continue'], ] ); $this->add_responsive_control( 'info_type_align', [ 'label' => esc_html__( 'Alignment', 'addonskit-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => esc_html__( 'Left', 'addonskit-for-elementor' ), 'icon' => 'eicon-text-align-left', ], 'center' => [ 'title' => esc_html__( 'Center', 'addonskit-for-elementor' ), 'icon' => 'eicon-text-align-center', ], 'right' => [ 'title' => esc_html__( 'Right', 'addonskit-for-elementor' ), 'icon' => 'eicon-text-align-right', ], ], 'default' => '', 'selectors' => [ '{{WRAPPER}} .directorist-justify-content-between' => 'justify-content: {{VALUE}};', ], ] ); $this->end_controls_section(); } protected function register_styles(): void { $this->register_button2_style( __( 'Style', 'addonskit-for-elementor' ), 'action_style', '.directorist-single-listing-top .directorist-btn' ); } public function render(): void { $settings = $this->get_settings_for_display(); DirectoristHelper::get_template( plugin_dir_path( __FILE__ ) . 'output', [ 'actions' => $settings['actions'], 'id' => get_the_ID(), ] ); } }