PluginProbe
Property Hive / 1.4.61
Property Hive v1.4.61
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / includes / elementor-widgets / property-full-description.php

property-full-description.php in Property Hive 1.4.61, at includes/elementor-widgets/property-full-description.php

134 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor Property Full Description Widget.
4 *
5 * @since 1.0.0
6 */
7 class Elementor_Property_Full_Description_Widget extends \Elementor\Widget_Base {
8
9 public function get_name() {
10 return 'property-full-description';
11 }
12
13 public function get_title() {
14 return __( 'Full Description', 'propertyhive' );
15 }
16
17 public function get_icon() {
18 return 'fa fa-paragraph';
19 }
20
21 public function get_categories() {
22 return [ 'property-hive' ];
23 }
24
25 public function get_keywords() {
26 return [ 'property hive', 'propertyhive', 'property', 'description', 'full', 'full description' ];
27 }
28
29 protected function _register_controls() {
30
31 $this->start_controls_section(
32 'style_section',
33 [
34 'label' => __( 'Full Description', 'propertyhive' ),
35 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
36 ]
37 );
38
39 $this->add_control(
40 'show_title',
41 [
42 'label' => __( 'Show Title', 'propertyhive' ),
43 'type' => \Elementor\Controls_Manager::SWITCHER,
44 'label_on' => __( 'Show', 'propertyhive' ),
45 'label_off' => __( 'Hide', 'propertyhive' ),
46 'return_value' => 'yes',
47 'default' => 'yes',
48 ]
49 );
50
51 $this->add_group_control(
52 \Elementor\Group_Control_Typography::get_type(),
53 [
54 'name' => 'title_typography',
55 'label' => __( 'Title Typography', 'propertyhive' ),
56 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
57 'selector' => '{{WRAPPER}} .description h4',
58 'condition' => [
59 'show_title' => 'yes'
60 ],
61 ]
62 );
63
64 $this->add_control(
65 'title_color',
66 [
67 'label' => __( 'Title Colour', 'propertyhive' ),
68 'type' => \Elementor\Controls_Manager::COLOR,
69 'scheme' => [
70 'type' => \Elementor\Scheme_Color::get_type(),
71 'value' => \Elementor\Scheme_Color::COLOR_1,
72 ],
73 'selectors' => [
74 '{{WRAPPER}} .description h4' => 'color: {{VALUE}}',
75 ],
76 'condition' => [
77 'show_title' => 'yes'
78 ],
79 ]
80 );
81
82 $this->add_group_control(
83 \Elementor\Group_Control_Typography::get_type(),
84 [
85 'name' => 'description_typography',
86 'label' => __( 'Description Typography', 'propertyhive' ),
87 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
88 'selector' => '{{WRAPPER}} .description .description-contents',
89 ]
90 );
91
92 $this->add_control(
93 'description_color',
94 [
95 'label' => __( 'Description Colour', 'propertyhive' ),
96 'type' => \Elementor\Controls_Manager::COLOR,
97 'scheme' => [
98 'type' => \Elementor\Scheme_Color::get_type(),
99 'value' => \Elementor\Scheme_Color::COLOR_1,
100 ],
101 'selectors' => [
102 '{{WRAPPER}} .description .description-contents' => 'color: {{VALUE}}',
103 ],
104 ]
105 );
106
107 $this->end_controls_section();
108
109 }
110
111 protected function render() {
112
113 global $property;
114
115 $settings = $this->get_settings_for_display();
116
117 if ( !isset($property->id) ) {
118 return;
119 }
120
121 if ( isset($settings['show_title']) && $settings['show_title'] != 'yes' )
122 {
123 ?>
124 <style type="text/css">
125 .description h4 { display:none; }
126 </style>
127 <?php
128 }
129
130 propertyhive_template_single_description();
131
132 }
133
134 }