PluginProbe
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder / 51.1.83
King Addons for Elementor – 100+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce Builder, Mega Menu, Popup Builder v51.1.83
51.1.84 51.1.85 51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 51.1.46 All 39 releases
← All changes | includes/helpers/Dynamic_Posts_Grid_Ajax.php +8 -8 51.1.3551.1.83 View file →
@@ -88,9 +88,9 @@
88 88 // Handle post_types - it comes as JSON string from JavaScript or as array
89 89 $post_types_raw = $_POST['post_types'] ?? '["post"]';
90 90
91 91 // Debug: log the type and value of post_types_raw
92 - error_log('DEBUG: post_types_raw type: ' . gettype($post_types_raw) . ', value: ' . print_r($post_types_raw, true));
92 + // error_log('DEBUG: post_types_raw type: ' . gettype($post_types_raw) . ', value: ' . print_r($post_types_raw, true));
93 93
94 94 // Check if it's already an array (PRO version) or needs decoding (Free version)
95 95 if (is_array($post_types_raw)) {
96 96 $post_types = $this->sanitize_array($post_types_raw);
@@ -96,9 +96,9 @@
96 96 $post_types = $this->sanitize_array($post_types_raw);
97 97 } else {
98 98 // Ensure it's a string before decoding
99 99 if (!is_string($post_types_raw)) {
100 - error_log('DEBUG: post_types_raw is not a string, converting to: ' . json_encode($post_types_raw));
100 + // error_log('DEBUG: post_types_raw is not a string, converting to: ' . json_encode($post_types_raw));
101 101 $post_types_raw = json_encode($post_types_raw);
102 102 }
103 103 $post_types_decoded = json_decode($post_types_raw, true);
104 104 $post_types = is_array($post_types_decoded) ? $this->sanitize_array($post_types_decoded) : ['post'];
@@ -142,10 +142,10 @@
142 142 ];
143 143
144 144 wp_send_json_success($response_data);
145 145 } catch (Exception $e) {
146 - error_log('Dynamic Posts Grid Filter AJAX Error: ' . $e->getMessage());
147 - error_log('Stack trace: ' . $e->getTraceAsString());
146 + // error_log('Dynamic Posts Grid Filter AJAX Error: ' . $e->getMessage());
147 + // error_log('Stack trace: ' . $e->getTraceAsString());
148 148 wp_send_json_error(['message' => esc_html__('An error occurred while filtering posts.', 'king-addons')]);
149 149 }
150 150 }
151 151
@@ -166,9 +166,9 @@
166 166 // Handle post_types - it comes as JSON string from JavaScript or as array
167 167 $post_types_raw = $_POST['post_types'] ?? '["post"]';
168 168
169 169 // Debug: log the type and value of post_types_raw
170 - error_log('DEBUG: post_types_raw type: ' . gettype($post_types_raw) . ', value: ' . print_r($post_types_raw, true));
170 + // error_log('DEBUG: post_types_raw type: ' . gettype($post_types_raw) . ', value: ' . print_r($post_types_raw, true));
171 171
172 172 // Check if it's already an array (PRO version) or needs decoding (Free version)
173 173 if (is_array($post_types_raw)) {
174 174 $post_types = $this->sanitize_array($post_types_raw);
@@ -174,9 +174,9 @@
174 174 $post_types = $this->sanitize_array($post_types_raw);
175 175 } else {
176 176 // Ensure it's a string before decoding
177 177 if (!is_string($post_types_raw)) {
178 - error_log('DEBUG: post_types_raw is not a string, converting to: ' . json_encode($post_types_raw));
178 + // error_log('DEBUG: post_types_raw is not a string, converting to: ' . json_encode($post_types_raw));
179 179 $post_types_raw = json_encode($post_types_raw);
180 180 }
181 181 $post_types_decoded = json_decode($post_types_raw, true);
182 182 $post_types = is_array($post_types_decoded) ? $this->sanitize_array($post_types_decoded) : ['post'];
@@ -223,10 +223,10 @@
223 223 ];
224 224
225 225 wp_send_json_success($response_data);
226 226 } catch (Exception $e) {
227 - error_log('Dynamic Posts Grid AJAX Error: ' . $e->getMessage());
228 - error_log('Stack trace: ' . $e->getTraceAsString());
227 + // error_log('Dynamic Posts Grid AJAX Error: ' . $e->getMessage());
228 + // error_log('Stack trace: ' . $e->getTraceAsString());
229 229 wp_send_json_error(['message' => esc_html__('An error occurred while loading posts.', 'king-addons')]);
230 230 }
231 231 }
232 232