WP-Print - Version 2.57.2

Version Description

  • FIXED: Check both parent and child theme
Download this release

Release Info

Developer GamerZ
Plugin Icon WP-Print
Version 2.57.2
Comparing to
See all releases

Code changes from version 2.57.1 to 2.57.2

Files changed (4) hide show
  1. print-posts.php +2 -0
  2. print.php +5 -1
  3. readme.txt +5 -2
  4. wp-print.php +2 -2
print-posts.php CHANGED
@@ -22,6 +22,8 @@ global $text_direction;
22
  <meta name="Robots" content="noindex, nofollow" />
23
  <?php if(@file_exists(get_stylesheet_directory().'/print-css.css')): ?>
24
  <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
 
 
25
  <?php else: ?>
26
  <link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css.css'); ?>" type="text/css" media="screen, print" />
27
  <?php endif; ?>
22
  <meta name="Robots" content="noindex, nofollow" />
23
  <?php if(@file_exists(get_stylesheet_directory().'/print-css.css')): ?>
24
  <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
25
+ <?php elseif(@file_exists(get_template_directory().'/print-css.css')): ?>
26
+ <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
27
  <?php else: ?>
28
  <link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css.css'); ?>" type="text/css" media="screen, print" />
29
  <?php endif; ?>
print.php CHANGED
@@ -26,9 +26,13 @@ add_filter('comments_template', 'print_template_comments');
26
  ### Print Options
27
  $print_options = get_option('print_options');
28
 
29
- ### Load Print Post/Page Template
30
  if(file_exists(get_stylesheet_directory().'/print-posts.php')) {
31
  include(get_stylesheet_directory().'/print-posts.php');
 
 
 
 
32
  } else {
33
  include(WP_PLUGIN_DIR.'/wp-print/print-posts.php');
34
  }
26
  ### Print Options
27
  $print_options = get_option('print_options');
28
 
29
+ ### Load Print Post/Page Template from stylesheet dir (child theme)
30
  if(file_exists(get_stylesheet_directory().'/print-posts.php')) {
31
  include(get_stylesheet_directory().'/print-posts.php');
32
+ ### Then try template dir (parent theme)
33
+ } elseif(file_exists(get_template_directory().'/print-posts.php')) {
34
+ include(get_template_directory().'/print-posts.php');
35
+ ### Fall back to default template in plugin dir
36
  } else {
37
  include(WP_PLUGIN_DIR.'/wp-print/print-posts.php');
38
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: print, printer, wp-print
5
  Requires at least: 2.8
6
- Tested up to: 4.4
7
- Stable tag: 2.57.1
8
 
9
  Displays a printable version of your WordPress blog's post/page.
10
 
@@ -89,6 +89,9 @@ if(function_exists('wp_print')) {
89
 
90
 
91
  == Changelog ==
 
 
 
92
  = 2.57.1 =
93
  * NEW: Use translate.wordpress.org to translate the plugin
94
  * FIXED: Unable to update options
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: print, printer, wp-print
5
  Requires at least: 2.8
6
+ Tested up to: 4.5
7
+ Stable tag: 2.57.2
8
 
9
  Displays a printable version of your WordPress blog's post/page.
10
 
89
 
90
 
91
  == Changelog ==
92
+ = 2.57.2 =
93
+ * FIXED: Check both parent and child theme
94
+
95
  = 2.57.1 =
96
  * NEW: Use translate.wordpress.org to translate the plugin
97
  * FIXED: Unable to update options
wp-print.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-Print
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Displays a printable version of your WordPress blog's post/page.
6
- Version: 2.57.1
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-print
@@ -11,7 +11,7 @@ Text Domain: wp-print
11
 
12
 
13
  /*
14
- Copyright 2015 Lester Chan (email : lesterchan@gmail.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
3
  Plugin Name: WP-Print
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Displays a printable version of your WordPress blog's post/page.
6
+ Version: 2.57.2
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-print
11
 
12
 
13
  /*
14
+ Copyright 2016 Lester Chan (email : lesterchan@gmail.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by