start_controls_section('section_parameters', array( 'label' => __('Parameters', 'mphb-elementor') )); $this->add_accommodation_control(); $this->add_control( 'link_to_post', [ 'label' => esc_html__('Link to post', 'mphb-elementor'), 'type' => Controls_Manager::SWITCHER, 'return_value' => 'yes', 'default' => '', ] ); $this->add_group_control( Group_Control_Image_Size::get_type(), [ 'name' => 'featured_image', 'exclude' => ['custom'], 'include' => [], 'default' => '', ] ); $this->end_controls_section(); } /** * Render the widget output on the frontend. * * Written in PHP and used to generate the final HTML. */ protected function mphb_render($settings) { $linkToPost = $settings['link_to_post'] === 'yes'; $size = isset($settings['featured_image_size']) ? $settings['featured_image_size'] : null; ?>
accommodation_id, $size); ?>