PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.4
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.4
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 3.10.4 All 148 releases
← All changes | classes/Visualizer/Source/Query.php +5 -10 3.10.03.4.4 View file →
@@ -89,10 +89,8 @@
89 89 if ( strpos( strtolower( $this->_query ), ' limit ' ) === false ) {
90 90 $this->_query .= ' LIMIT ' . apply_filters( 'visualizer_sql_query_limit', 1000, $this->_chart_id );
91 91 }
92 92
93 - $this->_query = apply_filters( 'visualizer_db_query', $this->_query, $this->_chart_id, $this->_params );
94 -
95 93 $results = array();
96 94 $headers = array();
97 95
98 96 // short circuit results for remote dbs.
@@ -114,8 +112,9 @@
114 112 global $wpdb;
115 113 $wpdb->hide_errors();
116 114 // @codingStandardsIgnoreStart
117 115 $rows = $wpdb->get_results( $this->_query, $results_as_numeric_array ? ARRAY_N : ARRAY_A );
116 + do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Firing query %s to get results %s with error %s', $this->_query, print_r( $rows, true ), print_r( $wpdb->last_error, true ) ), 'debug', __FILE__, __LINE__ );
118 117 // @codingStandardsIgnoreEnd
119 118 $wpdb->show_errors();
120 119
121 120 if ( $raw_results ) {
@@ -143,18 +142,13 @@
143 142
144 143 $this->_error = $wpdb->last_error;
145 144 }
146 145 }
147 - // Query log.
148 - do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'Firing query %s to get results %s with error %s', $this->_query, print_r( $rows, true ), print_r( $wpdb->last_error, true ) ), 'debug', __FILE__, __LINE__ );
149 146
150 147 if ( $as_html ) {
151 - $results = $this->html( $headers, $results );
152 - } else {
153 - $results = $this->object( $headers, $results );
148 + return $this->html( $headers, $results );
154 149 }
155 -
156 - return apply_filters( 'visualizer_db_query_results', $results, $headers, $as_html, $results_as_numeric_array, $raw_results, $this->_query, $this->_chart_id, $this->_params );
150 + return $this->object( $headers, $results );
157 151 }
158 152
159 153 /**
160 154 * Get the data type of the column.
@@ -216,9 +210,10 @@
216 210 foreach ( $results as $row ) {
217 211 $data[] = $this->_normalizeData( $row );
218 212 }
219 213 $this->_data = $data;
220 - return $this->_data;
214 +
215 + return true;
221 216 }
222 217
223 218 /**
224 219 * Returns the final query.