2015-01-09, 03:50 PM
Hello,..
I want to add syntax my own php syntax.
I have try to create plugin, the function like this:
But, it doesn't work at all.
EDIT: it works, hook should use parse_message_start
And just wait for effect, because cache posts, or just create new post.
I want to add syntax my own php syntax.
I have try to create plugin, the function like this:
function jin_syntax_run($message) {
$find = '#\[php\](.*?)\[/php\]#i';
$replace = '<pre>$1</pre>';
$message = preg_replace($find, $replace, $message);
return $message;
}
But, it doesn't work at all.
EDIT: it works, hook should use parse_message_start
And just wait for effect, because cache posts, or just create new post.