PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.11
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.11
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 +18 -0 3.7.103.7.11 View file →
@@ -66,8 +66,9 @@
66 66
67 67 $this->_addFilter( Visualizer_Plugin::FILTER_UNDO_REVISIONS, 'undoRevisions', 10, 2 );
68 68 $this->_addFilter( Visualizer_Plugin::FILTER_HANDLE_REVISIONS, 'handleExistingRevisions', 10, 2 );
69 69 $this->_addFilter( Visualizer_Plugin::FILTER_GET_CHART_DATA_AS, 'getDataAs', 10, 3 );
70 + $this->_addFilter( Visualizer_Plugin::FILTER_CHART_TITLE, 'filterChartTitle', 10, 2 );
70 71 register_shutdown_function( array($this, 'onShutdown') );
71 72
72 73 }
73 74
@@ -789,6 +790,23 @@
789 790 }
790 791 return array(
791 792 'csv' => $image,
792 793 );
794 + }
795 +
796 + /**
797 + * Filter chart title.
798 + *
799 + * @access public
800 + * @param string $post_title Post title.
801 + * @param int $post_id Post ID.
802 + * @return string
803 + */
804 + public function filterChartTitle( $post_title, $post_id ) {
805 + $post_type = get_post_type( $post_id );
806 + $post_title = trim( $post_title );
807 + if ( 'visualizer' === $post_type && 'Visualization' === $post_title ) {
808 + return sprintf( '%s #%d', $post_title, $post_id );
809 + }
810 + return $post_title;
793 811 }
794 812 }