Print, PDF, Email by PrintFriendly - Version 3.9.1

Version Description

  • Better print-only detection
Download this release

Release Info

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

Code changes from version 3.8.7 to 3.9.1

Files changed (4) hide show
  1. pf.php +17 -6
  2. readme.txt +11 -2
  3. trunk/pf.php +16 -5
  4. trunk/readme.txt +11 -2
pf.php CHANGED
@@ -5,11 +5,13 @@ Plugin Name: Print, PDF & Email by PrintFriendly
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.8.7
9
  Author: Print, PDF, & Email by PrintFriendly
10
  Author URI: http://www.PrintFriendly.com
11
 
12
  Changelog :
 
 
13
  3.8.7 - Bug fix.
14
  3.8.6 - Allow default image setting to be small medium or large.
15
  3.8.5 - Bug fix.
@@ -110,7 +112,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
110
  * Current plugin version.
111
  * @var string
112
  */
113
- var $plugin_version = '3.8.5';
114
 
115
  /**
116
  * The hook, used for text domain as well as hooks on pages and in get requests for admin.
@@ -279,8 +281,9 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
279
  * @since 3.3.0
280
  **/
281
  function print_only_override($content) {
282
- $pattern = '/class=[\"]print-only|class=[\']print-only|print-only/';
283
- $pf_pattern = '/class=[\"]pf-content|class=[\']pf-content|pf-content/';
 
284
  return (preg_match($pattern, $content) || preg_match($pf_pattern, $content)) ;
285
  }
286
 
@@ -572,7 +575,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
572
 
573
  /* Section 1 options */
574
  if ( !isset( $input['button_type'] ) || !in_array( $input['button_type'], array(
575
- 'pf-button.gif', 'pf-button-both.gif', 'pf-button-big.gif', // buttongroup1
576
  'button-print-grnw20.png', 'button-print-blu20.png', 'button-print-gry20.png', // buttongroup2
577
  'pf-icon-small.gif', 'pf-icon-both.gif','pf-icon.gif', 'text-only', // buttongroup3
578
  'custom-image', // custom
@@ -1273,6 +1276,13 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1273
  echo '<pre>' . __( 'Options:', $this->hook ) . '<br><br>' . print_r( $this->options, 1 ) . '</pre>';
1274
  }
1275
  ?>
 
 
 
 
 
 
 
1276
  <div id="pf_settings" class="wrap">
1277
 
1278
  <div class="icon32" id="printfriendly"></div>
@@ -1289,6 +1299,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1289
  <?php $this->radio('pf-button.gif'); ?>
1290
  <?php $this->radio('pf-button-both.gif'); ?>
1291
  <?php $this->radio('pf-button-big.gif'); ?>
 
1292
  </div>
1293
  <div id="buttongroup2">
1294
  <?php $this->radio('button-print-grnw20.png'); ?>
@@ -1438,7 +1449,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1438
  <option value="large" <?php selected( $this->options['images-size'], 'large' ); ?>><?php _e( "Large", $this->hook ); ?></option>
1439
  <option value="medium" <?php selected( $this->options['images-size'], 'medium' ); ?>><?php _e( "Medium", $this->hook ); ?></option>
1440
  <option value="small" <?php selected( $this->options['images-size'], 'small' ); ?>><?php _e( "Small", $this->hook ); ?></option>
1441
- <option value="remove-image" <?php selected( $this->options['images-size'], 'remove-image' ); ?>><?php _e( "Remove Images", $this->hook ); ?></option>
1442
  </select>
1443
  </label>
1444
  <label for="image-style">
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.9.0
9
  Author: Print, PDF, & Email by PrintFriendly
10
  Author URI: http://www.PrintFriendly.com
11
 
12
  Changelog :
13
+ 3.9.1 - Better print-only detection
14
+ 3.9.0 - Add new button
15
  3.8.7 - Bug fix.
16
  3.8.6 - Allow default image setting to be small medium or large.
17
  3.8.5 - Bug fix.
112
  * Current plugin version.
113
  * @var string
114
  */
115
+ var $plugin_version = '3.8.7';
116
 
117
  /**
118
  * The hook, used for text domain as well as hooks on pages and in get requests for admin.
281
  * @since 3.3.0
282
  **/
283
  function print_only_override($content) {
284
+ $pattern = '/class=(["\']|["\']([^"\']*)\s)print-only(["\']|\s([^"\']*)["\'])/';
285
+ $pf_pattern = '/class=(["\']|["\']([^"\']*)\s)pf-content(["\']|\s([^"\']*)["\'])/';
286
+
287
  return (preg_match($pattern, $content) || preg_match($pf_pattern, $content)) ;
288
  }
289
 
575
 
576
  /* Section 1 options */
577
  if ( !isset( $input['button_type'] ) || !in_array( $input['button_type'], array(
578
+ 'pf-button.gif', 'pf-button-both.gif', 'pf-button-big.gif', 'pf-button-print-pdf-mail.png', // buttongroup1
579
  'button-print-grnw20.png', 'button-print-blu20.png', 'button-print-gry20.png', // buttongroup2
580
  'pf-icon-small.gif', 'pf-icon-both.gif','pf-icon.gif', 'text-only', // buttongroup3
581
  'custom-image', // custom
1276
  echo '<pre>' . __( 'Options:', $this->hook ) . '<br><br>' . print_r( $this->options, 1 ) . '</pre>';
1277
  }
1278
  ?>
1279
+
1280
+ <style type="text/css">
1281
+ input[type="radio"], img {
1282
+ vertical-align: middle;
1283
+ }
1284
+ </style>
1285
+
1286
  <div id="pf_settings" class="wrap">
1287
 
1288
  <div class="icon32" id="printfriendly"></div>
1299
  <?php $this->radio('pf-button.gif'); ?>
1300
  <?php $this->radio('pf-button-both.gif'); ?>
1301
  <?php $this->radio('pf-button-big.gif'); ?>
1302
+ <?php $this->radio('pf-button-print-pdf-mail.png'); ?>
1303
  </div>
1304
  <div id="buttongroup2">
1305
  <?php $this->radio('button-print-grnw20.png'); ?>
1449
  <option value="large" <?php selected( $this->options['images-size'], 'large' ); ?>><?php _e( "Large", $this->hook ); ?></option>
1450
  <option value="medium" <?php selected( $this->options['images-size'], 'medium' ); ?>><?php _e( "Medium", $this->hook ); ?></option>
1451
  <option value="small" <?php selected( $this->options['images-size'], 'small' ); ?>><?php _e( "Small", $this->hook ); ?></option>
1452
+ <option value="remove-images" <?php selected( $this->options['images-size'], 'remove-images' ); ?>><?php _e( "Remove Images", $this->hook ); ?></option>
1453
  </select>
1454
  </label>
1455
  <label for="image-style">
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: printfriendly,joostdevalk, jrf
3
  Tags: print, pdf, email, print button, wp-print, print recipe, print post, print page, print widget, print plugin, printable, wp-pdf, pdf post, pdf page, pdf button, pdf widget, pdf plugin, woocommerce print, woocommerce pdf
4
  Requires at least: 2.8
5
- Tested up to: 4.7
6
- Stable tag: 3.8.7
7
 
8
 
9
  The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
@@ -140,6 +140,15 @@ You can [hide the Print, PDF, and Email button](https://support.printfriendly.co
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
143
  = 3.8.7 =
144
  * Bug fix.
145
 
2
  Contributors: printfriendly,joostdevalk, jrf
3
  Tags: print, pdf, email, print button, wp-print, print recipe, print post, print page, print widget, print plugin, printable, wp-pdf, pdf post, pdf page, pdf button, pdf widget, pdf plugin, woocommerce print, woocommerce pdf
4
  Requires at least: 2.8
5
+ Tested up to: 4.8
6
+ Stable tag: 3.9.1
7
 
8
 
9
  The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
140
 
141
  == Changelog ==
142
 
143
+ = 3.9.1 =
144
+ * Better print-only detection
145
+
146
+ = 3.9.0 =
147
+ * Add new button
148
+
149
+ = 3.8.8 =
150
+ * Bug fix.
151
+
152
  = 3.8.7 =
153
  * Bug fix.
154
 
trunk/pf.php CHANGED
@@ -5,11 +5,13 @@ Plugin Name: Print, PDF & Email by PrintFriendly
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.8.7
9
  Author: Print, PDF, & Email by PrintFriendly
10
  Author URI: http://www.PrintFriendly.com
11
 
12
  Changelog :
 
 
13
  3.8.7 - Bug fix.
14
  3.8.6 - Allow default image setting to be small medium or large.
15
  3.8.5 - Bug fix.
@@ -279,8 +281,9 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
279
  * @since 3.3.0
280
  **/
281
  function print_only_override($content) {
282
- $pattern = '/class=[\"]print-only|class=[\']print-only|print-only/';
283
- $pf_pattern = '/class=[\"]pf-content|class=[\']pf-content|pf-content/';
 
284
  return (preg_match($pattern, $content) || preg_match($pf_pattern, $content)) ;
285
  }
286
 
@@ -572,7 +575,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
572
 
573
  /* Section 1 options */
574
  if ( !isset( $input['button_type'] ) || !in_array( $input['button_type'], array(
575
- 'pf-button.gif', 'pf-button-both.gif', 'pf-button-big.gif', // buttongroup1
576
  'button-print-grnw20.png', 'button-print-blu20.png', 'button-print-gry20.png', // buttongroup2
577
  'pf-icon-small.gif', 'pf-icon-both.gif','pf-icon.gif', 'text-only', // buttongroup3
578
  'custom-image', // custom
@@ -1273,6 +1276,13 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1273
  echo '<pre>' . __( 'Options:', $this->hook ) . '<br><br>' . print_r( $this->options, 1 ) . '</pre>';
1274
  }
1275
  ?>
 
 
 
 
 
 
 
1276
  <div id="pf_settings" class="wrap">
1277
 
1278
  <div class="icon32" id="printfriendly"></div>
@@ -1289,6 +1299,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1289
  <?php $this->radio('pf-button.gif'); ?>
1290
  <?php $this->radio('pf-button-both.gif'); ?>
1291
  <?php $this->radio('pf-button-big.gif'); ?>
 
1292
  </div>
1293
  <div id="buttongroup2">
1294
  <?php $this->radio('button-print-grnw20.png'); ?>
@@ -1438,7 +1449,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
1438
  <option value="large" <?php selected( $this->options['images-size'], 'large' ); ?>><?php _e( "Large", $this->hook ); ?></option>
1439
  <option value="medium" <?php selected( $this->options['images-size'], 'medium' ); ?>><?php _e( "Medium", $this->hook ); ?></option>
1440
  <option value="small" <?php selected( $this->options['images-size'], 'small' ); ?>><?php _e( "Small", $this->hook ); ?></option>
1441
- <option value="remove-image" <?php selected( $this->options['images-size'], 'remove-image' ); ?>><?php _e( "Remove Images", $this->hook ); ?></option>
1442
  </select>
1443
  </label>
1444
  <label for="image-style">
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.9.1
9
  Author: Print, PDF, & Email by PrintFriendly
10
  Author URI: http://www.PrintFriendly.com
11
 
12
  Changelog :
13
+ 3.9.1 - Better print-only detection
14
+ 3.9.0 - Add new button
15
  3.8.7 - Bug fix.
16
  3.8.6 - Allow default image setting to be small medium or large.
17
  3.8.5 - Bug fix.
281
  * @since 3.3.0
282
  **/
283
  function print_only_override($content) {
284
+ $pattern = '/class=(["\']|["\']([^"\']*)\s)print-only(["\']|\s([^"\']*)["\'])/';
285
+ $pf_pattern = '/class=(["\']|["\']([^"\']*)\s)pf-content(["\']|\s([^"\']*)["\'])/';
286
+
287
  return (preg_match($pattern, $content) || preg_match($pf_pattern, $content)) ;
288
  }
289
 
575
 
576
  /* Section 1 options */
577
  if ( !isset( $input['button_type'] ) || !in_array( $input['button_type'], array(
578
+ 'pf-button.gif', 'pf-button-both.gif', 'pf-button-big.gif', 'pf-button-print-pdf-mail.png', // buttongroup1
579
  'button-print-grnw20.png', 'button-print-blu20.png', 'button-print-gry20.png', // buttongroup2
580
  'pf-icon-small.gif', 'pf-icon-both.gif','pf-icon.gif', 'text-only', // buttongroup3
581
  'custom-image', // custom
1276
  echo '<pre>' . __( 'Options:', $this->hook ) . '<br><br>' . print_r( $this->options, 1 ) . '</pre>';
1277
  }
1278
  ?>
1279
+
1280
+ <style type="text/css">
1281
+ input[type="radio"], img {
1282
+ vertical-align: middle;
1283
+ }
1284
+ </style>
1285
+
1286
  <div id="pf_settings" class="wrap">
1287
 
1288
  <div class="icon32" id="printfriendly"></div>
1299
  <?php $this->radio('pf-button.gif'); ?>
1300
  <?php $this->radio('pf-button-both.gif'); ?>
1301
  <?php $this->radio('pf-button-big.gif'); ?>
1302
+ <?php $this->radio('pf-button-print-pdf-mail.png'); ?>
1303
  </div>
1304
  <div id="buttongroup2">
1305
  <?php $this->radio('button-print-grnw20.png'); ?>
1449
  <option value="large" <?php selected( $this->options['images-size'], 'large' ); ?>><?php _e( "Large", $this->hook ); ?></option>
1450
  <option value="medium" <?php selected( $this->options['images-size'], 'medium' ); ?>><?php _e( "Medium", $this->hook ); ?></option>
1451
  <option value="small" <?php selected( $this->options['images-size'], 'small' ); ?>><?php _e( "Small", $this->hook ); ?></option>
1452
+ <option value="remove-images" <?php selected( $this->options['images-size'], 'remove-images' ); ?>><?php _e( "Remove Images", $this->hook ); ?></option>
1453
  </select>
1454
  </label>
1455
  <label for="image-style">
trunk/readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: printfriendly,joostdevalk, jrf
3
  Tags: print, pdf, email, print button, wp-print, print recipe, print post, print page, print widget, print plugin, printable, wp-pdf, pdf post, pdf page, pdf button, pdf widget, pdf plugin, woocommerce print, woocommerce pdf
4
  Requires at least: 2.8
5
- Tested up to: 4.7
6
- Stable tag: 3.8.7
7
 
8
 
9
  The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
@@ -140,6 +140,15 @@ You can [hide the Print, PDF, and Email button](https://support.printfriendly.co
140
 
141
  == Changelog ==
142
 
 
 
 
 
 
 
 
 
 
143
  = 3.8.7 =
144
  * Bug fix.
145
 
2
  Contributors: printfriendly,joostdevalk, jrf
3
  Tags: print, pdf, email, print button, wp-print, print recipe, print post, print page, print widget, print plugin, printable, wp-pdf, pdf post, pdf page, pdf button, pdf widget, pdf plugin, woocommerce print, woocommerce pdf
4
  Requires at least: 2.8
5
+ Tested up to: 4.8
6
+ Stable tag: 3.9.1
7
 
8
 
9
  The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
140
 
141
  == Changelog ==
142
 
143
+ = 3.9.1 =
144
+ * Better print-only detection
145
+
146
+ = 3.9.0 =
147
+ * Add new button
148
+
149
+ = 3.8.8 =
150
+ * Bug fix.
151
+
152
  = 3.8.7 =
153
  * Bug fix.
154