start_controls_section( 'style_section', [ 'label' => __( 'Availability', 'propertyhive' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'typography', 'label' => __( 'Typography', 'propertyhive' ), 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1, 'selector' => '{{WRAPPER}} .elementor-widget-availability', ] ); $this->add_control( 'color', [ 'label' => __( 'Colour', 'propertyhive' ), 'type' => \Elementor\Controls_Manager::COLOR, 'scheme' => [ 'type' => \Elementor\Scheme_Color::get_type(), 'value' => \Elementor\Scheme_Color::COLOR_1, ], 'selectors' => [ '{{WRAPPER}} .elementor-widget-availability' => 'color: {{VALUE}}', ], ] ); $this->end_controls_section(); } protected function render() { global $property; $settings = $this->get_settings_for_display(); if ( !isset($property->id) ) { return; } if ( $property->availability != '' ) { echo '
' . $property->availability . '
'; } } }