A tumblelog CMS built on AJAX, PHP and MySQL.

plugins.class.php 687B

123456789101112131415161718192021222324252627
  1. <?php
  2. if(!defined('entry') || !entry) die('Not a valid page');
  3. /* ===========================
  4. gelato CMS - A PHP based tumblelog CMS
  5. development version
  6. http://www.gelatocms.com/
  7. gelato CMS is a free software licensed under the GPL 2.0
  8. Copyright (C) 2007 by Pedro Santana <pecesama at gmail dot com>
  9. =========================== */
  10. ?>
  11. <?php
  12. /* Simulating a class static property */
  13. $GLOBALS['plugins::$instances'] = array();
  14. class plugins {
  15. function addAction($name, $function) {
  16. $plugEngine =& plugin::instance(); //DO NOT remove the & after the =
  17. $plugEngine->actions[$name][] = array($this, $function);
  18. }
  19. }
  20. ?>