projects
/
diogenes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework plugin handling to access parameters via declareParam, getParamValues, setPara...
[diogenes.git]
/
plugins
/
HtmlHead.php
diff --git
a/plugins/HtmlHead.php
b/plugins/HtmlHead.php
index
a1be65c
..
8e53ffa
100644
(file)
--- a/
plugins/HtmlHead.php
+++ b/
plugins/HtmlHead.php
@@
-30,9
+30,15
@@
class HtmlHead extends Diogenes_Plugin_Filter
/** Plugin description */
var $description = "This plugin allows you to add entries to a page's <head> block.";
/** 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.
*
/** Apply filtering to the input and return an output.
*
@@
-41,10
+47,10
@@
class HtmlHead extends Diogenes_Plugin_Filter
function filter($input)
{
global $page;
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;
}
return $input;