register_contents(); $this->register_styles(); } protected function register_contents(): void { $this->start_controls_section( 'section_content', [ 'label' => esc_html__( 'Author Info', 'addonskit-for-elementor' ), ] ); $this->add_control( 'important_note', [ 'type' => Controls_Manager::RAW_HTML, 'raw' => '
'. esc_html__( 'This widget will show the listing author information\'s.', 'addonskit-for-elementor' ) . '
', ] ); $this->add_control( 'label', [ 'label' => __( 'Section Title', 'addonskit-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => __( 'Author Info', 'addonskit-for-elementor' ), ] ); $this->end_controls_section(); } protected function register_styles() { $this->register_container_style_controls( __( 'Container', 'addonskit-for-elementor' ), 'profile_area', '.directorist-single-wrapper .directorist-card' ); $this->register_text_controls( __( 'Section label', 'addonskit-for-elementor' ), 'author_info_section_title', '.directorist-card__header__title' ); $this->register_author_profile_info(); $this->register_author_contact_style_controls(); $this->register_icon_style( __( 'Author Social', 'addonskit-for-elementor' ), 'author_social_info', '.directorist-author-social-item a' ); $this->register_button2_style( __( 'View Profile Button', 'addonskit-for-elementor' ), 'view_profile_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', 'widget_name' => 'author_info', 'label' => $settings['label'], ]; DirectoristHelper::get_single_listing_other_fields($args); } }