Finally, I can tell you what is wrong with your plugin:
In my case, I have a rather large blog, with different authors. On the one hand, they can all upload files and on the other hand, I have no time to check every mime type. Actually, some people managed to create a jpg-file with a pdf mime type which is not filtered out by
if ( $wp_post->post_type != ‘attachment’ || $wp_post->post_mime_type != ‘application/pdf’) {
Therefore, I had to insert an additional condition
$pos = strpos($src, ‘.pdf’);
if ($pos === false)
return;
In order to check, whether .pdf is part of the filename. Otherwise I will exit the function without adding the <object> tags, which crashed the WP galleries.
Now I think my problem (and that of pinkylips) is solved, but from a good plugin I would have expected a better support instead of not responding.