register_contents(); $this->register_styles(); } protected function register_contents(): void { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Form', 'addonskit-for-elementor' ), ] ); $this->add_control( 'important_note', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => '
'. esc_html__( 'This widget will display the listing owner\'s contact form.', 'addonskit-for-elementor' ) . '
' ] ); $this->add_control( 'label', [ 'label' => __( 'Section Title', 'addonskit-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Contact Listings Owner Form', 'addonskit-for-elementor' ), ] ); $this->end_controls_section(); } protected function register_styles() { $this->register_container_style_controls( __( 'Container', 'addonskit-for-elementor' ), 'contact_owner', '.directorist-single-wrapper .directorist-card' ); $this->register_text_controls( __( 'Title', 'addonskit-for-elementor' ), 'author_info_section_title', '.directorist-card__header__title' ); $this->register_add_listing_form_fields( __( 'Form: Fields', 'addonskit-for-elementor' ), 'form_fields', '.directorist-form-element::placeholder' ); $this->register_button2_style( __( 'Button Style', 'addonskit-for-elementor' ), 'submit_button_style', '.directorist-btn.directorist-btn-light' ); } public function render(): void { $settings = $this->get_settings(); $single = Directorist_Single_Listing::instance( get_the_ID() ); $args = [ 'listing' => $single, 'type' => 'section', 'fields' => '', 'widget_name' => 'contact_listings_owner', 'label' => $settings['label'], ]; // $args['section_data'] = $args; DirectoristHelper::get_single_listing_other_fields( $args); } }