/** Plugin description */
var $description = "This plugin allows you to add entries to a page's <head> block.";
-
- /** Plugin parameters */
- var $params = array('contents' => '');
+
+
+ /** Constructor.
+ */
+ function HtmlHead()
+ {
+ $this->declareParam('contents', '');
+ }
+
/** Apply filtering to the input and return an output.
*
function filter($input)
{
global $page;
-
- if ($this->params['contents'])
+ $contents = $this->getParamValue('content');
+ if (!empty($contents))
{
- array_push($page->head, $this->params['contents']);
+ array_push($page->head, $contents);
}
return $input;