Skip to content

Commit

Permalink
Some ideas for uninstall.php
Browse files Browse the repository at this point in the history
  • Loading branch information
overclokk committed Oct 16, 2016
1 parent a04142f commit feec550
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
exit;
}

/**
* To read:
* http://wordpress.stackexchange.com/questions/25910/uninstall-activate-deactivate-a-plugin-typical-features-how-to
* https://premium.wpmudev.org/blog/activate-deactivate-uninstall-hooks/
*/

if ( is_multisite() ) {

global $wpdb;
Expand All @@ -36,9 +42,11 @@
/**
* In case of transient
* delete_transient( 'italystrap_settings' );
* Delete all custom post type created by plugin
*/

delete_option( 'italystrap_settings' );
// delete_post_meta_by_key( '_italystrap_layout_settings' );

restore_current_blog();

Expand All @@ -49,9 +57,11 @@
/**
* In case of transient
* delete_transient( 'italystrap_settings' );
* Delete all custom post type created by plugin
*/

delete_option( 'italystrap_settings' );
// delete_post_meta_by_key( '_italystrap_layout_settings' );


}

0 comments on commit feec550

Please sign in to comment.