Exemplo n.º 1
0
 public static function uninstall()
 {
     if (!GFSalesforce::has_access("gravityforms_salesforce_uninstall")) {
         __("You don't have adequate permission to uninstall Salesforce Add-On.", "gravityformssalesforce");
     }
     //removing options
     delete_option("gf_salesforce_oid");
     //Deactivating plugin
     $plugin = "gravityformssalesforce/salesforce.php";
     deactivate_plugins($plugin);
     update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
 }
 /**
  * Remove the plugin settings on uninstall.
  */
 public static function uninstall()
 {
     if (!GFSalesforce::has_access("gravityforms_salesforce_uninstall")) {
         exit(__("You don't have adequate permission to uninstall Salesforce Add-On.", "gravity-forms-salesforce"));
     }
     //droping all tables
     GFSalesforceData::drop_tables();
     //removing options
     delete_option("gf_salesforce_settings");
     delete_option("gf_salesforce_version");
     //Deactivating plugin
     $plugin = "gravity-forms-salesforce/salesforce.php";
     deactivate_plugins($plugin);
     update_option('recently_activated', array($plugin => time()) + (array) get_option('recently_activated'));
 }