/**
  * The singleton method.
  *
  * @return Muut_Initializer The instance.
  * @author Paul Hughes
  * @since  3.0
  */
 public static function instance()
 {
     if (!is_a(self::$instance, __CLASS__)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Пример #2
0
 /**
  * The class constructor.
  *
  * @return Muut_Webhooks
  * @author Paul Hughes
  * @since  3.0.2
  */
 protected function __construct()
 {
     $this->secret = muut()->getOption('webhooks_secret');
     if ($this->isWebhooksActivated()) {
         Muut_Initializer::instance()->initCustomPostTypes();
     }
     $this->addActions();
     $this->addFilters();
 }
Пример #3
0
 /**
  * Load the necessary files for the plugin.
  *
  * @return void
  * @author Paul Hughes
  * @since  3.0
  */
 protected function loadLibraries()
 {
     // Load the template tags.
     require_once $this->pluginPath . 'public/template_tags.php';
     // Load the initializer class.
     require_once $this->pluginPath . 'lib/initializer.class.php';
     Muut_Initializer::instance();
 }