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-grid.php +5 -5 1.5.3 → 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')
@@ -131,9 +132,9 @@
131 132
132 133 $locations_ids = array();
133 134 foreach($this->data['settings']['conf_custom_results'] as $location) {
134 135 if(isset($location['location_id']) && !empty($location['location_id'])) {
135 - $locations_ids [] = $location['location_id'];
136 + $locations_ids [] = (int)$location['location_id'];
136 137 }
137 138 }
138 139
139 140 /* where in */
@@ -150,16 +151,14 @@
150 151
151 152 } else {
152 153 $order_by = NULL;
153 154 if(!empty($this->data['settings']['conf_order_by']))
154 - $order_by = $this->data['settings']['conf_order_by'].' '.$this->data['settings']['conf_order'];
155 -
155 + $order_by = wdk_esc_sql_order_by($this->data['settings']['conf_order_by'].' '.$this->data['settings']['conf_order'], $this->WMVC->{$controller.'_m'}->getAllowedOrderBy());
156 156 $where = array();
157 157 if (!empty($this->data['settings']['only_root_enable']) && $this->data['settings']['only_root_enable'] == 'yes') {
158 158 $where['('.$this->WMVC->{$controller.'_m'}->_table_name.'.level = 0)'] = NULL;
159 159 }
160 160 $this->data['results'] = $this->WMVC->{$controller.'_m'}->get_pagination((!empty($this->data['settings']['conf_limit'])) ? $this->data['settings']['conf_limit'] : NULL, NULL, $where, $order_by);
161 -
162 161 }
163 162
164 163 $this->data['is_edit_mode']= false;
165 164 if(Plugin::$instance->editor->is_edit_mode())
@@ -164,9 +163,9 @@
164 163 $this->data['is_edit_mode']= false;
165 164 if(Plugin::$instance->editor->is_edit_mode())
166 165 $this->data['is_edit_mode']= true;
167 166
168 - echo $this->view('wdk-locations-grid', $this->data);
167 + $this->view('wdk-locations-grid', $this->data, true);
169 168 }
170 169
171 170
172 171 private function generate_controls_conf() {
@@ -212,8 +211,9 @@
212 211 'important_note',
213 212 [
214 213 'label' => '',
215 214 'type' => \Elementor\Controls_Manager::RAW_HTML,
215 + /* translators: 1: URL. */
216 216 'raw' => wdk_sprintf(__( 'Edit Locations <a href="%1$s" target="_blank"> open </a>', 'wpdirectorykit' ), admin_url('admin.php?page=wdk_location')),
217 217 'content_classes' => 'wdk_elementor_hint',
218 218 ]
219 219 );