add_filter ( ‘media_send_to_editor’, …) does not work on wp 3.5

'media_send_to_editor works fine in WordPress 3.5. I did not test the above code but you don’t need to preg_match for .pdf when WordPress supports post_mime_type == 'application/pdf;

This should work better: https://gist.github.com/2176359
Just change the HTML parameters to your needs. I also advise to embed it directly as an <iframe>, native .pdf iframe browser support is better than sending it through docs.google.com.

tech