/** * * @return BBP_Notify_Admin_Email_Notifier */ public static function get_instance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
/** * Setup the path and url of the plugin * */ public function setup() { $this->path = plugin_dir_path(__FILE__); $this->url = plugin_dir_url(__FILE__); $this->load(); $notifier = BBP_Notify_Admin_Email_Notifier::get_instance(); add_action('bbp_new_topic', array($notifier, 'notify_topic'), 50, 5); add_action('bbp_new_reply', array($notifier, 'notify_reply'), 50, 7); }