Version Description
- Shortcode bug fix
- Urlencoded button href to produce valid html
Download this release
Release Info
Developer | printfriendly |
Plugin | Print, PDF, Email by PrintFriendly |
Version | 3.3.8 |
Comparing to | |
See all releases |
Code changes from version 3.3.6 to 3.3.8
- pf.php +61 -43
- readme.txt +51 -2
- screenshot-1.png +0 -0
- screenshot-4.png +0 -0
pf.php
CHANGED
@@ -5,11 +5,13 @@ Plugin Name: Print Friendly and PDF
|
|
5 |
Plugin URI: http://www.printfriendly.com
|
6 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
7 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
8 |
-
Version: 3.3.
|
9 |
Author: Print Friendly
|
10 |
Author URI: http://www.PrintFriendly.com
|
11 |
|
12 |
Changelog :
|
|
|
|
|
13 |
3.3.6 - Fixed JS optimization Bug
|
14 |
3.3.5 - Wordpress 3.8 support
|
15 |
3.3.4 - Provided Algorithm Options
|
@@ -284,7 +286,8 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
284 |
|
285 |
|
286 |
?>
|
287 |
-
|
|
|
288 |
var pfHeaderImgUrl = '<?php echo esc_js(esc_url_raw($image_url)); ?>';
|
289 |
var pfHeaderTagline = '<?php echo esc_js($tagline); ?>';
|
290 |
var pfdisableClickToDel = '<?php echo esc_js($this->options['click_to_delete']); ?>';
|
@@ -294,16 +297,17 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
294 |
var pfDisablePDF = '<?php echo esc_js($this->options['pdf']); ?>';
|
295 |
var pfDisablePrint = '<?php echo esc_js($this->options['print']); ?>';
|
296 |
var pfCustomCSS = '<?php echo esc_js($this->options['custom_css_url']); ?>';
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
|
|
307 |
</script>
|
308 |
<?php
|
309 |
}
|
@@ -320,44 +324,16 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
320 |
$is_manual = $this->is_manual();
|
321 |
if( !$content && !$is_manual )
|
322 |
return "";
|
323 |
-
$analytics_code = "";
|
324 |
-
$onclick = 'onclick="window.print(); return false;"';
|
325 |
-
$title_var = "NULL";
|
326 |
-
$analytics_code = "if(typeof(_gaq) != 'undefined') { _gaq.push(['_trackEvent','PRINTFRIENDLY', 'print', '".$title_var."']);}";
|
327 |
-
|
328 |
-
if($this->google_analytics_enabled()) {
|
329 |
-
$onclick = 'onclick="window.print();'.$analytics_code.' return false;"';
|
330 |
-
}
|
331 |
-
|
332 |
-
$href = 'http://www.printfriendly.com/print?url='.get_permalink();
|
333 |
-
$js_enabled = $this->js_enabled();
|
334 |
-
if (!$js_enabled)
|
335 |
-
{
|
336 |
-
$onclick = 'target="_blank"';
|
337 |
-
if($this->google_analytics_enabled()) {
|
338 |
-
$onclick = $onclick.' onclick="'.$analytics_code.'"';
|
339 |
-
}
|
340 |
-
$href = "http://www.printfriendly.com/print?headerImageUrl={$this->options['image_url']}&headerTagline={$this->options['tagline']}&pfCustomCSS={$this->options['custom_css_url']}&imageDisplayStyle={$this->options['image-style']}&disableClickToDel={$this->options['click_to_delete']}&disablePDF={$this->options['pdf']}&disablePrint={$this->options['print']}&disableEmail={$this->options['email']}&hideImages={$this->options['hide-images']}&url=".get_permalink();
|
341 |
-
}
|
342 |
-
|
343 |
-
if ( !is_singular() && '' != $onclick && $js_enabled) {
|
344 |
-
$onclick = '';
|
345 |
-
$href = add_query_arg('pfstyle','wp',get_permalink());
|
346 |
-
}
|
347 |
-
|
348 |
-
$align = '';
|
349 |
-
if ( 'none' != $this->options['content_position'] )
|
350 |
-
$align = ' pf-align'.$this->options['content_position'];
|
351 |
-
|
352 |
-
$button = apply_filters( 'printfriendly_button', '<div class="printfriendly'.$align.'"><a href="'.$href.'" rel="nofollow" '.$onclick.'>'.$this->button().'</a></div>' );
|
353 |
|
354 |
|
|
|
355 |
if ( $is_manual )
|
356 |
{
|
357 |
// Hook the script call now, so it only get's loaded when needed, and need is determined by the user calling pf_button
|
358 |
add_action( 'wp_footer', array( &$this, 'print_script_footer' ) );
|
359 |
return $button;
|
360 |
}
|
|
|
361 |
else
|
362 |
{
|
363 |
if ( (is_page() && ( isset($this->options['show_on_pages']) && 'on' === $this->options['show_on_pages'] ) )
|
@@ -382,6 +358,48 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
382 |
}
|
383 |
|
384 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
/**
|
387 |
* @since 3.2.9
|
@@ -1374,5 +1392,5 @@ add_shortcode( 'printfriendly', 'pf_show_link' );
|
|
1374 |
*/
|
1375 |
function pf_show_link() {
|
1376 |
global $printfriendly;
|
1377 |
-
return $printfriendly->
|
1378 |
}
|
5 |
Plugin URI: http://www.printfriendly.com
|
6 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
7 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
8 |
+
Version: 3.3.8
|
9 |
Author: Print Friendly
|
10 |
Author URI: http://www.PrintFriendly.com
|
11 |
|
12 |
Changelog :
|
13 |
+
3.3.8 - Shortcode Bug fix, urlencode button href
|
14 |
+
3.3.7 - Readme.txt update
|
15 |
3.3.6 - Fixed JS optimization Bug
|
16 |
3.3.5 - Wordpress 3.8 support
|
17 |
3.3.4 - Provided Algorithm Options
|
286 |
|
287 |
|
288 |
?>
|
289 |
+
<script type="text/javascript">
|
290 |
+
|
291 |
var pfHeaderImgUrl = '<?php echo esc_js(esc_url_raw($image_url)); ?>';
|
292 |
var pfHeaderTagline = '<?php echo esc_js($tagline); ?>';
|
293 |
var pfdisableClickToDel = '<?php echo esc_js($this->options['click_to_delete']); ?>';
|
297 |
var pfDisablePDF = '<?php echo esc_js($this->options['pdf']); ?>';
|
298 |
var pfDisablePrint = '<?php echo esc_js($this->options['print']); ?>';
|
299 |
var pfCustomCSS = '<?php echo esc_js($this->options['custom_css_url']); ?>';
|
300 |
+
(function() {
|
301 |
+
var e = document.createElement('script'); e.type="text/javascript";
|
302 |
+
if('https:' == document.location.protocol) {
|
303 |
+
js='https://pf-cdn.printfriendly.com/ssl/main.js';
|
304 |
+
}
|
305 |
+
else{
|
306 |
+
js='http://cdn.printfriendly.com/printfriendly.js';
|
307 |
+
}
|
308 |
+
e.src = js;
|
309 |
+
document.getElementsByTagName('head')[0].appendChild(e);
|
310 |
+
})();
|
311 |
</script>
|
312 |
<?php
|
313 |
}
|
324 |
$is_manual = $this->is_manual();
|
325 |
if( !$content && !$is_manual )
|
326 |
return "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
|
328 |
|
329 |
+
$button = $this->getButton();
|
330 |
if ( $is_manual )
|
331 |
{
|
332 |
// Hook the script call now, so it only get's loaded when needed, and need is determined by the user calling pf_button
|
333 |
add_action( 'wp_footer', array( &$this, 'print_script_footer' ) );
|
334 |
return $button;
|
335 |
}
|
336 |
+
|
337 |
else
|
338 |
{
|
339 |
if ( (is_page() && ( isset($this->options['show_on_pages']) && 'on' === $this->options['show_on_pages'] ) )
|
358 |
}
|
359 |
|
360 |
}
|
361 |
+
|
362 |
+
|
363 |
+
/**
|
364 |
+
* @since 3.3.8
|
365 |
+
* @returns Printfriendly Button HTML
|
366 |
+
*/
|
367 |
+
|
368 |
+
function getButton($add_footer_script = false) {
|
369 |
+
if($add_footer_script) {
|
370 |
+
add_action( 'wp_footer', array( &$this, 'print_script_footer' ) );
|
371 |
+
}
|
372 |
+
$analytics_code = "";
|
373 |
+
$onclick = 'onclick="window.print(); return false;"';
|
374 |
+
$title_var = "NULL";
|
375 |
+
$analytics_code = "if(typeof(_gaq) != 'undefined') { _gaq.push(['_trackEvent','PRINTFRIENDLY', 'print', '".$title_var."']);}";
|
376 |
+
|
377 |
+
if($this->google_analytics_enabled()) {
|
378 |
+
$onclick = 'onclick="window.print();'.$analytics_code.' return false;"';
|
379 |
+
}
|
380 |
+
|
381 |
+
$href = 'http://www.printfriendly.com/print?url='.urlencode(get_permalink());
|
382 |
+
$js_enabled = $this->js_enabled();
|
383 |
+
if (!$js_enabled) {
|
384 |
+
$onclick = 'target="_blank"';
|
385 |
+
if($this->google_analytics_enabled()) {
|
386 |
+
$onclick = $onclick.' onclick="'.$analytics_code.'"';
|
387 |
+
}
|
388 |
+
$href = "http://www.printfriendly.com/print?headerImageUrl=".urlencode($this->options['image_url'])."&headerTagline=".urlencode($this->options['tagline'])."&pfCustomCSS=".urlencode($this->options['custom_css_url'])."&imageDisplayStyle=".urlencode($this->options['image-style'])."&disableClickToDel=".urlencode($this->options['click_to_delete'])."&disablePDF=".urlencode($this->options['pdf'])."&disablePrint=".urlencode($this->options['print'])."&disableEmail=".urlencode($this->options['email'])."&hideImages=".urlencode($this->options['hide-images'])."&url=".urlencode(get_permalink());
|
389 |
+
}
|
390 |
+
if ( !is_singular() && '' != $onclick && $js_enabled) {
|
391 |
+
$onclick = '';
|
392 |
+
$href = add_query_arg('pfstyle','wp',get_permalink());
|
393 |
+
}
|
394 |
+
|
395 |
+
$align = '';
|
396 |
+
if ( 'none' != $this->options['content_position'] )
|
397 |
+
$align = ' pf-align'.$this->options['content_position'];
|
398 |
+
$href = str_replace("&", "&", $href );
|
399 |
+
$button = apply_filters( 'printfriendly_button', '<div class="printfriendly'.$align.'"><a href="'.$href.'" rel="nofollow" '.$onclick.'>'.$this->button().'</a></div>' );
|
400 |
+
return $button;
|
401 |
+
}
|
402 |
+
|
403 |
|
404 |
/**
|
405 |
* @since 3.2.9
|
1392 |
*/
|
1393 |
function pf_show_link() {
|
1394 |
global $printfriendly;
|
1395 |
+
return $printfriendly->getButton(true);
|
1396 |
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: printfriendly,joostdevalk, jrf
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 3.3.
|
7 |
|
8 |
|
9 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
@@ -67,6 +67,47 @@ PrintFriendly and PDF is the #1 print optimization technology, **as featured in
|
|
67 |
|
68 |
**Give PrintFriendly & PDF a test drive at [PrintFriendly.com](http://www.printfriendly.com "PrintFriendly & PDF")**
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
== Installation ==
|
71 |
|
72 |
1. Search for PrintFriendly in your WordPress backend and click install, or download the printfriendly.zip file and unzip it.
|
@@ -98,6 +139,14 @@ If you have any other issues with the plugin or the PrintFriendly widget, please
|
|
98 |
3. Localization example: Spanish
|
99 |
|
100 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
= 3.3.6 =
|
102 |
* Fixed JS optimization Bug
|
103 |
|
2 |
Contributors: printfriendly,joostdevalk, jrf
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
+
Tested up to: 4.1
|
6 |
+
Stable tag: 3.3.8
|
7 |
|
8 |
|
9 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
67 |
|
68 |
**Give PrintFriendly & PDF a test drive at [PrintFriendly.com](http://www.printfriendly.com "PrintFriendly & PDF")**
|
69 |
|
70 |
+
|
71 |
+
= Free - Ad Supported =
|
72 |
+
|
73 |
+
This highly polished, professional plugin is free to use and fully functional. We maintain, improve, and offer support to all users.
|
74 |
+
|
75 |
+
You get all this for free, and in return tasteful ads are displayed in a non-interfering way.
|
76 |
+
|
77 |
+
Ads are only shown in the email confirmation window. No other ads are displayed or embedded in the content, or snuck in anywhere else.
|
78 |
+
|
79 |
+
For example, [click here to see image](http://www.printfriendly.com/images/pf-free-ad-supported.gif)
|
80 |
+
|
81 |
+
|
82 |
+
= Purchase an Ad-Free Subscription =
|
83 |
+
|
84 |
+
Get a quality product for reasonable price. Remove the ads by purchasing an ad-free subscription. It’s cheap, easy, and straightforward.
|
85 |
+
|
86 |
+
Your ad-free subscription applies to this email plugin, and our popular PrintFriendly & PDF plugin.
|
87 |
+
|
88 |
+
Purchase now at [PrintFriendly.com/pro](http://printfriendly.com/pro)
|
89 |
+
|
90 |
+
= Privacy & Data =
|
91 |
+
|
92 |
+
PDFs are generated on our server; ** this plugin “phones home” **. Also if the end-user shares the page via email, the email is sent by our server.
|
93 |
+
|
94 |
+
Our Fundamental Principles:
|
95 |
+
|
96 |
+
* **We do not sell data.** Period.
|
97 |
+
* **We do not share data,** unless compelled by the law.
|
98 |
+
* **We do not ask for personal information,** unless it's needed to provide a service.
|
99 |
+
* **We don’t store personal information,** unless required for the on-going operation of service.
|
100 |
+
|
101 |
+
Specifically, here’s what we do with the data and information:
|
102 |
+
|
103 |
+
**Page content is not sent or stored on server,** except to generate the PDF. After the PDF is generated, we temporarily store the PDF to allow the end-user time to download. After this time has expired, the PDF is permanently deleted.
|
104 |
+
|
105 |
+
If you’re using the non-JavaScript option in the plugin, then the preview is generated on our server and temporarily stored in cache for a few minutes. After that time it is permanently deleted.
|
106 |
+
|
107 |
+
**Email Address & Content get permanently deleted** In order to send the email, we need to store the email address and message on our server. After the email has been sent and found not to be a spammer, the email address is permanently deleted.
|
108 |
+
|
109 |
+
**Server log files get created and deleted.** Browsers and Servers pass non-personally-identifying information, such as the browser type, language, referrer, and the date/time. We may use this data to analyze how the service is being used. Non-personally-identifying aggregate data may get published, e.g., by a report on trends in the usage of the service.
|
110 |
+
|
111 |
== Installation ==
|
112 |
|
113 |
1. Search for PrintFriendly in your WordPress backend and click install, or download the printfriendly.zip file and unzip it.
|
139 |
3. Localization example: Spanish
|
140 |
|
141 |
== Changelog ==
|
142 |
+
|
143 |
+
= 3.3.8 =
|
144 |
+
* Shortcode bug fix
|
145 |
+
* Urlencoded button href to produce valid html
|
146 |
+
|
147 |
+
= 3.3.7 =
|
148 |
+
* Readme.txt update
|
149 |
+
|
150 |
= 3.3.6 =
|
151 |
* Fixed JS optimization Bug
|
152 |
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-4.png
ADDED
Binary file
|