Add a class to post title if a link ends with a certain extension

There is no need to add anything via WordPress, you can simple add the following rule to your CSS file:

a[href$='.pdf'] {}

This will target all links pointing to a URI ending in .pdf. This works in all modern browsers and from IE7 upwards.

File not found.