Created
October 5, 2015 16:27
-
-
Save jandrodev/42a2ba30ba7f7907cc16 to your computer and use it in GitHub Desktop.
Borrar tabla al desactivar plugin Wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pluginUninstall() { | |
global $wpdb; | |
$table_name = $wpdb->prefix."adslzone_info"; | |
// ¿Borrar otras opciones? | |
//delete_option('wp_yourplugin_version'); | |
$wpdb->query("DROP TABLE IF EXISTS $table_name"); | |
} | |
register_deactivation_hook( __FILE__, 'pluginUninstall' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment