<?php /** * Section to uninstall plugin * @author Praveen Rajan */ if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } $title = __('CVG Uninstall'); CvgCore::upgrade_plugin(); if (isset($_POST['uninstallplugin'])) { // wp_nonce_field('cvg_plugin_uninstall_nonce','cvg_plugin_uninstall_nonce_csrf'); if (check_admin_referer('cvg_plugin_uninstall_nonce', 'cvg_plugin_uninstall_nonce_csrf')) { CoolVideoGallery::cvg_uninstall(); require_once ABSPATH . 'wp-admin/includes/plugin.php'; deactivate_plugins(dirname(dirname(__FILE__)) . '/cool-video-gallery.php'); ?> <script type="text/javascript"> location.href= "<?php echo admin_url('plugins.php'); ?> ";</script> <?php } } ?> <style type="text/css"> #dashboard-widgets a { text-decoration: none; }