/**
  * Provides access to a single instance of a module using the singleton pattern
  *
  * @since    1.0.0
  * @return object
  */
 public static function get_instance()
 {
     if (null === self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
function uninstall_leafletlayers_plugin()
{
    require_once plugin_dir_path(__FILE__) . 'includes/class-leafletlayers-loader.php';
    LeafletLayers_Loader::uninstall_plugin();
}
 /**
  * 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();
 }