PluginProbe
Property Hive / 1.4.60
Property Hive v1.4.60
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-features.php

property-features.php in Property Hive 1.4.60, at includes/elementor-widgets/property-features.php

145 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Elementor Property Features Widget.
4 *
5 * @since 1.0.0
6 */
7 class Elementor_Property_Features_Widget extends \Elementor\Widget_Base {
8
9 public function get_name() {
10 return 'property-features';
11 }
12
13 public function get_title() {
14 return __( 'Features', 'propertyhive' );
15 }
16
17 public function get_icon() {
18 return 'fa fa-list';
19 }
20
21 public function get_categories() {
22 return [ 'property-hive' ];
23 }
24
25 public function get_keywords() {
26 return [ 'property hive', 'propertyhive', 'property', 'features', 'key', 'bullet' ];
27 }
28
29 protected function _register_controls() {
30
31 $this->start_controls_section(
32 'style_section',
33 [
34 'label' => __( 'Features', '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}} .features 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}} .features 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' => 'features_typography',
86 'label' => __( 'List Typography', 'propertyhive' ),
87 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
88 'selector' => '{{WRAPPER}} .features li',
89 ]
90 );
91
92 $this->add_control(
93 'list_color',
94 [
95 'label' => __( 'List 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}} .features li' => 'color: {{VALUE}}',
103 ],
104 ]
105 );
106
107 /*$this->add_control(
108 'icon',
109 [
110 'label' => __( 'List Icon', 'propertyhive' ),
111 'type' => \Elementor\Controls_Manager::ICONS,
112 'default' => [
113 'value' => 'fas fa-check',
114 'library' => 'solid',
115 ],
116 ]
117 );*/
118
119 $this->end_controls_section();
120
121 }
122
123 protected function render() {
124
125 global $property;
126
127 $settings = $this->get_settings_for_display();
128
129 if ( !isset($property->id) ) {
130 return;
131 }
132
133 if ( isset($settings['show_title']) && $settings['show_title'] != 'yes' )
134 {
135 ?>
136 <style type="text/css">
137 .features h4 { display:none; }
138 </style>
139 <?php
140 }
141
142 propertyhive_template_single_features();
143 }
144
145 }