Take the 2-minute tour ×  I want change some default wordpress
functionality.  From Media library when we select a file and
press "Insert into page" (other than image file) It inserts in
format <a url="file_link"> Name </a> I want to change this
default format.  option 1 : I want to add extra tags before A
tag OR Option 2 : I want to assign extra classes to A tag
depending on target file link extension.  because i want to
design that A tag with file extension icon image (eg. like a
download button.)  share|improve this question  2 Answers 2  You
can use CSS attribute selectors to accomplish this without
changing anything in the WP Admin or the HTML. A Google search
for "css file type icons" comes up with several results, but
I'll explain the basic idea for you here.  An attribute selector
lets you style any html tag with a matching attribute. There are
many ways to use attribute selectors (input[type="text"],
anyone?) but you need to grab the href value, particularly the
file extension. For example, if you wa