コード例 #1
0
ファイル: nggallery.php プロジェクト: valerol/korpus
 /**
  * Uninstall procedure. Pay attention this method is static on the class
  * See register_uninstall_hook( $this->plugin_name, array(__CLASS__, 'uninstall') );
  */
 static function uninstall()
 {
     // Clean up transients
     self::remove_transients();
     include_once dirname(__FILE__) . '/admin/install.php';
     nggallery_uninstall();
 }
コード例 #2
0
ファイル: nggallery.php プロジェクト: ahsaeldin/projects
 function uninstall()
 {
     include_once dirname(__FILE__) . '/admin/install.php';
     nggallery_uninstall();
 }
コード例 #3
0
ファイル: setup.php プロジェクト: valerol/korpus
function nggallery_admin_setup()
{
    global $wpdb, $ngg;
    if (isset($_POST['resetdefault'])) {
        check_admin_referer('ngg_uninstall');
        include_once dirname(__FILE__) . '/install.php';
        ngg_default_options();
        $ngg->load_options();
        nggGallery::show_message(__('Reset all settings to default parameter', 'nggallery'));
    }
    if (isset($_POST['uninstall'])) {
        check_admin_referer('ngg_uninstall');
        include_once dirname(__FILE__) . '/install.php';
        nggallery_uninstall();
        nggGallery::show_message(__('Uninstall sucessful ! Now delete the plugin and enjoy your life ! Good luck !', 'nggallery'));
    }
    ?>
	<div class="wrap">
	<h2><?php 
    _e('Reset options', 'nggallery');
    ?>
</h2>
		<form name="resetsettings" method="post">
			<?php 
    wp_nonce_field('ngg_uninstall');
    ?>
			<p><?php 
    _e('Reset all options/settings to the default installation.', 'nggallery');
    ?>
</p>
			<div align="center"><input type="submit" class="button" name="resetdefault" value="<?php 
    _e('Reset settings', 'nggallery');
    ?>
" onclick="javascript:check=confirm('<?php 
    _e('Reset all options to default settings ?\\n\\nChoose [Cancel] to Stop, [OK] to proceed.\\n', 'nggallery');
    ?>
');if(check==false) return false;" /></div>
		</form>
	</div>
	<?php 
    if (!is_multisite() || is_super_admin()) {
        ?>
	<div class="wrap">
	<h2><?php 
        _e('Uninstall plugin tables', 'nggallery');
        ?>
</h2>
		
		<form name="resetsettings" method="post">
		<div>
			<?php 
        wp_nonce_field('ngg_uninstall');
        ?>
			<p><?php 
        _e('You don\'t like NextCellent Gallery ?', 'nggallery');
        ?>
</p>
			<p><?php 
        _e('No problem, before you deactivate this plugin press the Uninstall Button, because deactivating NextCellent Gallery does not remove any data that may have been created. ', 'nggallery');
        ?>
		</div>
		<p><font color="red"><strong><?php 
        _e('WARNING:', 'nggallery');
        ?>
</strong><br />
		<?php 
        _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextCellent gallery is stored in the tables', 'nggallery');
        ?>
 <strong><?php 
        echo $wpdb->nggpictures;
        ?>
</strong>, <strong><?php 
        echo $wpdb->nggalbum;
        ?>
</strong> <?php 
        _e('and', 'nggallery');
        ?>
 <strong><?php 
        echo $wpdb->nggalbum;
        ?>
</strong>.</font></p>
		<div align="center">
			<input type="submit" name="uninstall" class="button delete" value="<?php 
        _e('Uninstall plugin', 'nggallery');
        ?>
" onclick="javascript:check=confirm('<?php 
        _e('You are about to Uninstall this plugin from WordPress.\\nThis action is not reversible.\\n\\nChoose [Cancel] to Stop, [OK] to Uninstall.\\n', 'nggallery');
        ?>
');if(check==false) return false;"/>
		</div>
		</form>
	</div>
	<?php 
    }
    ?>

	<?php 
}