X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2FHtmlHead.php;h=a1be65c6137133d1eea7d518548c3659f2b0457f;hb=d0b659f7ffd8e1b102837b28c6e1223925557b22;hp=8e53ffaf9d6e51882e18f4bc3b6b2877cec9492a;hpb=b2c16bf312cd037e252e568974a5523407e42099;p=diogenes.git diff --git a/plugins/HtmlHead.php b/plugins/HtmlHead.php index 8e53ffa..a1be65c 100644 --- a/plugins/HtmlHead.php +++ b/plugins/HtmlHead.php @@ -30,15 +30,9 @@ class HtmlHead extends Diogenes_Plugin_Filter /** Plugin description */ var $description = "This plugin allows you to add entries to a page's <head> block."; - - - /** Constructor. - */ - function HtmlHead() - { - $this->declareParam('contents', ''); - } - + + /** Plugin parameters */ + var $params = array('contents' => ''); /** Apply filtering to the input and return an output. * @@ -47,10 +41,10 @@ class HtmlHead extends Diogenes_Plugin_Filter function filter($input) { global $page; - $contents = $this->getParamValue('content'); - if (!empty($contents)) + + if ($this->params['contents']) { - array_push($page->head, $contents); + array_push($page->head, $this->params['contents']); } return $input;