Print, PDF, Email by PrintFriendly - Version 3.1.2

Version Description

  • Added disable css option to admin settings.
Download this release

Release Info

Developer printfriendly
Plugin Icon 128x128 Print, PDF, Email by PrintFriendly
Version 3.1.2
Comparing to
See all releases

Code changes from version 3.1.1 to 3.1.2

Files changed (4) hide show
  1. admin.css +11 -1
  2. admin.js +24 -2
  3. pf.php +6 -4
  4. readme.txt +5 -1
admin.css CHANGED
@@ -2,6 +2,7 @@ label{
2
  display: block;
3
  margin: 1.5em 0;
4
  }
 
5
  h3{
6
  margin: 3em 0 2em;
7
  border-bottom: 1px solid #ccc;
@@ -28,11 +29,12 @@ h3{
28
  #custom, #placement-adv-options{
29
  float: left;
30
  }
 
31
  #custom-txt, #custom-img {
32
  margin: 2em 0 2em 2em;
33
  clear: both;
34
-
35
  }
 
36
  .description{
37
  color: #cacaca;
38
  }
@@ -74,6 +76,14 @@ input[type="number"] {
74
  width: 36px;
75
  margin-right: .5em;
76
  }
 
 
 
 
 
 
 
 
77
  #pf-shortcode{
78
 
79
  margin-left: 2em;
2
  display: block;
3
  margin: 1.5em 0;
4
  }
5
+
6
  h3{
7
  margin: 3em 0 2em;
8
  border-bottom: 1px solid #ccc;
29
  #custom, #placement-adv-options{
30
  float: left;
31
  }
32
+
33
  #custom-txt, #custom-img {
34
  margin: 2em 0 2em 2em;
35
  clear: both;
 
36
  }
37
+
38
  .description{
39
  color: #cacaca;
40
  }
76
  width: 36px;
77
  margin-right: .5em;
78
  }
79
+ #css{
80
+ font-size: 11px;
81
+ color:#bbb;
82
+ }
83
+ #css input{
84
+ margin: 0 6px 0 12px;
85
+ vertical-align: baseline;
86
+ }
87
  #pf-shortcode{
88
 
89
  margin-left: 2em;
admin.js CHANGED
@@ -39,6 +39,18 @@ jQuery(document).ready(function() {
39
  jQuery('.printfriendly-text2').css('font-size',parseInt(size));
40
  }).change();
41
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  jQuery('#custom_text').change(function(){
43
  pf_custom_text_change();
44
  }).change();
@@ -52,8 +64,6 @@ jQuery(document).ready(function() {
52
  jQuery('#custom span.printfriendly-text2').text( jQuery('#custom_text').val() );
53
  }
54
 
55
- jQuery('.printfriendly-text2').css('color', jQuery('#text_color').val() );
56
-
57
  function pf_initialize_preview(urlInputSelector, previewSelector) {
58
  var el = jQuery(urlInputSelector);
59
  var preview = jQuery(previewSelector + '-preview');
@@ -136,4 +146,16 @@ jQuery(document).ready(function() {
136
  jQuery('#print-options').hide('slow');
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  });
39
  jQuery('.printfriendly-text2').css('font-size',parseInt(size));
40
  }).change();
41
 
42
+ jQuery('#css input').change(function() {
43
+ if(jQuery(this).attr('checked')) {
44
+ jQuery(this).val('off');
45
+ jQuery('#margin, #custom-txt').hide('slow');
46
+ pf_reset_style();
47
+ } else {
48
+ jQuery(this).val('on');
49
+ jQuery('#margin, #custom-txt').show('slow');
50
+ pf_apply_style();
51
+ }
52
+ }).change();
53
+
54
  jQuery('#custom_text').change(function(){
55
  pf_custom_text_change();
56
  }).change();
64
  jQuery('#custom span.printfriendly-text2').text( jQuery('#custom_text').val() );
65
  }
66
 
 
 
67
  function pf_initialize_preview(urlInputSelector, previewSelector) {
68
  var el = jQuery(urlInputSelector);
69
  var preview = jQuery(previewSelector + '-preview');
146
  jQuery('#print-options').hide('slow');
147
  }
148
 
149
+ function pf_reset_style() {
150
+ console.log('reseting styles');
151
+ jQuery('.printfriendly-text2').css('font-size',14);
152
+ jQuery('.printfriendly-text2').css('color','#000000');
153
+ }
154
+
155
+ function pf_apply_style() {
156
+ jQuery('.printfriendly-text2').css('color', jQuery('#text_color').val() );
157
+ size = jQuery('#text_size').val();
158
+ jQuery('.printfriendly-text2').css('font-size',parseInt(size));
159
+ }
160
+
161
  });
pf.php CHANGED
@@ -4,11 +4,12 @@ Plugin Name: Print Friendly and PDF
4
  Plugin URI: http://www.printfriendly.com
5
  Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
6
  Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
7
- Version: 3.1.1
8
  Author: Print Friendly
9
  Author URI: http://www.PrintFriendly.com
10
 
11
  Changelog :
 
12
  3.1.1 - Fixed admin js caching.
13
  3.1.0 - Fixed admin css caching.
14
  3.0.9 - New features: Custom header, disable click-to-delete, https support (beta), PrintFriendly Pro (ad-free).
@@ -383,7 +384,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
383
  */
384
  function admin_enqueue_scripts( $screen_id ) {
385
  if ( $this->settings_page == $screen_id ) {
386
- $ver = '3.1.1';
387
  wp_register_script( 'pf-color-picker', plugins_url( 'colorpicker.js', __FILE__ ), array( 'jquery', 'media-upload' ), $ver );
388
  wp_register_script( 'pf-admin-js', plugins_url( 'admin.js', __FILE__ ), array( 'jquery', 'media-upload' ), $ver );
389
 
@@ -722,8 +723,9 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
722
 
723
  <!--Section 2 Button Placement-->
724
  <div id="button-placement">
725
- <h3><?php _e( "Button Placement", $this->hook ); ?></h3>
726
- <input type="hidden" name="<?php echo $this->option_name; ?>[enable_css]" value="<?php $this->val('enable_css');?>"/>
 
727
  <div id="button-placement-options">
728
  <div id="alignment">
729
  <label>
4
  Plugin URI: http://www.printfriendly.com
5
  Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
6
  Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
7
+ Version: 3.1.2
8
  Author: Print Friendly
9
  Author URI: http://www.PrintFriendly.com
10
 
11
  Changelog :
12
+ 3.1.2 - Added disable css option to admin settings.
13
  3.1.1 - Fixed admin js caching.
14
  3.1.0 - Fixed admin css caching.
15
  3.0.9 - New features: Custom header, disable click-to-delete, https support (beta), PrintFriendly Pro (ad-free).
384
  */
385
  function admin_enqueue_scripts( $screen_id ) {
386
  if ( $this->settings_page == $screen_id ) {
387
+ $ver = '3.1.2';
388
  wp_register_script( 'pf-color-picker', plugins_url( 'colorpicker.js', __FILE__ ), array( 'jquery', 'media-upload' ), $ver );
389
  wp_register_script( 'pf-admin-js', plugins_url( 'admin.js', __FILE__ ), array( 'jquery', 'media-upload' ), $ver );
390
 
723
 
724
  <!--Section 2 Button Placement-->
725
  <div id="button-placement">
726
+ <h3><?php _e( "Button Placement", $this->hook ); ?>
727
+ <span id="css"><input type="checkbox" name="<?php echo $this->option_name; ?>[enable_css]" value="<?php $this->val('enable_css');?>" <?php $this->checked('enable_css', 'off'); ?> />Do not use CSS for button styles</span>
728
+ </h3>
729
  <div id="button-placement-options">
730
  <div id="alignment">
731
  <label>
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.4.2
6
- Stable tag: 3.1.1
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.1.1 =
68
 
69
  * Fixed admin js caching.
3
  Tags: print, pdf, printer, printing, printable, widget, plugin
4
  Requires at least: 2.8
5
  Tested up to: 3.4.2
6
+ Stable tag: 3.1.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.1.2 =
68
+
69
+ * Added disable css option to admin settings.
70
+
71
  = 3.1.1 =
72
 
73
  * Fixed admin js caching.