Define function as static (line 59)

Not defining function on line 59 as static triggers php error: [Strict Notice] call_user_func() expects parameter 1 to be a valid callback, non-static method Page::ShortcodeColumns() should not be called statically

Note: PHP 5.5.12
This commit is contained in:
Jackson 2015-06-30 11:29:26 +12:00
parent dcd378c539
commit 9cb64d48e3

View File

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