I have no problem doing this in a comment, as an administrator:
<b>bold test</b> <i>italics test</i>
<u>underline test</u> <font
color="#ff9900"> color test</font>
But the subscribers can’t underline, add color to words nor add images.
Is it that only the admin can use more HTML tags than those suggested under the comment form?
<a href="" title=""> <abbr title="">
<acronym title=""> <b> <blockquote
cite=""> <cite> <code> <del
datetime=""> <em> <i> <q cite="">
<strike> <strong>
How to enable the subscribers to add color to text, and add images?
The tags that are allowed in comments are stored in the
$allowedtags
global variable. You can try adding elements to that list (the key is the tag name, the value is an array of allowed attributes). If you have problems with the timing you can play with theCUSTOM_TAGS
global variable.I too needed to customise the list of available HTML tags in comments. I didn’t want to define the
CUSTOM_TAGS
variable because it overrides everything that WP sets up inkses.php
, but I wasn’t sure where to hook the function. A little investigation showed thatkses.php
initialises its filters viakses_init()
which is added as a function to ‘init’ with the default priority of 10, so…Reference:
$allowedtags
is defined.Just more exmple :