Version Description
- Fixed JS bug with Google Chrome not submitting and fixed input validation issues.
Download this release
Release Info
Developer | joostdevalk |
Plugin | Print, PDF, Email by PrintFriendly |
Version | 3.0.2 |
Comparing to | |
See all releases |
Code changes from version 3.0.1 to 3.0.2
- admin.js +6 -0
- pf.php +9 -5
- readme.txt +5 -1
admin.js
CHANGED
@@ -4,14 +4,17 @@ jQuery(document).ready(function() {
|
|
4 |
if (jQuery('.show_list:checked').val()=='manual') {
|
5 |
jQuery('#addmanual-help').show('slow');
|
6 |
jQuery('.content_placement').hide('slow');
|
|
|
7 |
} else {
|
8 |
jQuery('#addmanual-help').hide('slow');
|
9 |
jQuery('.content_placement').show('slow');
|
|
|
10 |
}
|
11 |
});
|
12 |
if (jQuery('.show_list:checked').val()=='manual') {
|
13 |
jQuery('#addmanual-help').show('slow');
|
14 |
jQuery('.content_placement').hide();
|
|
|
15 |
}
|
16 |
|
17 |
jQuery('#colorSelector').ColorPicker({
|
@@ -34,12 +37,15 @@ jQuery(document).ready(function() {
|
|
34 |
jQuery('#disable_css').change(function(){
|
35 |
if ( jQuery('#disable_css').is(':checked') ) {
|
36 |
jQuery('.css').show('slow');
|
|
|
37 |
} else {
|
38 |
jQuery('.css').hide('slow');
|
|
|
39 |
}
|
40 |
});
|
41 |
if ( jQuery('#disable_css').not(':checked') ) {
|
42 |
jQuery('.css').hide();
|
|
|
43 |
}
|
44 |
|
45 |
jQuery('#text_size').change(function(){
|
4 |
if (jQuery('.show_list:checked').val()=='manual') {
|
5 |
jQuery('#addmanual-help').show('slow');
|
6 |
jQuery('.content_placement').hide('slow');
|
7 |
+
jQuery('.content_placement input').attr('disabled','disabled');
|
8 |
} else {
|
9 |
jQuery('#addmanual-help').hide('slow');
|
10 |
jQuery('.content_placement').show('slow');
|
11 |
+
jQuery('.content_placement input').removeAttr('disabled');
|
12 |
}
|
13 |
});
|
14 |
if (jQuery('.show_list:checked').val()=='manual') {
|
15 |
jQuery('#addmanual-help').show('slow');
|
16 |
jQuery('.content_placement').hide();
|
17 |
+
jQuery('.content_placement input').attr('disabled','disabled');
|
18 |
}
|
19 |
|
20 |
jQuery('#colorSelector').ColorPicker({
|
37 |
jQuery('#disable_css').change(function(){
|
38 |
if ( jQuery('#disable_css').is(':checked') ) {
|
39 |
jQuery('.css').show('slow');
|
40 |
+
jQuery('.css input').removeAttr('disabled');
|
41 |
} else {
|
42 |
jQuery('.css').hide('slow');
|
43 |
+
jQuery('.css input').attr('disabled','disabled');
|
44 |
}
|
45 |
});
|
46 |
if ( jQuery('#disable_css').not(':checked') ) {
|
47 |
jQuery('.css').hide();
|
48 |
+
jQuery('.css input').attr('disabled','disabled');
|
49 |
}
|
50 |
|
51 |
jQuery('#text_size').change(function(){
|
pf.php
CHANGED
@@ -4,7 +4,7 @@ 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.
|
7 |
-
Version: 3.0
|
8 |
Author: Print Friendly
|
9 |
Author URI: http://www.PrintFriendly.com
|
10 |
|
@@ -211,7 +211,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
211 |
}
|
212 |
|
213 |
$align = '';
|
214 |
-
if ( 'none' !=
|
215 |
$align = ' align'.$this->options['content_position'];
|
216 |
|
217 |
$button = apply_filters( 'printfriendly_button', '<div class="printfriendly'.$align.'"><a href="'.$href.'" rel="nofollow" '.$onclick.'>'.$this->button().'</a></div>' );
|
@@ -285,12 +285,16 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
285 |
|
286 |
$valid_input['text_size'] = (int) $input['text_size'];
|
287 |
|
288 |
-
if (
|
|
|
|
|
289 |
$valid_input['text_size'] = 14;
|
290 |
add_settings_error( $this->option_name, 'invalid_color', __( 'The text size you entered is too high, please stay below 25px.', $this->hook ) );
|
291 |
}
|
292 |
|
293 |
-
if ( !
|
|
|
|
|
294 |
// Revert to previous setting and throw error.
|
295 |
$valid_input['text_color'] = $this->options['text_color'];
|
296 |
add_settings_error( $this->option_name, 'invalid_color', __( 'The color you entered is not valid, it must be a valid hexadecimal RGB font color.', $this->hook ) );
|
@@ -374,7 +378,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
374 |
'content_placement' => 'after',
|
375 |
'custom_image' => '',
|
376 |
'custom_text' => 'Print Friendly',
|
377 |
-
'disable_css' =>
|
378 |
'javascript_include' => 'on',
|
379 |
'javascript_fallback' => 'on',
|
380 |
'margin_top' => 0,
|
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.
|
7 |
+
Version: 3.0.2
|
8 |
Author: Print Friendly
|
9 |
Author URI: http://www.PrintFriendly.com
|
10 |
|
211 |
}
|
212 |
|
213 |
$align = '';
|
214 |
+
if ( 'none' != $this->options['content_position'] )
|
215 |
$align = ' align'.$this->options['content_position'];
|
216 |
|
217 |
$button = apply_filters( 'printfriendly_button', '<div class="printfriendly'.$align.'"><a href="'.$href.'" rel="nofollow" '.$onclick.'>'.$this->button().'</a></div>' );
|
285 |
|
286 |
$valid_input['text_size'] = (int) $input['text_size'];
|
287 |
|
288 |
+
if ( !isset($valid_input['text_size']) || 0 == $valid_input['text_size'] ) {
|
289 |
+
$valid_input['text_size'] = 14;
|
290 |
+
} else if ( 25 < $valid_input['text_size'] || 9 > $valid_input['text_size'] ) {
|
291 |
$valid_input['text_size'] = 14;
|
292 |
add_settings_error( $this->option_name, 'invalid_color', __( 'The text size you entered is too high, please stay below 25px.', $this->hook ) );
|
293 |
}
|
294 |
|
295 |
+
if ( !isset( $input['text_color'] )) {
|
296 |
+
$valid_input['text_color'] = $this->options['text_color'];
|
297 |
+
} else if ( ! preg_match('/^#[a-f0-9]{3,6}$/i', $input['text_color'] ) ) {
|
298 |
// Revert to previous setting and throw error.
|
299 |
$valid_input['text_color'] = $this->options['text_color'];
|
300 |
add_settings_error( $this->option_name, 'invalid_color', __( 'The color you entered is not valid, it must be a valid hexadecimal RGB font color.', $this->hook ) );
|
378 |
'content_placement' => 'after',
|
379 |
'custom_image' => '',
|
380 |
'custom_text' => 'Print Friendly',
|
381 |
+
'disable_css' => false,
|
382 |
'javascript_include' => 'on',
|
383 |
'javascript_fallback' => 'on',
|
384 |
'margin_top' => 0,
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: printfriendly,joostdevalk
|
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.2.1
|
6 |
-
Stable tag: 3.0.
|
7 |
|
8 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
9 |
|
@@ -64,6 +64,10 @@ If you have any other issues with the plugin or the PrintFriendly widget, please
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
67 |
= 3.0.1 =
|
68 |
|
69 |
* Fixed minor JS bug.
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.2.1
|
6 |
+
Stable tag: 3.0.2
|
7 |
|
8 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
9 |
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 3.0.2 =
|
68 |
+
|
69 |
+
* Fixed JS bug with Google Chrome not submitting and fixed input validation issues.
|
70 |
+
|
71 |
= 3.0.1 =
|
72 |
|
73 |
* Fixed minor JS bug.
|