Delete sample data before inserting new data

This commit is contained in:
Brian Miyaji
2014-10-19 12:41:32 +11:00
parent 9320f7a5bd
commit 7746f8396f
2 changed files with 2 additions and 0 deletions

View File

@@ -243,6 +243,7 @@ class SP_Admin_Welcome {
<?php
endif;
if ( isset( $_POST['add_sample_data'] ) ):
SP_Admin_Sample_Data::delete_posts();
SP_Admin_Sample_Data::insert_posts();
endif;
?>

View File

@@ -185,6 +185,7 @@ class SP_Settings_General extends SP_Settings_Page {
endif;
if ( isset( $_POST['add_sample_data'] ) ):
SP_Admin_Sample_Data::delete_posts();
SP_Admin_Sample_Data::insert_posts();
endif;