RV Embed PDF
[resolved] RV Embed PDF does not work on v. 3.5 (3 posts)

  1. ciaoluca@gmail.com
    Posted 2 years ago #

    Hi, I upgraded my web site and this useful plugin does not work,
    can you check the compatibility?
    Thank you!


  2. premek.v
    Plugin Author

    Posted 2 years ago #

    Hi, thanks for the report.

    Hotfix follows. I will update it in WP directory soon.

    Thanks goes also here and here:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    Plugin Name: RV Embed PDF
    Description: When you upload PDF and insert a link to it with the Add Media button, it will be automatically embedded in the page using Google Docs Viewer.
    Author: Rong Vang Media
    Author URI: http://www.rongvang.cz
    Version: 1.1
    function rv_embedpdf($html, $id){
    	$attachment = get_post($id);
    	$mime_type = $attachment->post_mime_type;
    	$out = "";
    	if ($mime_type == 'application/pdf') {
    		$out .= '<iframe src="http://docs.google.com/gview?url='.$attachment->guid.'&embedded=true" style="width:100%; height:500px;" frameborder="0"></iframe>';
    	$out .= $html;
    	return $out;
    add_filter ( 'media_send_to_editor', 'rv_embedpdf', 20, 3);
  3. ciaoluca@gmail.com
    Posted 2 years ago #

    Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • RV Embed PDF
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic