Version Description
- 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.
- Custom image support for hosted solutions
Download this release
Release Info
Developer | printfriendly |
Plugin | Print, PDF, Email by PrintFriendly |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
- admin.css +12 -6
- pf.php +4 -5
- pf_admin.php +19 -19
- readme.txt +9 -1
admin.css
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
margin-right:3em;
|
7 |
}
|
8 |
#pf_settings li{
|
9 |
-
margin:
|
10 |
}
|
11 |
#pf_settings input {
|
12 |
margin:0 .5em;
|
@@ -14,17 +14,19 @@
|
|
14 |
#custom_buttons {
|
15 |
border:2px dashed #E8F7C7;
|
16 |
float:left;
|
17 |
-
position:relative;
|
18 |
margin:1em;
|
|
|
19 |
}
|
20 |
-
ul#pftxtbuttons{
|
21 |
margin-top:0;
|
22 |
}
|
23 |
#custom_options{
|
24 |
position:absolute;
|
25 |
-
|
|
|
|
|
|
|
26 |
}
|
27 |
-
|
28 |
#pf_margin input, input#pf_text_size {
|
29 |
width:2em;
|
30 |
}
|
@@ -51,7 +53,10 @@ ul#pftxtbuttons{
|
|
51 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#ededed', EndColorStr='#e1e1e1');
|
52 |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ededed', EndColorStr='#e1e1e1')";
|
53 |
}
|
54 |
-
|
|
|
|
|
|
|
55 |
|
56 |
#contact_pf{
|
57 |
float:right;
|
@@ -62,6 +67,7 @@ ul#pftxtbuttons{
|
|
62 |
width: 30px;
|
63 |
height: 30px;
|
64 |
background: url(../images/select.png);
|
|
|
65 |
}
|
66 |
#colorSelector div {
|
67 |
width: 30px;
|
6 |
margin-right:3em;
|
7 |
}
|
8 |
#pf_settings li{
|
9 |
+
margin:1.25em 0;
|
10 |
}
|
11 |
#pf_settings input {
|
12 |
margin:0 .5em;
|
14 |
#custom_buttons {
|
15 |
border:2px dashed #E8F7C7;
|
16 |
float:left;
|
|
|
17 |
margin:1em;
|
18 |
+
position:relative;
|
19 |
}
|
20 |
+
ul#pftxtbuttons, ul#custom_options{
|
21 |
margin-top:0;
|
22 |
}
|
23 |
#custom_options{
|
24 |
position:absolute;
|
25 |
+
right:0px;
|
26 |
+
}
|
27 |
+
#custom_url {
|
28 |
+
display:inline-block;
|
29 |
}
|
|
|
30 |
#pf_margin input, input#pf_text_size {
|
31 |
width:2em;
|
32 |
}
|
53 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#ededed', EndColorStr='#e1e1e1');
|
54 |
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ededed', EndColorStr='#e1e1e1')";
|
55 |
}
|
56 |
+
.help {
|
57 |
+
font-size:11px;
|
58 |
+
color:#bbb;
|
59 |
+
}
|
60 |
|
61 |
#contact_pf{
|
62 |
float:right;
|
67 |
width: 30px;
|
68 |
height: 30px;
|
69 |
background: url(../images/select.png);
|
70 |
+
display:inline-block;
|
71 |
}
|
72 |
#colorSelector div {
|
73 |
width: 30px;
|
pf.php
CHANGED
@@ -4,11 +4,12 @@
|
|
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 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>]
|
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 |
2.1.4 - wp head fix.
|
13 |
2.1.3 - Manual option for button placement. Security updates for multi-author sites.
|
14 |
2.1.2 - Improvements to Setting page layout and PrintFriendly button launching from post pages.
|
@@ -65,8 +66,6 @@ function printfriendly_activation_handler(){
|
|
65 |
update_option('pf_margin_right',0);
|
66 |
update_option('pf_margin_bottom',0);
|
67 |
update_option('pf_margin_left',0);
|
68 |
-
|
69 |
-
|
70 |
update_option('pf_text_color','#55750C');
|
71 |
update_option('pf_text_size','14');
|
72 |
|
@@ -166,7 +165,7 @@ function pf_button($name=false){
|
|
166 |
break;
|
167 |
|
168 |
case "pf-icon-both.gif":
|
169 |
-
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 src="http://cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span>';
|
170 |
break;
|
171 |
|
172 |
case "pf-icon-small.gif":
|
@@ -216,7 +215,7 @@ function pf_show_link($content=false)
|
|
216 |
$style.=' margin: '.pf_margin_down('top').'px '.pf_margin_down('right').'px '.pf_margin_down('bottom').'px '.pf_margin_down('left').'px;';
|
217 |
$style.='" ';
|
218 |
|
219 |
-
$button = '<div'.$style.'><script src="http://cdn.printfriendly.com/printfriendly.js" type="text/javascript"></script><a href="
|
220 |
|
221 |
$button_link = '<div'.$style.'><a href="'.$plink_url.$separator.'" style="text-decoration: none; outline: none; color: '.get_option('pf_text_color').';">'.pf_button().'</a></div>';
|
222 |
|
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 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>]
|
6 |
Developed by <a href="http://printfriendly.com" target="_blank">PrintFriendly</a>
|
7 |
+
Version: 2.1.5
|
8 |
Author: Print Friendly
|
9 |
Author URI: http://www.PrintFriendly.com
|
10 |
|
11 |
Changelog :
|
12 |
+
2.1.5 - Fix conflict with link tracking plugins. Custom image support for hosted wordpress sites.
|
13 |
2.1.4 - wp head fix.
|
14 |
2.1.3 - Manual option for button placement. Security updates for multi-author sites.
|
15 |
2.1.2 - Improvements to Setting page layout and PrintFriendly button launching from post pages.
|
66 |
update_option('pf_margin_right',0);
|
67 |
update_option('pf_margin_bottom',0);
|
68 |
update_option('pf_margin_left',0);
|
|
|
|
|
69 |
update_option('pf_text_color','#55750C');
|
70 |
update_option('pf_text_size','14');
|
71 |
|
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":
|
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 |
$button_link = '<div'.$style.'><a href="'.$plink_url.$separator.'" style="text-decoration: none; outline: none; color: '.get_option('pf_text_color').';">'.pf_button().'</a></div>';
|
221 |
|
pf_admin.php
CHANGED
@@ -21,7 +21,13 @@ if(isset($_POST['pf_save'])){
|
|
21 |
$error[] = 'Invalid entry for the "Pick Your Button" field. That isn\'t an option to select from! Quit messing with the DOM.';
|
22 |
}
|
23 |
|
24 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
if(isset($_POST['upload_image'])){
|
26 |
if(trim($_POST['upload_image']) == ''){
|
27 |
update_option('pf_custom_image',null);
|
@@ -35,7 +41,7 @@ if(isset($_POST['pf_save'])){
|
|
35 |
$error[] = 'Please provide a valid image link for the "Custom Image URL" field.';
|
36 |
}
|
37 |
}
|
38 |
-
}
|
39 |
|
40 |
// Custom Text
|
41 |
if(isset($_POST['custom_text'])){
|
@@ -174,27 +180,21 @@ if( current_user_can('manage_options') ) {
|
|
174 |
<li class="preview_button"><?php echo pf_radio('pf-icon-both.gif'); ?></li>
|
175 |
<li class="preview_button"><?php echo pf_radio('pf-icon.gif'); ?></li>
|
176 |
<li class="preview_button"><?php echo pf_radio('text-only'); ?></li>
|
177 |
-
<li class="preview_button"><?php echo pf_radio('custom-image'); ?>
|
|
|
|
|
|
|
178 |
</ul>
|
179 |
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
<li><label>Button Text Size<input type="text" id="pf_text_size" name="pf_text_size" value="<?php echo get_option('pf_text_size'); ?>"/></label></li>
|
188 |
</ul>
|
189 |
|
190 |
-
|
191 |
-
<div id="pf_uploader">
|
192 |
-
<label for="upload_image" class="pf_label">Custom Image URL: </label>
|
193 |
-
|
194 |
-
<input id="upload_image_button" type="button" value="Upload Image" class="button-primary"/>
|
195 |
-
<p>Enter an URL or click "Upload Image" to Upload an Image.</p>
|
196 |
-
</div>
|
197 |
-
</p>-->
|
198 |
<br class='clear' />
|
199 |
</div>
|
200 |
<br class='clear' />
|
21 |
$error[] = 'Invalid entry for the "Pick Your Button" field. That isn\'t an option to select from! Quit messing with the DOM.';
|
22 |
}
|
23 |
|
24 |
+
// Custom Image
|
25 |
+
if(isset($_POST['upload_image'])){
|
26 |
+
update_option('pf_custom_image',$_POST['upload_image']);
|
27 |
+
|
28 |
+
}
|
29 |
+
|
30 |
+
/*// custom image
|
31 |
if(isset($_POST['upload_image'])){
|
32 |
if(trim($_POST['upload_image']) == ''){
|
33 |
update_option('pf_custom_image',null);
|
41 |
$error[] = 'Please provide a valid image link for the "Custom Image URL" field.';
|
42 |
}
|
43 |
}
|
44 |
+
}*/
|
45 |
|
46 |
// Custom Text
|
47 |
if(isset($_POST['custom_text'])){
|
180 |
<li class="preview_button"><?php echo pf_radio('pf-icon-both.gif'); ?></li>
|
181 |
<li class="preview_button"><?php echo pf_radio('pf-icon.gif'); ?></li>
|
182 |
<li class="preview_button"><?php echo pf_radio('text-only'); ?></li>
|
183 |
+
<li class="preview_button"><?php echo pf_radio('custom-image'); ?>
|
184 |
+
<label id="custom_url">Custom Image URL
|
185 |
+
<input id="upload_image" type="text" size="40" name="upload_image" value="<?php echo get_option('pf_custom_image'); ?>" />
|
186 |
+
<div class="help">.JPG .GIF or .PNG Absolute (http://www.example.com/...), or Relative (/wp/wp-content/uploads/example.png)</div></label></li>
|
187 |
</ul>
|
188 |
|
189 |
+
<ul id="custom_options">
|
190 |
+
<li><label>Button Says <input type="text" name="custom_text" id="pf_custom_text" value="<?php echo get_option('pf_custom_text'); ?>"></label></li>
|
191 |
+
<li>
|
192 |
+
<label>Text Color <div id="colorSelector"><div style="background-color: <?php echo get_option('pf_text_color'); ?>;"></div></div>
|
193 |
+
</label><input type="hidden" name="pf_text_color" id="pf_text_color" value="<?php echo get_option('pf_text_color'); ?>"/></li>
|
194 |
+
<li><label>Text Size<input type="text" id="pf_text_size" name="pf_text_size" value="<?php echo get_option('pf_text_size'); ?>"/></label></li>
|
|
|
|
|
195 |
</ul>
|
196 |
|
197 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
<br class='clear' />
|
199 |
</div>
|
200 |
<br class='clear' />
|
readme.txt
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
Contributors: Print Friendly
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 1.5
|
5 |
-
|
|
|
6 |
|
7 |
#1 Print and PDF button for your wp site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
8 |
|
@@ -50,3 +51,10 @@ If you have any issues with the plugin or the PrintFriendly widget, please write
|
|
50 |
|
51 |
1. The PrintFriendly widget optimizes and formats your pages for print. Users can remove images and get a PDF
|
52 |
2. Choose your button, text link, or use your own text or graphic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.5
|
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 |
|
51 |
|
52 |
1. The PrintFriendly widget optimizes and formats your pages for print. Users can remove images and get a PDF
|
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
|