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 +9 -14 3.10.141.7.6 View file →
@@ -46,15 +46,13 @@
46 46 *
47 47 * @access public
48 48 * @return string The serialized array of data.
49 49 */
50 - public function getData( $dumb = false ) {
51 - return serialize(
52 - array(
53 - 'source' => $this->_filename,
54 - 'data' => $this->_data,
55 - )
56 - );
50 + public function getData() {
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,12 +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 - if ( ! is_array( $data ) ) {
101 - $data = array();
102 - }
103 - return array_key_exists( 'data', $data ) ? $data['data'] : $data;
98 + return $this->_repopulate( $chart_id ) ? $this->_data : $data;
104 99 }
105 100
106 101 /**
107 102 * Re populates series.
@@ -113,9 +108,9 @@
113 108 * @param int $chart_id The chart id.
114 109 * @return array The re populated array of series or old one.
115 110 */
116 111 public function repopulateSeries( $series, $chart_id ) {
117 - return $series;
112 + return $this->_repopulate( $chart_id ) ? $this->_series : $series;
118 113 }
119 114
120 115 /**
121 116 * Returns source name.
@@ -150,9 +145,9 @@
150 145 $allow_url_fopen = filter_var( ini_get( 'allow_url_fopen' ), FILTER_VALIDATE_BOOLEAN );
151 146 }
152 147
153 148 $scheme = parse_url( $this->_filename, PHP_URL_SCHEME );
154 - if ( $allow_url_fopen && in_array( $scheme, stream_get_wrappers(), true ) ) {
149 + if ( $allow_url_fopen && in_array( $scheme, stream_get_wrappers() ) ) {
155 150 return parent::_get_file_handle( $filename );
156 151 }
157 152
158 153 require_once ABSPATH . 'wp-admin/includes/file.php';