| @@ -186,9 +186,9 @@ | ||
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | /** |
| 190 | - * Sets some defaults in the chart for ChartJS charts. | |
| 190 | + * Sets some defaults in the chart for ChartJS charts. Only during first creation. | |
| 191 | 191 | * |
| 192 | 192 | * @since 3.3.0 |
| 193 | 193 | * |
| 194 | 194 | * @access private |
| @@ -193,8 +193,12 @@ | ||
| 193 | 193 | * |
| 194 | 194 | * @access private |
| 195 | 195 | */ |
| 196 | 196 | private static function set_defaults_chartjs( $chart, $post_status ) { |
| 197 | + if ( $post_status !== 'auto-draft' ) { | |
| 198 | + return; | |
| 199 | + } | |
| 200 | + | |
| 197 | 201 | $type = get_post_meta( $chart->ID, Visualizer_Plugin::CF_CHART_TYPE, true ); |
| 198 | 202 | $series = get_post_meta( $chart->ID, Visualizer_Plugin::CF_SERIES, true ); |
| 199 | 203 | $settings = get_post_meta( $chart->ID, Visualizer_Plugin::CF_SETTINGS, true ); |
| 200 | 204 | |