PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
← All changes | elementor-elements/classes/wdk-locations-carousel.php +5 -3 1.5.4 → 1.5.9 View file →
@@ -29,8 +29,9 @@
29 29 \Elementor\Controls_Manager::add_tab(
30 30 'tab_conf',
31 31 esc_html__('Settings', 'wpdirectorykit')
32 32 );
33 +
33 34
34 35 \Elementor\Controls_Manager::add_tab(
35 36 'tab_layout',
36 37 esc_html__('Layout', 'wpdirectorykit')
@@ -130,9 +131,9 @@
130 131
131 132 $locations_ids = array();
132 133 foreach($this->data['settings']['conf_custom_results'] as $location) {
133 134 if(isset($location['location_id']) && !empty($location['location_id'])) {
134 - $locations_ids [] = $location['location_id'];
135 + $locations_ids [] = (int)$location['location_id'];
135 136 }
136 137 }
137 138
138 139 /* where in */
@@ -149,9 +150,9 @@
149 150
150 151 } else {
151 152 $order_by = NULL;
152 153 if(!empty($this->data['settings']['conf_order_by']))
153 - $order_by = $this->data['settings']['conf_order_by'].' '.$this->data['settings']['conf_order'];
154 + $order_by = wdk_esc_sql_order_by($this->data['settings']['conf_order_by'].' '.$this->data['settings']['conf_order'], $this->WMVC->{$controller.'_m'}->getAllowedOrderBy());
154 155
155 156 $where = array();
156 157 if (!empty($this->data['settings']['only_root_enable']) && $this->data['settings']['only_root_enable'] == 'yes') {
157 158 $where['('.$this->WMVC->{$controller.'_m'}->_table_name.'.level = 0)'] = NULL;
@@ -162,9 +163,9 @@
162 163 $this->data['is_edit_mode']= false;
163 164 if(Plugin::$instance->editor->is_edit_mode())
164 165 $this->data['is_edit_mode']= true;
165 166
166 - echo $this->view('wdk-locations-carousel', $this->data);
167 + $this->view('wdk-locations-carousel', $this->data, true);
167 168 }
168 169
169 170 private function generate_controls_conf() {
170 171 $this->start_controls_section(
@@ -209,8 +210,9 @@
209 210 'important_note',
210 211 [
211 212 'label' => '',
212 213 'type' => \Elementor\Controls_Manager::RAW_HTML,
214 + /* translators: 1: URL. */
213 215 'raw' => wdk_sprintf(__( 'Manage Locations <a href="%1$s" target="_blank"> open </a>', 'wpdirectorykit' ), admin_url('admin.php?page=wdk_location')),
214 216 'content_classes' => 'wdk_elementor_hint',
215 217 ]
216 218 );