Fixed example to work when copied and pasted.

Original example gives: Fatal error: Using $this when not in object context in E:\localhost\abscreensavers.com\mysite\code\Page.php on line 19
This commit is contained in:
Marijn Kampf 2015-01-30 10:07:27 +00:00
parent d9436675a1
commit eeef72e653

View File

@ -57,7 +57,7 @@ First we need to define a callback for the shortcode.
);
public function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) {
return str_replace($content, "<em>$content</em>", $this->Content);
return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments.";
}
}