PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 1.7.6
Visualizer – Tables & Charts Manager with Built-in AI Generator v1.7.6
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/Csv/Remote.php +7 -9 3.1.21.7.6 View file →
@@ -47,14 +47,12 @@
47 47 * @access public
48 48 * @return string The serialized array of data.
49 49 */
50 50 public function getData() {
51 - return serialize(
52 - array(
53 - 'source' => $this->_filename,
54 - 'data' => $this->_data,
55 - )
56 - );
51 + return serialize( array(
52 + 'source' => $this->_filename,
53 + 'data' => $this->_data,
54 + ) );
57 55 }
58 56
59 57 /**
60 58 * Re populates data and series.
@@ -73,9 +71,9 @@
73 71
74 72 // if filename is empty, extract it from chart content
75 73 if ( empty( $this->_filename ) ) {
76 74 $chart = get_post( $chart_id );
77 - $data = unserialize( html_entity_decode( $chart->post_content ) );
75 + $data = unserialize( $chart->post_content );
78 76 if ( ! isset( $data['source'] ) ) {
79 77 return false;
80 78 }
81 79
@@ -96,9 +94,9 @@
96 94 * @param int $chart_id The chart id.
97 95 * @return array The re populated array of data or old one.
98 96 */
99 97 public function repopulateData( $data, $chart_id ) {
100 - return array_key_exists( 'data', $data ) ? $data['data'] : $data;
98 + return $this->_repopulate( $chart_id ) ? $this->_data : $data;
101 99 }
102 100
103 101 /**
104 102 * Re populates series.
@@ -110,9 +108,9 @@
110 108 * @param int $chart_id The chart id.
111 109 * @return array The re populated array of series or old one.
112 110 */
113 111 public function repopulateSeries( $series, $chart_id ) {
114 - return $series;
112 + return $this->_repopulate( $chart_id ) ? $this->_series : $series;
115 113 }
116 114
117 115 /**
118 116 * Returns source name.