| @@ -114,8 +114,9 @@ | ||
| 114 | 114 | global $wpdb; |
| 115 | 115 | $wpdb->hide_errors(); |
| 116 | 116 | // @codingStandardsIgnoreStart |
| 117 | 117 | $rows = $wpdb->get_results( $this->_query, $results_as_numeric_array ? ARRAY_N : ARRAY_A ); |
| 118 | + 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 | 119 | // @codingStandardsIgnoreEnd |
| 119 | 120 | $wpdb->show_errors(); |
| 120 | 121 | |
| 121 | 122 | if ( $raw_results ) { |
| @@ -143,11 +144,8 @@ | ||
| 143 | 144 | |
| 144 | 145 | $this->_error = $wpdb->last_error; |
| 145 | 146 | } |
| 146 | 147 | } |
| 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 | - | |
| 150 | 148 | if ( $as_html ) { |
| 151 | 149 | $results = $this->html( $headers, $results ); |
| 152 | 150 | } else { |
| 153 | 151 | $results = $this->object( $headers, $results ); |