public function doit($params = null) { global $PAGE; if (check_rule($this->rule) && (!$this->auto || check_auto($PAGE->code, $this->auto))) { actions_zone("before_{$this->code}"); if ($this->function != null && (is_string($this->function) && function_exists($this->function) || is_callable($this->function))) { return call_user_func($this->function, $params); } actions_zone("after_{$this->code}"); } }
public function doit() { global $PAGE; if (!$this->auto || check_auto($PAGE->code, $this->auto)) { if ($this->link && url_exists($this->link)) { echo " "; if ($this->type == 'script') { echo '<script src="' . $this->link . '"></script>'; } elseif ($this->type == 'style') { echo '<link rel="stylesheet" href="' . $this->link . '" />'; } else { echo $this->link; } echo "\n"; } if ($this->function != null && (is_string($this->function) && function_exists($this->function) || is_callable($this->function))) { call_user_func($this->function); } } }