Version Description
- Added rel="no follow" to the print links to avoid search engines indexing the print pages.
- Changed print button from link to . Some tracking plugins added target_new/blank to link, therefore breaking print friendly.
Download this release
Release Info
Developer | printfriendly |
Plugin | Print, PDF, Email by PrintFriendly |
Version | 2.1.6 |
Comparing to | |
See all releases |
Code changes from version 2.1.5 to 2.1.6
- pf.php +20 -18
- readme.txt +9 -4
pf.php
CHANGED
@@ -2,24 +2,26 @@
|
|
2 |
/*
|
3 |
Plugin Name: Print Friendly and PDF
|
4 |
Plugin URI: http://www.printfriendly.com
|
5 |
-
Description: PrintFriendly & PDF optimizes your pages for print. Help your readers save paper and ink, plus enjoy your content in printed form. Website
|
|
|
6 |
Developed by <a href="http://printfriendly.com" target="_blank">PrintFriendly</a>
|
7 |
-
Version: 2.1.
|
8 |
Author: Print Friendly
|
9 |
Author URI: http://www.PrintFriendly.com
|
10 |
|
11 |
Changelog :
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
23 |
|
24 |
*/
|
25 |
|
@@ -165,7 +167,7 @@ function pf_button($name=false){
|
|
165 |
break;
|
166 |
|
167 |
case "pf-icon-both.gif":
|
168 |
-
return '<img class="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span class="printandpdf" style="font-size:'.get_option('pf_text_size').'; margin-left:3px; color:'.get_option('pf_text_color').';"> Print <img style="border:none;" src="http://cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span>';
|
169 |
break;
|
170 |
|
171 |
case "pf-icon-small.gif":
|
@@ -208,16 +210,16 @@ function pf_show_link($content=false)
|
|
208 |
if (strpos($plink_url,"?")!=false)
|
209 |
$separator = "&pfstyle=wp";
|
210 |
|
211 |
-
$style='
|
212 |
$pos = get_option('pf_content_position');
|
213 |
if($pos==null){$pos='left';}
|
214 |
$style.=$pos.';';
|
215 |
$style.=' margin: '.pf_margin_down('top').'px '.pf_margin_down('right').'px '.pf_margin_down('bottom').'px '.pf_margin_down('left').'px;';
|
216 |
-
$style.='" ';
|
217 |
|
218 |
-
$button = '<div'.$style.'><script src="http://cdn.printfriendly.com/printfriendly.js" type="text/javascript"></script><a href="javascript:window.print()" style="text-decoration: none; outline: none; color: '.get_option('pf_text_color').';">'.pf_button().'</a></div>';
|
219 |
|
220 |
-
$
|
|
|
|
|
221 |
|
222 |
//This goes on article pages
|
223 |
if((is_single() || is_page()) && $pf_display=='single' || (is_single() && $pf_display=='posts'))
|
2 |
/*
|
3 |
Plugin Name: Print Friendly and PDF
|
4 |
Plugin URI: http://www.printfriendly.com
|
5 |
+
Description: PrintFriendly & PDF optimizes your pages for print. Help your readers save paper and ink, plus enjoy your content in printed form. Website
|
6 |
+
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared. [<a href="options-general.php?page=printfriendly/pf.php">Settings</a>]
|
7 |
Developed by <a href="http://printfriendly.com" target="_blank">PrintFriendly</a>
|
8 |
+
Version: 2.1.6
|
9 |
Author: Print Friendly
|
10 |
Author URI: http://www.PrintFriendly.com
|
11 |
|
12 |
Changelog :
|
13 |
+
2.1.6 - Added rel="nofollow" to links. Changed button from <a> to <span> to fix target_new or target_blank issues.
|
14 |
+
2.1.5 - Fix conflict with link tracking plugins. Custom image support for hosted wordpress sites.
|
15 |
+
2.1.4 - wp head fix.
|
16 |
+
2.1.3 - Manual option for button placement. Security updates for multi-author sites.
|
17 |
+
2.1.2 - Improvements to Setting page layout and PrintFriendly button launching from post pages.
|
18 |
+
2.1.1 - Fixed admin settings bug.
|
19 |
+
2.1 - Update for mult-author websites. Improvements to Settings page.
|
20 |
+
2.0 - Customize the style, placement, and pages your printfriendly button appears.
|
21 |
+
1.5 - Added developer ability to disable hook and use the pf_show_link() function to better be used in a custom theme & Uninstall cleanup.
|
22 |
+
1.4 - Changed Name.
|
23 |
+
1.3 - Added new buttons, removed redundant code.
|
24 |
+
1.2 - User can choose to show or not show buttons on the listing page.
|
25 |
|
26 |
*/
|
27 |
|
167 |
break;
|
168 |
|
169 |
case "pf-icon-both.gif":
|
170 |
+
return '<img class="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span class="printandpdf" style="font-size:'.get_option('pf_text_size').'px; margin-left:3px; color:'.get_option('pf_text_color').';"> Print <img style="border:none;" src="http://cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span>';
|
171 |
break;
|
172 |
|
173 |
case "pf-icon-small.gif":
|
210 |
if (strpos($plink_url,"?")!=false)
|
211 |
$separator = "&pfstyle=wp";
|
212 |
|
213 |
+
$style=' text-align:';
|
214 |
$pos = get_option('pf_content_position');
|
215 |
if($pos==null){$pos='left';}
|
216 |
$style.=$pos.';';
|
217 |
$style.=' margin: '.pf_margin_down('top').'px '.pf_margin_down('right').'px '.pf_margin_down('bottom').'px '.pf_margin_down('left').'px;';
|
|
|
218 |
|
|
|
219 |
|
220 |
+
$button = '<script src="http://cdn.printfriendly.com/printfriendly.js" type="text/javascript"></script><span onclick="window.print(); return false;" style="'.$style.' text-decoration: none; outline: none; color: '.get_option('pf_text_color').'; cursor:pointer;">'.pf_button().'</span>';
|
221 |
+
|
222 |
+
$button_link = '<span style="'.$style.'"><a href="'.$plink_url.$separator.'" rel="nofollow" style="text-decoration: none; outline: none; color: '.get_option('pf_text_color').';">'.pf_button().'</a></span>';
|
223 |
|
224 |
//This goes on article pages
|
225 |
if((is_single() || is_page()) && $pf_display=='single' || (is_single() && $pf_display=='posts'))
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: Print Friendly
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 1.5
|
5 |
-
Tested up to: 3.1
|
6 |
-
Stable tag: 2.1.
|
7 |
|
8 |
#1 Print and PDF button for your wp site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
9 |
|
@@ -49,12 +49,17 @@ If you have any issues with the plugin or the PrintFriendly widget, please write
|
|
49 |
|
50 |
== Screenshots ==
|
51 |
|
52 |
-
1. The
|
53 |
-
2. Choose your button, text link, or use your own text or graphic.
|
54 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
58 |
= 2.1.5 =
|
59 |
* To avoid conflicts with Google Analytic widgets, changed link structure. No longer uses onclick to call PrintFriendly Javascript. Now the javascript is called in the href.
|
60 |
* Custom image support for hosted solutions
|
2 |
Contributors: Print Friendly
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 1.5
|
5 |
+
Tested up to: 3.1.3
|
6 |
+
Stable tag: 2.1.6
|
7 |
|
8 |
#1 Print and PDF button for your wp site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
9 |
|
49 |
|
50 |
== Screenshots ==
|
51 |
|
52 |
+
1. The Print Friendly widget optimizes and formats your pages for print. Users can remove images and text before printing plus get a PDF
|
53 |
+
2. Choose your print button, text link, or use your own text or graphic.
|
54 |
|
55 |
|
56 |
== Changelog ==
|
57 |
|
58 |
+
= 2.1.6 =
|
59 |
+
* Added rel="no follow" to the print links to avoid search engines indexing the print pages.
|
60 |
+
* Changed print button from link <a> to <span>. Some tracking plugins added target_new/blank to link, therefore breaking print friendly.
|
61 |
+
|
62 |
+
|
63 |
= 2.1.5 =
|
64 |
* To avoid conflicts with Google Analytic widgets, changed link structure. No longer uses onclick to call PrintFriendly Javascript. Now the javascript is called in the href.
|
65 |
* Custom image support for hosted solutions
|