PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.2.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.2.0
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/Module/AMP.php +2 -28 3.10.43.2.0 View file →
@@ -63,42 +63,16 @@
63 63 return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
64 64 }
65 65
66 66 /**
67 - * Loads the alternate view of the chart.
67 + * Loads the alterview view of the chart.
68 68 */
69 69 public function get_chart( $chart, $data, $series, $settings ) {
70 - // let's check if there is a view parameter in the GET request.
71 - $view = isset( $_GET['view'] ) ? $_GET['view'] : null;
72 -
73 - if ( ! empty( $view ) ) {
74 - // attachmend id?
75 - if ( is_numeric( $view ) ) {
76 - $view = wp_get_attachment_url( $view );
77 - }
78 -
79 - $attributes = wp_check_filetype( $view );
80 - if ( $attributes && false !== strpos( $attributes['type'], 'image/' ) ) {
81 - // absolute url or relative?
82 - if ( 0 !== strpos( $view, 'http' ) ) {
83 - $view = site_url( $view );
84 - }
85 - $view = '<img src="' . $view . '">';
86 - }
87 -
88 - if ( ! empty( $view ) ) {
89 - return $view;
90 - }
91 - }
92 -
93 70 $view = apply_filters( 'visualizer_amp_view', null, $chart, $data, $series, $settings );
94 71 if ( ! is_null( $view ) ) {
95 72 return $view;
96 73 }
97 - $output = $this->_getDataAs( $chart->ID, 'image' );
98 - if ( empty( $output['csv'] ) ) {
99 - $output = $this->_getDataAs( $chart->ID, 'print' );
100 - }
74 + $output = $this->_getDataAs( $chart->ID, 'print' );
101 75 return $output['csv'];
102 76 }
103 77
104 78 }