Skip to content

Commit

Permalink
Criação da instancia do plugin Ref.: #1
Browse files Browse the repository at this point in the history
  • Loading branch information
israelmelo committed Sep 5, 2024
1 parent cea1f7c commit 3bb3ffa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

class Plugin extends \MapasCulturais\Plugin
{
protected static $instance;

public function __construct($config = [])
{
$default_terms = [
Expand Down Expand Up @@ -101,6 +103,7 @@ public function __construct($config = [])
];

parent::__construct($config);
self::$instance = $this;
}

public function _init()
Expand Down Expand Up @@ -402,4 +405,8 @@ public function getAdminEmail($recipient): string {

return $email;
}

public static function getInstance(){
return self::$instance;
}
}

0 comments on commit 3bb3ffa

Please sign in to comment.