PluginProbe
Property Hive / 2.4.0
Property Hive v2.4.0
2.4.0 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 All 262 releases
← All changes | includes/elementor-widgets/property-bathrooms.php +51 -9 1.4.60 → 2.4.0 View file →
@@ -14,9 +14,9 @@
14 14 return __( 'Bathrooms', 'propertyhive' );
15 15 }
16 16
17 17 public function get_icon() {
18 - return 'fa fa-bath';
18 + return 'eicon-meta-data';
19 19 }
20 20
21 21 public function get_categories() {
22 22 return [ 'property-hive' ];
@@ -25,9 +25,9 @@
25 25 public function get_keywords() {
26 26 return [ 'property hive', 'propertyhive', 'property', 'bathroom', 'room' ];
27 27 }
28 28
29 - protected function _register_controls() {
29 + protected function register_controls() {
30 30
31 31 $this->start_controls_section(
32 32 'content_section',
33 33 [
@@ -64,8 +64,35 @@
64 64 'default' => __( 'Bathrooms', 'propertyhive' ),
65 65 ]
66 66 );
67 67
68 + $this->add_control(
69 + 'text_align',
70 + [
71 + 'label' => __( 'Alignment', 'propertyhive' ),
72 + 'type' => \Elementor\Controls_Manager::CHOOSE,
73 + 'options' => [
74 + 'left' => [
75 + 'title' => __( 'Left', 'propertyhive' ),
76 + 'icon' => 'eicon-text-align-left',
77 + ],
78 + 'center' => [
79 + 'title' => __( 'Center', 'propertyhive' ),
80 + 'icon' => 'eicon-text-align-center',
81 + ],
82 + 'right' => [
83 + 'title' => __( 'Right', 'propertyhive' ),
84 + 'icon' => 'eicon-text-align-right',
85 + ],
86 + ],
87 + 'default' => 'left',
88 + 'toggle' => true,
89 + 'selectors' => [
90 + '{{WRAPPER}} .elementor-widget-bathrooms' => 'text-align: {{VALUE}}',
91 + ],
92 + ]
93 + );
94 +
68 95 $this->end_controls_section();
69 96
70 97 $this->start_controls_section(
71 98 'style_section',
@@ -79,9 +106,11 @@
79 106 \Elementor\Group_Control_Typography::get_type(),
80 107 [
81 108 'name' => 'typography',
82 109 'label' => __( 'Typography', 'propertyhive' ),
83 - 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
110 + 'global' => [
111 + 'default' => \Elementor\Core\Kits\Documents\Tabs\Global_Typography::TYPOGRAPHY_PRIMARY,
112 + ],
84 113 'selector' => '{{WRAPPER}} .elementor-widget-bathrooms',
85 114 ]
86 115 );
87 116
@@ -89,11 +118,10 @@
89 118 'color',
90 119 [
91 120 'label' => __( 'Colour', 'propertyhive' ),
92 121 'type' => \Elementor\Controls_Manager::COLOR,
93 - 'scheme' => [
94 - 'type' => \Elementor\Scheme_Color::get_type(),
95 - 'value' => \Elementor\Scheme_Color::COLOR_1,
122 + 'global' => [
123 + 'default' => \Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_PRIMARY,
96 124 ],
97 125 'selectors' => [
98 126 '{{WRAPPER}} .elementor-widget-bathrooms' => 'color: {{VALUE}}',
99 127 ],
@@ -99,8 +127,22 @@
99 127 ],
100 128 ]
101 129 );
102 130
131 + $this->add_control(
132 + 'icon_color',
133 + [
134 + 'label' => __( 'Icon Colour', 'propertyhive' ),
135 + 'type' => \Elementor\Controls_Manager::COLOR,
136 + 'global' => [
137 + 'default' => \Elementor\Core\Kits\Documents\Tabs\Global_Colors::COLOR_PRIMARY,
138 + ],
139 + 'selectors' => [
140 + '{{WRAPPER}} .elementor-widget-bathrooms i' => 'color: {{VALUE}}',
141 + ],
142 + ]
143 + );
144 +
103 145 $this->end_controls_section();
104 146
105 147 }
106 148
@@ -123,14 +165,14 @@
123 165 echo ' ';
124 166 }
125 167 if ( isset($settings['before']) && !empty($settings['before']) )
126 168 {
127 - echo $settings['before'] . ' ';
169 + echo wp_kses_post( $settings['before'] ) . ' ';
128 170 }
129 - echo $property->bathrooms;
171 + echo esc_html($property->bathrooms);
130 172 if ( isset($settings['after']) && !empty($settings['after']) )
131 173 {
132 - echo ' ' . $settings['after'];
174 + echo ' ' . wp_kses_post( $settings['after'] );
133 175 }
134 176 echo '</div>';
135 177 }
136 178