Specify a class for IMG inserted with visual editor
-
How do I specify a certain class for all images inserted with the visual editor / the [img]-button when I’m in the admin-part, with an older browser? Say I want all IMG-tags to have the class “milk”.
The IMG-tags I get now are like:
<a href="path/imgname"><img class="alignnone size-full wp-image-425" title="imgname" src="path/imgname" alt="" width="500" height="334" /></a>
The IMG-tag I want is:
<a href="path/imgname"><img class="alignnone size-full wp-image-425 <strong>milk</strong>" title="imgname" src="path/imgname" alt="" width="500" height="334" /></a>
To be clear: I want this done automagicly, so I don’t have to do it in the html editor each and every time. I guess I should be editing wp-include/media.php or something?
- The topic ‘Specify a class for IMG inserted with visual editor’ is closed to new replies.