function init_uninstall()
 {
     if ($_POST["gdsr_full_uninstall"] == __("UNINSTALL", "gd-star-rating")) {
         delete_option('gd-star-rating');
         delete_option('widget_gdstarrating');
         delete_option('gd-star-rating-templates');
         delete_option('gd-star-rating-import');
         delete_option('gd-star-rating-gfx');
         gdDBInstallGDSR::drop_tables(STARRATING_PATH);
         GDSRHelper::deactivate_plugin();
         update_option('recently_activated', array("gd-star-rating/gd-star-rating.php" => time()) + (array) get_option('recently_activated'));
         wp_redirect('index.php');
         exit;
     }
 }
Exemple #2
0
<?php

if ($_POST["gdsr_reinstall"] == __("Reinstall", "gd-star-rating")) {
    gdDBInstallGDSR::drop_tables(STARRATING_PATH);
    gdDBInstallGDSR::create_tables(STARRATING_PATH);
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
    _e("Database tables reinstalled.", "gd-star-rating");
    ?>
</strong></p></div> <?php 
}
if ($_POST["gdsr_remultis"] == __("Reinstall", "gd-star-rating")) {
    gdDBInstallGDSR::drop_table("gdsr_multis");
    gdDBInstallGDSR::drop_table("gdsr_multis_data");
    gdDBInstallGDSR::drop_table("gdsr_multis_trend");
    gdDBInstallGDSR::drop_table("gdsr_multis_values");
    gdDBInstallGDSR::create_tables(STARRATING_PATH);
    GDSRDB::insert_default_templates(STARRATING_PATH);
    GDSRDB::insert_extras_templates(STARRATING_PATH);
    GDSRDB::insert_extras_templates(STARRATING_XTRA_PATH, false);
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
    _e("Multi rating tables reinstalled.", "gd-star-rating");
    ?>
</strong></p></div> <?php 
}
if ($_POST["gdsr_remove_settings"] == __("Remove Settings", "gd-star-rating")) {
    delete_option('gd-star-rating');
    delete_option('widget_gdstarrating');
    ?>
 <div id="message" class="updated fade" style="background-color: rgb(255, 251, 204);"><p><strong><?php 
Exemple #3
0
 /**
  * Full uninstall of plugin.
  */
 function init_uninstall()
 {
     if (isset($_POST["gdsr_full_uninstall"]) && $_POST["gdsr_full_uninstall"] == __("UNINSTALL", "gd-star-rating")) {
         require_once STARRATING_PATH . "gdragon/gd_db_install.php";
         delete_option('gd-star-rating');
         delete_option('widget_gdstarrating');
         delete_option('gd-star-rating-import');
         delete_option('gd-star-rating-gfx');
         delete_option('gd-star-rating-inc');
         gdDBInstallGDSR::drop_tables(STARRATING_PATH);
         gdWPGDSR::deactivate_plugin("gd-star-rating/gd-star-rating.php");
         update_option('recently_activated', array("gd-star-rating/gd-star-rating.php" => time()) + (array) get_option('recently_activated'));
         wp_redirect('index.php');
         exit;
     }
 }