コード例 #1
0
 /**
  * Registers this plugin as being active for other tribe plugins and extensions
  *
  * @return bool Indicates if Tribe Common wants the plugin to run
  */
 public function register_active_plugin()
 {
     if (!function_exists('tribe_register_plugin')) {
         return true;
     }
     return tribe_register_plugin(EVENT_TICKETS_MAIN_PLUGIN_FILE, __CLASS__, self::VERSION);
 }
コード例 #2
0
 /**
  * Checks if the extension has permission to run, if so runs init() in child class
  */
 public final function register()
 {
     $is_plugin_authorized = tribe_register_plugin($this->get_plugin_file(), $this->get('class'), $this->get_version(), $this->get('requires', array()));
     if ($is_plugin_authorized) {
         $this->init();
     }
 }