I’m using the PHP Markdown plugin, and I’d like to modify it so that it adds some text to the bottom of the comment form indicating that Markdown is supported in comments.
I’ve been modifying my theme to do this, but the theme is updated quite frequently and I don’t want to create a custom version of it for a single line of text to be preserved.
In my comments.php
file (Theme is ZBench) I have the following:
$comment_notes='<p class="comment-note">' . __('NOTE - You can use these ','zbench') . sprintf(('<abbr title="HyperText Markup Language">HTML</abbr> '.__('tags and attributes:','zbench').'<br />%s' ), ' <code>' . allowed_tags() . '</code>' ) . '</p>';
I simply want to add to that indicating Markdown is active, and presumably the ideal way to do that is to alter the output of allowed_tags()
. Is this possible to do with add_filter()
, or am I looking at the wrong function?
I want to modify the plugin itself, so that the extra line is added only if the plugin is active.
Here you go… Use this code:
This will work!