PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.0.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.0.10
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/Chart.php +8 -1 3.0.83.0.10 View file →
@@ -306,11 +306,18 @@
306 306 }
307 307 if ( $_SERVER['REQUEST_METHOD'] == 'POST' && isset( $_GET['nonce'] ) && wp_verify_nonce( $_GET['nonce'] ) ) {
308 308 if ( $this->_chart->post_status == 'auto-draft' ) {
309 309 $this->_chart->post_status = 'publish';
310 +
311 + // ensure that a revision is not created. If a revision is created it will have the proper data and the parent of the revision will have default data.
312 + // we do not want any difference in data so disable revisions temporarily.
313 + add_filter( 'wp_revisions_to_keep', '__return_false' );
310 314 wp_update_post( $this->_chart->to_array() );
311 315 }
312 - update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $_POST );
316 + // save meta data only when it is NOT being canceled.
317 + if ( ! ( isset( $_POST['cancel'] ) && 1 === intval( $_POST['cancel'] ) ) ) {
318 + update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $_POST );
319 + }
313 320 $render = new Visualizer_Render_Page_Send();
314 321 $render->text = sprintf( '[visualizer id="%d"]', $this->_chart->ID );
315 322 wp_iframe( array( $render, 'render' ) );
316 323