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.8 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 All 149 releases
← All changes | classes/Visualizer/Source.php +5 -14 3.10.123.4.4 View file →
@@ -140,12 +140,9 @@
140 140 *
141 141 * @access public
142 142 * @return string The serialized array of data.
143 143 */
144 - public function getData( $fetch_from_editable_table = false ) {
145 - if ( $fetch_from_editable_table ) {
146 - $this->_fetchDataFromEditableTable();
147 - }
144 + public function getData() {
148 145 return serialize( $this->_data );
149 146 }
150 147
151 148 /**
@@ -155,12 +152,9 @@
155 152 *
156 153 * @access public
157 154 * @return array
158 155 */
159 - public function getRawData( $fetch_from_editable_table = false ) {
160 - if ( $fetch_from_editable_table ) {
161 - $this->_fetchDataFromEditableTable();
162 - }
156 + public function getRawData() {
163 157 return $this->_data;
164 158 }
165 159
166 160 /**
@@ -217,9 +211,8 @@
217 211 continue;
218 212 }
219 213 switch ( $series['type'] ) {
220 214 case 'number':
221 - $data[ $i ] = preg_replace( '/[\x{200B}-\x{200D}\x{FEFF}]/u', '', $data[ $i ] );
222 215 $data[ $i ] = ( is_numeric( $data[ $i ] ) ) ? floatval( $data[ $i ] ) : ( is_numeric( str_replace( ',', '', $data[ $i ] ) ) ? floatval( str_replace( ',', '', $data[ $i ] ) ) : null );
223 216 break;
224 217 case 'boolean':
225 218 $datum = trim( strval( $data[ $i ] ) );
@@ -335,9 +328,9 @@
335 328 * @param string $type 'date', 'timeofday' or 'datetime'.
336 329 *
337 330 * @return string|null
338 331 */
339 - private static function determine_date_format( $value, $type ) {
332 + private static final function determine_date_format( $value, $type ) {
340 333 if ( version_compare( phpversion(), '5.3.0', '<' ) ) {
341 334 do_action( 'themeisle_log_event', Visualizer_Plugin::NAME, sprintf( 'PHP version %s not supported', phpversion() ), 'error', __FILE__, __LINE__ );
342 335 return null;
343 336 }
@@ -449,8 +442,9 @@
449 442 *
450 443 * @access private
451 444 */
452 445 private function _fetchDataFromEditableTable() {
446 + $params = $this->_args;
453 447 $headers = wp_list_pluck( $this->_series, 'label' );
454 448 $this->fetch();
455 449
456 450 $data = $this->_data;
@@ -457,12 +451,9 @@
457 451 $this->_data = array();
458 452
459 453 foreach ( $data as $line ) {
460 454 $data_row = array();
461 - // we have to make sure we are fetching the data in the right order
462 - // in case the columns have been reordered
463 - foreach ( $headers as $header ) {
464 - $value = $line[ $header ];
455 + foreach ( $line as $header => $value ) {
465 456 // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
466 457 if ( in_array( $header, $headers ) ) {
467 458 $data_row[] = $value;
468 459 }