<?php
/* 
Plugin Name: Copper PDF WP Plugin
Plugin URI: http://sourceforge.jp/projects/copper/
Description: 印刷用の PDF を出力します。
Version: 0.5a
Author: 株式会社 GNN
Author URI: http://copper-pdf.com/
*/

function copper_pdf_post_to_pdf($content) {  
    global $wp_query;
	$siteurl = get_option("siteurl");
	$id = $wp_query->post->ID;
	return '<div class="for-screen" style="text-align: right;"><a target="_blank" href="'.$siteurl.'/wp-content/plugins/copper-pdf/pdf.php?post='.$id.'">
		<img style="vertical-align: middle; border: 0;" src="'.$siteurl.'/wp-content/plugins/copper-pdf/pdf_icon_s.gif" width="24" height="23"/>
		印刷用PDF</a></div>'.$content;
} 
 
add_filter("the_content", "copper_pdf_post_to_pdf");
?>