PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.6.0
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.6.0
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/Module.php +22 -0 3.5.13.6.0 View file →
@@ -247,8 +247,11 @@
247 247 break;
248 248 case 'print':
249 249 $final = $this->_getHTML( $rows );
250 250 break;
251 + case 'image':
252 + $final = $this->_getImage( $chart );
253 + break;
251 254 }
252 255 }
253 256 return $final;
254 257 }
@@ -756,6 +759,25 @@
756 759 if ( $run_filter ) {
757 760 return apply_filters( Visualizer_Plugin::FILTER_GET_CHART_DATA, $altered, $chart->ID, $type );
758 761 }
759 762 return $altered;
763 + }
764 +
765 + /**
766 + * Get chart image.
767 + *
768 + * @param object $chart Chart data.
769 + * @return string
770 + */
771 + public function _getImage( $chart = null ) {
772 + $image = '';
773 + if ( $chart ) {
774 + $chart_image = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_IMAGE, true );
775 + if ( ! empty( $chart_image ) ) {
776 + $image = wp_get_attachment_image( $chart_image, 'full' );
777 + }
778 + }
779 + return array(
780 + 'csv' => $image,
781 + );
760 782 }
761 783 }