/**
  * Delete a group
  *
  * @since 1.0.0
  */
 public function delete_group()
 {
     if (wp_verify_nonce($_GET['pepito'], 'delete_group_' . $_GET['id'])) {
         if ($this->model->delete_group()) {
             LeafletLayers_Controller_Admin_Notices::add_admin_notice(__('Group deleted successfully', LeafletLayers::PLUGIN_ID), 'updated');
         } else {
             LeafletLayers_Controller_Admin_Notices::add_admin_notice(__('Deleting error, please try again', LeafletLayers::PLUGIN_ID));
         }
         wp_safe_redirect(wp_get_referer());
         die;
     } else {
         die('Security check failed, please try again');
     }
 }
 /**
  * Define the core functionality of the plugin.
  *
  * Load the dependencies, define the locale, and set the hooks for the admin area and
  * the public-facing side of the site.
  *
  * @since    1.0.0
  */
 public function __construct()
 {
     self::$plugin_path = plugin_dir_path(dirname(__FILE__));
     self::$plugin_url = plugin_dir_url(dirname(__FILE__));
     require_once self::$plugin_path . 'includes/class-' . self::PLUGIN_PREFIX . 'loader.php';
     self::$modules['LeafletLayers_Loader'] = LeafletLayers_Loader::get_instance();
     self::$modules['LeafletLayers_Controller_Public'] = LeafletLayers_Controller_Public::get_instance();
     self::$modules['LeafletLayers_Controller_Admin_Settings'] = LeafletLayers_Controller_Admin_Settings::get_instance();
     self::$modules['LeafletLayers_Controller_Admin_Notices'] = LeafletLayers_Controller_Admin_Notices::get_instance();
     self::$modules['LeafletLayers_Controller_Admin_Menu'] = LeafletLayers_Controller_Admin_Menu::get_instance();
     LeafletLayers_Actions_Filters::init_actions_filters();
 }