function uninstall($hard = FALSE)
 {
     delete_option('ngg_init_check');
     delete_option('ngg_update_exists');
     delete_option('ngg_options');
     delete_option('ngg_db_version');
     delete_option('ngg_update_exists');
     delete_option('ngg_next_update');
     // now remove the capability
     ngg_remove_capability("NextGEN Gallery overview");
     ngg_remove_capability("NextGEN Use TinyMCE");
     ngg_remove_capability("NextGEN Upload images");
     ngg_remove_capability("NextGEN Manage gallery");
     ngg_remove_capability("NextGEN Edit album");
     ngg_remove_capability("NextGEN Change style");
     ngg_remove_capability("NextGEN Change options");
     ngg_remove_capability("NextGEN Attach Interface");
     $this->remove_transients();
 }
Beispiel #2
0
/**
 * Uninstall all settings and tables
 * Called via Setup and register_unstall hook
 * 
 * @access internal
 * @return void
 */
function nggallery_uninstall()
{
    global $wpdb;
    // first remove all tables
    $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_pictures");
    $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_gallery");
    $wpdb->query("DROP TABLE IF EXISTS {$wpdb->prefix}ngg_album");
    // then remove all options
    delete_option('ngg_options');
    delete_option('ngg_db_version');
    delete_option('ngg_update_exists');
    delete_option('ngg_next_update');
    // now remove the capability
    ngg_remove_capability("NextGEN Gallery overview");
    ngg_remove_capability("NextGEN Use TinyMCE");
    ngg_remove_capability("NextGEN Upload images");
    ngg_remove_capability("NextGEN Manage gallery");
    ngg_remove_capability("NextGEN Edit album");
    ngg_remove_capability("NextGEN Change style");
    ngg_remove_capability("NextGEN Change options");
}