register_contents();
$this->register_styles();
}
protected function register_contents(): void {
$this->start_controls_section(
'section_content',
[
'label' => esc_html__( 'Listing - Related Listings', 'addonskit-for-elementor' ),
]
);
$this->add_control(
'important_note',
[
'type' => Controls_Manager::RAW_HTML,
'raw' => '
'. esc_html__( 'This widget will display similar listings on a slider.', 'addonskit-for-elementor' ) . '
',
]
);
$this->end_controls_section();
}
protected function register_styles(): void {
$this->register_container_style_controls( __( 'Listing: Card', 'addonskit-for-elementor' ), 'related_listing', '.directorist-listing-single--bg' );
$this->register_listing_card_info();
$this->register_listing_footer();
}
public function render(): void {
$single = Directorist_Single_Listing::instance( get_the_ID() );
$args = [
'listing' => $single,
'type' => 'section',
'widget_name' => 'related_listings',
'label' => '',
];
if ( Helper::is_edit() ) {
$this->get_script_depends();
}
DirectoristHelper::get_single_listing_other_fields( $args );
}
}