WP-Print - Version 2.52

Version Description

  • FIXED: Added nonce to Options. Credits to Charlie Eriksen via Secunia SVCRP.
Download this release

Release Info

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

Code changes from version 2.50 to 2.52

Files changed (15) hide show
  1. print-comments.php +11 -15
  2. print-css-rtl.css +11 -16
  3. print-css.css +11 -15
  4. print-options.php +38 -40
  5. print-posts.php +12 -15
  6. print.php +11 -15
  7. readme.html +0 -552
  8. readme.txt +198 -10
  9. screenshot-1.png +0 -0
  10. screenshot-2.png +0 -0
  11. screenshot-3.png +0 -0
  12. screenshot-4.png +0 -0
  13. wp-print.mo +0 -0
  14. wp-print.php +19 -16
  15. wp-print.pot +0 -316
print-comments.php CHANGED
@@ -1,20 +1,16 @@
1
  <?php
2
  /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.7 Plugin: WP-Print 2.50 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Printer Friendly Comments Template |
14
- | - wp-content/plugins/wp-print/print-comments.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
  ?>
19
 
20
 
1
  <?php
2
  /*
3
+ * WordPress Plugin: WP-Print
4
+ * Copyright (c) 2012 Lester "GaMerZ" Chan
5
+ *
6
+ * File Written By:
7
+ * - Lester "GaMerZ" Chan
8
+ * - http://lesterchan.net
9
+ *
10
+ * File Information:
11
+ * - Printer Friendly Comments Template
12
+ * - wp-content/plugins/wp-print/print-comments.php
13
+ */
 
 
 
 
14
  ?>
15
 
16
 
print-css-rtl.css CHANGED
@@ -1,20 +1,15 @@
1
  /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.7 Plugin: WP-Print 2.50 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - CSS Style For Printer Friendly Page (RTL) |
13
- | - wp-content/plugins/wp-print/print-css-rtl.css |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
-
18
 
19
  Body {
20
  font-family: Tahoma, Arial, Sans-Serif;
1
  /*
2
+ * WordPress Plugin: WP-Print
3
+ * Copyright (c) 2012 Lester "GaMerZ" Chan
4
+ *
5
+ * File Written By:
6
+ * - Lester "GaMerZ" Chan
7
+ * - http://lesterchan.net
8
+ *
9
+ * File Information:
10
+ * - CSS Style For Printer Friendly Page (RTL)
11
+ * - wp-content/plugins/wp-print/print-css-rtl.css
12
+ */
 
 
 
 
 
13
 
14
  Body {
15
  font-family: Tahoma, Arial, Sans-Serif;
print-css.css CHANGED
@@ -1,19 +1,15 @@
1
  /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.7 Plugin: WP-Print 2.50 |
5
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - CSS Style For Printer Friendly Page |
13
- | - wp-content/plugins/wp-print/print-css.css |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
 
18
 
19
  Body {
1
  /*
2
+ * WordPress Plugin: WP-Print
3
+ * Copyright (c) 2012 Lester "GaMerZ" Chan
4
+ *
5
+ * File Written By:
6
+ * - Lester "GaMerZ" Chan
7
+ * - http://lesterchan.net
8
+ *
9
+ * File Information:
10
+ * - CSS Style For Printer Friendly Page
11
+ * - wp-content/plugins/wp-print/print-css.css
12
+ */
 
 
 
 
13
 
14
 
15
  Body {
print-options.php CHANGED
@@ -1,20 +1,16 @@
1
  <?php
2
  /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.7 Plugin: WP-Print 2.50 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Print Options Page |
14
- | - wp-content/plugins/wp-print/print-options.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
 
19
 
20
  ### Variables Variables Variables
@@ -28,6 +24,7 @@ $print_settings = array('print_options');
28
  ### Form Processing
29
  // Update Options
30
  if(!empty($_POST['Submit'])) {
 
31
  $print_options = array();
32
  $print_options['post_text'] = addslashes(trim(wp_filter_kses($_POST['print_post_text'])));
33
  $print_options['page_text'] = addslashes(trim(wp_filter_kses($_POST['print_page_text'])));
@@ -57,7 +54,7 @@ if(!empty($_POST['Submit'])) {
57
  }
58
  // Uninstall WP-Print
59
  if(!empty($_POST['do'])) {
60
- switch($_POST['do']) {
61
  case __('UNINSTALL WP-Print', 'wp-print') :
62
  if(trim($_POST['uninstall_print_yes']) == 'yes') {
63
  echo '<div id="message" class="updated fade">';
@@ -75,7 +72,7 @@ if(!empty($_POST['do'])) {
75
  }
76
  }
77
  echo '</p>';
78
- echo '</div>';
79
  $mode = 'end-UNINSTALL';
80
  }
81
  break;
@@ -87,7 +84,7 @@ switch($mode) {
87
  // Deactivating WP-Print
88
  case 'end-UNINSTALL':
89
  $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-print/wp-print.php';
90
- if(function_exists('wp_nonce_url')) {
91
  $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-print/wp-print.php');
92
  }
93
  echo '<div class="wrap">';
@@ -125,10 +122,11 @@ switch($mode) {
125
  /* ]]> */
126
  </script>
127
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
128
- <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
129
- <div class="wrap">
 
130
  <?php screen_icon(); ?>
131
- <h2><?php _e('Print Options', 'wp-print'); ?></h2>
132
  <h3><?php _e('Print Styles', 'wp-print'); ?></h3>
133
  <table class="form-table">
134
  <tr>
@@ -150,13 +148,13 @@ switch($mode) {
150
  $print_icon = $print_options['print_icon'];
151
  $print_icon_url = plugins_url('wp-print/images');
152
  $print_icon_path = WP_PLUGIN_DIR.'/wp-print/images';
153
- if($handle = @opendir($print_icon_path)) {
154
- while (false !== ($filename = readdir($handle))) {
155
  if ($filename != '.' && $filename != '..') {
156
  if(is_file($print_icon_path.'/'.$filename)) {
157
  echo '<p>';
158
  if($print_icon == $filename) {
159
- echo '<input type="radio" name="print_icon" value="'.$filename.'" checked="checked" />'."\n";
160
  } else {
161
  echo '<input type="radio" name="print_icon" value="'.$filename.'" />'."\n";
162
  }
@@ -165,8 +163,8 @@ switch($mode) {
165
  echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
166
  echo '</p>'."\n";
167
  }
168
- }
169
- }
170
  closedir($handle);
171
  }
172
  ?>
@@ -203,54 +201,54 @@ switch($mode) {
203
  </select>
204
  </td>
205
  </tr>
206
- <tr>
207
  <th scope="row" valign="top"><?php _e('Print Links?', 'wp-print'); ?></th>
208
  <td>
209
  <select name="print_links" size="1">
210
  <option value="1"<?php selected('1', $print_options['links']); ?>><?php _e('Yes', 'wp-print'); ?></option>
211
  <option value="0"<?php selected('0', $print_options['links']); ?>><?php _e('No', 'wp-print'); ?></option>
212
  </select>
213
- </td>
214
  </tr>
215
- <tr>
216
  <th scope="row" valign="top"><?php _e('Print Images?', 'wp-print'); ?></th>
217
  <td>
218
  <select name="print_images" size="1">
219
  <option value="1"<?php selected('1', $print_options['images']); ?>><?php _e('Yes', 'wp-print'); ?></option>
220
  <option value="0"<?php selected('0', $print_options['images']); ?>><?php _e('No', 'wp-print'); ?></option>
221
  </select>
222
- </td>
223
  </tr>
224
- <tr>
225
  <th scope="row" valign="top"><?php _e('Print Videos?', 'wp-print'); ?></th>
226
  <td>
227
  <select name="print_videos" size="1">
228
  <option value="1"<?php selected('1', $print_options['videos']); ?>><?php _e('Yes', 'wp-print'); ?></option>
229
  <option value="0"<?php selected('0', $print_options['videos']); ?>><?php _e('No', 'wp-print'); ?></option>
230
  </select>
231
- </td>
232
  </tr>
233
- <tr>
234
- <th scope="row" valign="top">
235
  <?php _e('Disclaimer/Copyright Text?', 'wp-print'); ?>
236
  <br /><br />
237
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-print'); ?>" onclick="print_default_templates('disclaimer');" class="button" />
238
  </th>
239
  <td>
240
- <textarea rows="2" cols="80" name="print_disclaimer" id="print_template_disclaimer"><?php echo htmlspecialchars(stripslashes($print_options['disclaimer'])); ?></textarea><br /><?php _e('HTML is allowed.', 'wp-print'); ?><br />
241
- </td>
242
  </tr>
243
  </table>
244
  <p class="submit">
245
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-print'); ?>" />
246
  </p>
247
  </div>
248
- </form>
249
  <p>&nbsp;</p>
250
 
251
  <!-- Uninstall WP-Print -->
252
- <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>?page=<?php echo plugin_basename(__FILE__); ?>">
253
- <div class="wrap">
254
  <h3><?php _e('Uninstall WP-Print', 'wp-print'); ?></h3>
255
  <p>
256
  <?php _e('Deactivating WP-Print plugin does not remove any data that may have been created, such as the print options. To completely remove this plugin, you can uninstall it here.', 'wp-print'); ?>
@@ -285,7 +283,7 @@ switch($mode) {
285
  <input type="checkbox" name="uninstall_print_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-print'); ?><br /><br />
286
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-Print', 'wp-print'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-Print From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-print'); ?>')" />
287
  </p>
288
- </div>
289
  </form>
290
  <?php
291
  } // End switch($mode)
1
  <?php
2
  /*
3
+ * WordPress Plugin: WP-Print
4
+ * Copyright (c) 2013 Lester "GaMerZ" Chan
5
+ *
6
+ * File Written By:
7
+ * - Lester "GaMerZ" Chan
8
+ * - http://lesterchan.net
9
+ *
10
+ * File Information:
11
+ * - Print Options Page
12
+ * - wp-content/plugins/wp-print/print-options.php
13
+ */
 
 
 
 
14
 
15
 
16
  ### Variables Variables Variables
24
  ### Form Processing
25
  // Update Options
26
  if(!empty($_POST['Submit'])) {
27
+ check_admin_referer('wp-print_options');
28
  $print_options = array();
29
  $print_options['post_text'] = addslashes(trim(wp_filter_kses($_POST['print_post_text'])));
30
  $print_options['page_text'] = addslashes(trim(wp_filter_kses($_POST['print_page_text'])));
54
  }
55
  // Uninstall WP-Print
56
  if(!empty($_POST['do'])) {
57
+ switch($_POST['do']) {
58
  case __('UNINSTALL WP-Print', 'wp-print') :
59
  if(trim($_POST['uninstall_print_yes']) == 'yes') {
60
  echo '<div id="message" class="updated fade">';
72
  }
73
  }
74
  echo '</p>';
75
+ echo '</div>';
76
  $mode = 'end-UNINSTALL';
77
  }
78
  break;
84
  // Deactivating WP-Print
85
  case 'end-UNINSTALL':
86
  $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-print/wp-print.php';
87
+ if(function_exists('wp_nonce_url')) {
88
  $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-print/wp-print.php');
89
  }
90
  echo '<div class="wrap">';
122
  /* ]]> */
123
  </script>
124
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
125
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
126
+ <?php wp_nonce_field('wp-print_options'); ?>
127
+ <div class="wrap">
128
  <?php screen_icon(); ?>
129
+ <h2><?php _e('Print Options', 'wp-print'); ?></h2>
130
  <h3><?php _e('Print Styles', 'wp-print'); ?></h3>
131
  <table class="form-table">
132
  <tr>
148
  $print_icon = $print_options['print_icon'];
149
  $print_icon_url = plugins_url('wp-print/images');
150
  $print_icon_path = WP_PLUGIN_DIR.'/wp-print/images';
151
+ if($handle = @opendir($print_icon_path)) {
152
+ while (false !== ($filename = readdir($handle))) {
153
  if ($filename != '.' && $filename != '..') {
154
  if(is_file($print_icon_path.'/'.$filename)) {
155
  echo '<p>';
156
  if($print_icon == $filename) {
157
+ echo '<input type="radio" name="print_icon" value="'.$filename.'" checked="checked" />'."\n";
158
  } else {
159
  echo '<input type="radio" name="print_icon" value="'.$filename.'" />'."\n";
160
  }
163
  echo '&nbsp;&nbsp;&nbsp;('.$filename.')';
164
  echo '</p>'."\n";
165
  }
166
+ }
167
+ }
168
  closedir($handle);
169
  }
170
  ?>
201
  </select>
202
  </td>
203
  </tr>
204
+ <tr>
205
  <th scope="row" valign="top"><?php _e('Print Links?', 'wp-print'); ?></th>
206
  <td>
207
  <select name="print_links" size="1">
208
  <option value="1"<?php selected('1', $print_options['links']); ?>><?php _e('Yes', 'wp-print'); ?></option>
209
  <option value="0"<?php selected('0', $print_options['links']); ?>><?php _e('No', 'wp-print'); ?></option>
210
  </select>
211
+ </td>
212
  </tr>
213
+ <tr>
214
  <th scope="row" valign="top"><?php _e('Print Images?', 'wp-print'); ?></th>
215
  <td>
216
  <select name="print_images" size="1">
217
  <option value="1"<?php selected('1', $print_options['images']); ?>><?php _e('Yes', 'wp-print'); ?></option>
218
  <option value="0"<?php selected('0', $print_options['images']); ?>><?php _e('No', 'wp-print'); ?></option>
219
  </select>
220
+ </td>
221
  </tr>
222
+ <tr>
223
  <th scope="row" valign="top"><?php _e('Print Videos?', 'wp-print'); ?></th>
224
  <td>
225
  <select name="print_videos" size="1">
226
  <option value="1"<?php selected('1', $print_options['videos']); ?>><?php _e('Yes', 'wp-print'); ?></option>
227
  <option value="0"<?php selected('0', $print_options['videos']); ?>><?php _e('No', 'wp-print'); ?></option>
228
  </select>
229
+ </td>
230
  </tr>
231
+ <tr>
232
+ <th scope="row" valign="top">
233
  <?php _e('Disclaimer/Copyright Text?', 'wp-print'); ?>
234
  <br /><br />
235
  <input type="button" name="RestoreDefault" value="<?php _e('Restore Default Template', 'wp-print'); ?>" onclick="print_default_templates('disclaimer');" class="button" />
236
  </th>
237
  <td>
238
+ <textarea rows="2" cols="80" name="print_disclaimer" id="print_template_disclaimer"><?php echo htmlspecialchars(stripslashes($print_options['disclaimer'])); ?></textarea><br /><?php _e('HTML is allowed.', 'wp-print'); ?><br />
239
+ </td>
240
  </tr>
241
  </table>
242
  <p class="submit">
243
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-print'); ?>" />
244
  </p>
245
  </div>
246
+ </form>
247
  <p>&nbsp;</p>
248
 
249
  <!-- Uninstall WP-Print -->
250
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
251
+ <div class="wrap">
252
  <h3><?php _e('Uninstall WP-Print', 'wp-print'); ?></h3>
253
  <p>
254
  <?php _e('Deactivating WP-Print plugin does not remove any data that may have been created, such as the print options. To completely remove this plugin, you can uninstall it here.', 'wp-print'); ?>
283
  <input type="checkbox" name="uninstall_print_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-print'); ?><br /><br />
284
  <input type="submit" name="do" value="<?php _e('UNINSTALL WP-Print', 'wp-print'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-Print From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-print'); ?>')" />
285
  </p>
286
+ </div>
287
  </form>
288
  <?php
289
  } // End switch($mode)
print-posts.php CHANGED
@@ -1,20 +1,16 @@
1
  <?php
2
  /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.7 Plugin: WP-Print 2.50 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Printer Friendly Post/Page Template |
14
- | - wp-content/plugins/wp-print/print-posts.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
  ?>
19
 
20
  <?php global $text_direction; ?>
@@ -36,6 +32,7 @@
36
  <link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css-rtl.css'); ?>" type="text/css" media="screen, print" />
37
  <?php endif; ?>
38
  <?php endif; ?>
 
39
  </head>
40
  <body>
41
  <p style="text-align: center;"><strong>- <?php bloginfo('name'); ?> - <span dir="ltr"><?php bloginfo('url')?></span> -</strong></p>
1
  <?php
2
  /*
3
+ * WordPress Plugin: WP-Print
4
+ * Copyright (c) 2012 Lester "GaMerZ" Chan
5
+ *
6
+ * File Written By:
7
+ * - Lester "GaMerZ" Chan
8
+ * - http://lesterchan.net
9
+ *
10
+ * File Information:
11
+ * - Printer Friendly Post/Page Template
12
+ * - wp-content/plugins/wp-print/print-posts.php
13
+ */
 
 
 
 
14
  ?>
15
 
16
  <?php global $text_direction; ?>
32
  <link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css-rtl.css'); ?>" type="text/css" media="screen, print" />
33
  <?php endif; ?>
34
  <?php endif; ?>
35
+ <link rel="canonical" href="<?php the_permalink(); ?>" />
36
  </head>
37
  <body>
38
  <p style="text-align: center;"><strong>- <?php bloginfo('name'); ?> - <span dir="ltr"><?php bloginfo('url')?></span> -</strong></p>
print.php CHANGED
@@ -1,20 +1,16 @@
1
  <?php
2
  /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.7 Plugin: WP-Print 2.50 |
6
- | Copyright (c) 2008 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Process Printing Page |
14
- | - wp-content/plugins/wp-print/print.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
 
19
 
20
  ### Variables
1
  <?php
2
  /*
3
+ * WordPress Plugin: WP-Print
4
+ * Copyright (c) 2012 Lester "GaMerZ" Chan
5
+ *
6
+ * File Written By:
7
+ * - Lester "GaMerZ" Chan
8
+ * - http://lesterchan.net
9
+ *
10
+ * File Information:
11
+ * - Process Printing Page
12
+ * - wp-content/plugins/wp-print/print.php
13
+ */
 
 
 
 
14
 
15
 
16
  ### Variables
readme.html DELETED
@@ -1,552 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
- <head>
4
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
5
- <title>WP-Print 2.50 Readme</title>
6
- <style type="text/css" media="screen">
7
- /* Default Style */
8
- BODY {
9
- font-family: Verdana, Arial;
10
- font-size: 12px;
11
- color: #000000;
12
- background: #FFFFFF;
13
- }
14
- P {
15
- padding-left: 10px;
16
- }
17
- BLOCKQUOTE {
18
- margin: 10px 20px 0px 20px;
19
- padding: 10px;
20
- border: 1px solid #8d8d8d;
21
- background-color: #f5f5f5;
22
- }
23
- LI {
24
- margin-top: 20px;
25
- }
26
- UL LI UL LI {
27
- margin-top: 10px;
28
- }
29
- A, A:active, A:link, A:visited {
30
- color: #2d3a4c;
31
- text-decoration: none;
32
- }
33
- A:hover {
34
- color: #5577a5;
35
- text-decoration: underline;
36
- }
37
- /* Place Holder Style */
38
- #Container {
39
- width: 780px;
40
- margin-left: auto;
41
- margin-right: auto;
42
- }
43
- #Content {
44
- background-color: #fafafa;
45
- border: 1px solid #a2b6cb;
46
- padding: 10px;
47
- margin-top: -13px;
48
- }
49
- /* Title Style */
50
- #Title {
51
- font-family: Verdana, Arial;
52
- font-size: 22px;
53
- font-weight: bold;
54
- color: #389aff;
55
- border-bottom: 1px solid #389aff;
56
- margin-bottom: 10px;
57
- }
58
- .SubTitle {
59
- font-family: Verdana, Arial;
60
- font-size: 18px;
61
- font-weight: bold;
62
- color: #5b87b4;
63
- }
64
- .SubSubTitle {
65
- font-family: Verdana, Arial;
66
- font-size: 14px;
67
- font-weight: bold;
68
- color: #73a4d6;
69
- }
70
- /* Tabs */
71
- UL#Tabs {
72
- font-family: Verdana, Arial;
73
- font-size: 12px;
74
- font-weight: bold;
75
- list-style-type: none;
76
- padding-bottom: 28px;
77
- border-bottom: 1px solid #a2b6cb;
78
- margin-bottom: 12px;
79
- z-index: 1;
80
- }
81
- #Tabs LI.Tab {
82
- float: right;
83
- height: 25px;
84
- background-color: #deedfb;
85
- margin: 2px 0px 0px 5px;
86
- border: 1px solid #a2b6cb;
87
- }
88
- #Tabs LI.Tab A {
89
- float: left;
90
- display: block;
91
- color: #666666;
92
- text-decoration: none;
93
- padding: 5px;
94
- }
95
- #Tabs LI.Tab A:hover {
96
- background-color: #bfe0fe;
97
- border-bottom: 1px solid #bfe0fe;
98
- }
99
- /* Selected Tab */
100
- #Tabs LI.SelectedTab {
101
- float: right;
102
- height: 25px;
103
- background-color: #fafafa;
104
- margin: 2px 0px 0px 5px;
105
- border-top: 1px solid #a2b6cb;
106
- border-right: 1px solid #a2b6cb;
107
- border-bottom: 1px solid #fafafa;
108
- border-left: 1px solid #a2b6cb;
109
- }
110
- #Tabs LI.SelectedTab A {
111
- float: left;
112
- display: block;
113
- color: #666666;
114
- text-decoration: none;
115
- padding: 5px;
116
- cursor: default;
117
- }
118
- /* Copyright */
119
- #Copyright {
120
- text-align: center;
121
- }
122
- </style>
123
- <script type="text/javascript">
124
- /* <![CDATA[*/
125
- // Index Page
126
- function index() {
127
- // Tab
128
- document.getElementById('IndexTab').className = 'SelectedTab';
129
- document.getElementById('ChangelogTab').className = 'Tab';
130
- document.getElementById('InstallTab').className = 'Tab';
131
- document.getElementById('UpgradeTab').className = 'Tab';
132
- document.getElementById('UsageTab').className = 'Tab';
133
- // Page
134
- document.getElementById('Index').style.display= 'block';
135
- document.getElementById('Changelog').style.display = 'none';
136
- document.getElementById('Install').style.display = 'none';
137
- document.getElementById('Upgrade').style.display = 'none';
138
- document.getElementById('Usage').style.display = 'none';
139
- }
140
- // Changelog Page
141
- function changelog() {
142
- // Tab
143
- document.getElementById('IndexTab').className = 'Tab';
144
- document.getElementById('ChangelogTab').className = 'SelectedTab';
145
- document.getElementById('InstallTab').className = 'Tab';
146
- document.getElementById('UpgradeTab').className = 'Tab';
147
- document.getElementById('UsageTab').className = 'Tab';
148
- // Page
149
- document.getElementById('Index').style.display = 'none';
150
- document.getElementById('Changelog').style.display = 'block';
151
- document.getElementById('Install').style.display = 'none';
152
- document.getElementById('Upgrade').style.display = 'none';
153
- document.getElementById('Usage').style.display = 'none';
154
- }
155
- // Installation Page
156
- function install() {
157
- // Tab
158
- document.getElementById('IndexTab').className = 'Tab';
159
- document.getElementById('ChangelogTab').className = 'Tab';
160
- document.getElementById('InstallTab').className = 'SelectedTab';
161
- document.getElementById('UpgradeTab').className = 'Tab';
162
- document.getElementById('UsageTab').className = 'Tab';
163
- // Page
164
- document.getElementById('Index').style.display= 'none';
165
- document.getElementById('Changelog').style.display = 'none';
166
- document.getElementById('Install').style.display = 'block';
167
- document.getElementById('Upgrade').style.display = 'none';
168
- document.getElementById('Usage').style.display = 'none';
169
- }
170
- // Upgrade Page
171
- function upgrade() {
172
- // Tab
173
- document.getElementById('IndexTab').className = 'Tab';
174
- document.getElementById('ChangelogTab').className = 'Tab';
175
- document.getElementById('InstallTab').className = 'Tab';
176
- document.getElementById('UpgradeTab').className = 'SelectedTab';
177
- document.getElementById('UsageTab').className = 'Tab';
178
- // Page
179
- document.getElementById('Index').style.display= 'none';
180
- document.getElementById('Changelog').style.display = 'none';
181
- document.getElementById('Install').style.display = 'none';
182
- document.getElementById('Upgrade').style.display = 'block';
183
- document.getElementById('Usage').style.display = 'none';
184
- }
185
- // Usage Page
186
- function usage() {
187
- // Tab
188
- document.getElementById('IndexTab').className = 'Tab';
189
- document.getElementById('ChangelogTab').className = 'Tab';
190
- document.getElementById('InstallTab').className = 'Tab';
191
- document.getElementById('UpgradeTab').className = 'Tab';
192
- document.getElementById('UsageTab').className = 'SelectedTab';
193
- // Page
194
- document.getElementById('Index').style.display= 'none';
195
- document.getElementById('Changelog').style.display = 'none';
196
- document.getElementById('Install').style.display = 'none';
197
- document.getElementById('Upgrade').style.display = 'none';
198
- document.getElementById('Usage').style.display = 'block';
199
- }
200
- /* ]]> */
201
- </script>
202
- </head>
203
- <body>
204
- <div id="Container">
205
- <!-- Title -->
206
- <div id="Title">WP-Print 2.50&nbsp;&nbsp;&nbsp;<span style="color: #aaaaaa;">Readme</span></div>
207
-
208
- <!-- Tabs -->
209
- <ul id="Tabs">
210
- <li id="UsageTab" class="Tab"><a href="#Usage" onclick="usage(); return false;" title="Usage Instructions">Usage</a></li>
211
- <li id="UpgradeTab" class="Tab"><a href="#Upgrade" onclick="upgrade(); return false;" title="Upgrade Instructions">Upgrade</a></li>
212
- <li id="InstallTab" class="Tab"><a href="#Installation" onclick="install(); return false;" title="Installation Instructions">Installation</a></li>
213
- <li id="ChangelogTab" class="Tab"><a href="#Changelog" onclick="changelog(); return false;" title="Changelog">Changelog</a></li>
214
- <li id="IndexTab" class="SelectedTab"><a href="#Index" onclick="index(); return false;" title="Index Instructions">Index</a></li>
215
- </ul>
216
-
217
- <!-- Content -->
218
- <div id="Content">
219
- <!-- Index -->
220
- <div id="Index">
221
- <div class="SubTitle">&raquo; Index</div>
222
- <div class="SubSubTitle">Plugin Information</div>
223
- <p>
224
- <strong>Author:</strong><br />
225
- <strong>&raquo;</strong> Lester 'GaMerZ' Chan
226
- </p>
227
- <p>
228
- <strong>Website:</strong><br />
229
- <strong>&raquo;</strong> <a href="http://lesterchan.net/" title="http://lesterchan.net/">http://lesterchan.net/</a>
230
- </p>
231
- <p>
232
- <strong>Features:</strong><br />
233
- <strong>&raquo;</strong> Displays a printable version of your WordPress blog's post/page.
234
- </p>
235
- <p>
236
- <strong>Download:</strong><br />
237
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.50.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.50.zip">WP-Print 2.50 For WordPress 2.7.x And 2.8.x</a><br />
238
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.31.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.31.zip">WP-Print 2.31 For WordPress 2.5.x And 2.6.x</a><br />
239
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.20.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.20.zip">WP-Print 2.20 For WordPress 2.1.x, 2.2.x And 2.3.x</a><br />
240
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.06.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.06.zip">WP-Print 2.06 For WordPress 2.0.x</a><br />
241
- <strong>&raquo;</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.00.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.00.zip">WP-Print 2.00 For WordPress 1.5.2</a>
242
- </p>
243
- <p>
244
- <strong>Screenshots:</strong><br />
245
- <strong>&raquo;</strong> <a href="http://lesterchan.net/wordpress/screenshots/browse/wp-print/" title="http://lesterchan.net/wordpress/screenshots/browse/wp-print/">http://lesterchan.net/wordpress/screenshots/browse/wp-print/</a>
246
- </p>
247
- <p>
248
- <strong>Demo:</strong><br />
249
- <strong>&raquo;</strong> <a href="http://lesterchan.net/wordpress/2006/07/05/donations/print/" title="http://lesterchan.net/wordpress/2006/07/05/donations/print/">http://lesterchan.net/wordpress/2006/07/05/donations/print/</a>
250
- </p>
251
- <p>
252
- <strong>Development:</strong><br />
253
- <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-print/" title="http://dev.wp-plugins.org/browser/wp-print/">http://dev.wp-plugins.org/browser/wp-print/</a>
254
- </p>
255
- <p>
256
- <strong>Translations:</strong><br />
257
- <strong>&raquo;</strong> <a href="http://dev.wp-plugins.org/browser/wp-print/i18n/" title="http://dev.wp-plugins.org/browser/wp-print/i18n/">http://dev.wp-plugins.org/browser/wp-print/i18n/</a>
258
- </p>
259
- <p>
260
- <strong>Support Forums:</strong><br />
261
- <strong>&raquo;</strong> <a href="http://forums.lesterchan.net/index.php?board=18.0" title="http://forums.lesterchan.net/index.php?board=18.0">http://forums.lesterchan.net/index.php?board=18.0</a>
262
- </p>
263
- <p>
264
- <strong>Credits:</strong><br />
265
- <strong>&raquo;</strong> Icons courtesy of <a href="http://www.famfamfam.com/">FamFamFam</a>.<br />
266
- <strong>&raquo;</strong> Do Not Print idea by <a href="http://www.nilpo.com/">Robert "Nilpo" Dunham</a>.<br />
267
- <strong>&raquo;</strong> __ngetext() by <a href="http://hweia.ru/" title="http://hweia.ru/">Anna Ozeritskaya</a>.<br />
268
- <strong>&raquo;</strong> Right To Left Language Support by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a>.
269
- </p>
270
- <p>
271
- <strong>Note:</strong><br />
272
- <strong>&raquo;</strong> The <strong>Changelog</strong>, <strong>Installation</strong>, <strong>Upgrade</strong>, <strong>Usage</strong> Tab at the top of the page.<br />
273
- </p>
274
- <p>
275
- <strong>Donations:</strong><br />
276
- <strong>&raquo;</strong> I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
277
- <script type="text/javascript">
278
- /* <![CDATA[*/
279
- document.write(' <strong>lesterchan@gmail.com</strong>.');
280
- /* ]]> */
281
- </script>
282
- </p>
283
- </div>
284
-
285
- <!-- Changelog -->
286
- <div id="Changelog" style="display: none;">
287
- <div class="SubTitle">&raquo; Changelog</div>
288
- <ul>
289
- <li>
290
- <strong>Version 2.50 (01-06-2009)</strong>
291
- <ul>
292
- <li>NEW: Uses jQuery Framework</li>
293
- <li>NEW: [donotprint][/donotprint] ShortCode Will Not Be Displayed As Well When Using WP-Email (Refer To Usage Tab)</li>
294
- <li>NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()</li>
295
- <li>FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']</li>
296
- <li>FIXED: Nested ShortCode Issues</li>
297
- </ul>
298
- </li>
299
- <li>
300
- <strong>Version 2.40 (12-12-2008)</strong>
301
- <ul>
302
- <li>NEW: Works For WordPress 2.7 Only</li>
303
- <li>NEW: Better Translation Using __ngetext() by <a href="http://hweia.ru/" title="http://hweia.ru/">Anna Ozeritskaya</a></li>
304
- <li>NEW: Right To Left Language Support by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
305
- <li>NEW: Call print_textdomain() In print_init() by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
306
- <li>NEW: Replace "text_direction" Option With $text_direction And language_attributes() by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
307
- <li>NEW: Added "print-css-rtl.css" by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
308
- <li>NEW: Page Title Is Now "Post Title -> Print" Instead Of "Print -> Post Title" by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
309
- <li>NEW: Modified "print-css.css" To Hide "comments_controls" Element For Print by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
310
- <li>FIXED: Footnotes Referencing Is Now "link1 <sup>[1]</sup>" Instead Of "[1] link1" by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
311
- <li>FIXED: Remove chunk_split() As Browser Will Try To Wrap Word Boundaries Based On Page Width by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
312
- <li>FIXED: Remove [print_link] ShortCode In Print Pages</li>
313
- </ul>
314
- </li>
315
- <li>
316
- <strong>Version 2.31 (16-07-2008)</strong>
317
- <ul>
318
- <li>NEW: Works For WordPress 2.6</li>
319
- <li>NEW: Added donotprint ShortCode. See Usage Tab</li>
320
- <li>NEW: WP-Print Will Load print-posts.php And print-comments.php Templates From Your Theme Directory First If The Exist</li>
321
- <li>FIXED: Replace &lt;center&gt; With &lt;div style="margin: 0px auto 0px auto;"&gt;</li>
322
- </ul>
323
- </li>
324
- <li>
325
- <strong>Version 2.30 (01-06-2008)</strong>
326
- <ul>
327
- <li>NEW: Works For WordPress 2.5 Only</li>
328
- <li>NEW: WP-Print Will Load 'print-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'print-css.css' By WP-Print</li>
329
- <li>NEW: Uses Shortcode API</li>
330
- <li>NEW: Added "Right To Left" And "Left To Right Text" Direction Option</li>
331
- <li>NEW: Option To Remove Videos From Post</li>
332
- <li>NEW: Duplicate Links Now Uses A Single Number And Printed Only Once By <a href="http://www.cneophytou.com/">Constantinos Neophytou</a></li>
333
- <li>NEW: &lt;IMG&gt; And &lt;A&gt; Tag Now Matches Single Quotes By <a href="http://www.cneophytou.com/">Constantinos Neophytou</a></li>
334
- <li>NEW: Uses /wp-print/ Folder Instead Of /print/</li>
335
- <li>NEW: Uses wp-print.php Instead Of print.php</li>
336
- <li>NEW: Changed wp-print.php To print-posts.php</li>
337
- <li>NEW: Changed wp-print-comments.php To print-comments.php</li>
338
- <li>NEW: Changed wp-print-css.css To print-css.css</li>
339
- <li>FIXED: Comment Type Not Translated</li>
340
- </ul>
341
- </li>
342
- <li>
343
- <strong>Version 2.20 (01-10-2007)</strong>
344
- <ul>
345
- <li>NEW: Works For WordPress 2.3 Only</li>
346
- <li>NEW: Ability To Embed [print_link] Into Excerpt</li>
347
- <li>NEW: wp-print-css.css Now Controls The CSS Styles For The Printer Friendly Page</li>
348
- <li>NEW: Disclaimer/Copyright Text Option By <a href="http://www.journalsoftheheart.com/">Duane Craig</a></li>
349
- <li>NEW: Anchor Link To Comments By <a href="http://www.reinventia.net/">Reinventia</a></li>
350
- <li>NEW: Collapsable Comments By <a href="http://www.reinventia.net/">Reinventia</a></li>
351
- <li>NEW: Ability To Uninstall WP-Print</li>
352
- <li>FIXED: If There Is No Trailing Slash In Your Permalink, WP-Print Will Add It For You</li>
353
- </ul>
354
- </li>
355
- <li>
356
- <strong>Version 2.11 (01-06-2007)</strong>
357
- <ul>
358
- <li>NEW: Putting [print_link] In Your Post/Page Content Will Display A Link To The Printable Post/Page</li>
359
- <li>FIXED: Worked With Polyglot Plugin, Fixed By <a href="http://www.getoto.net/">zeridon</a></li>
360
- <li>FIXED: Wrong URL If Front Page Is A Static Page</li>
361
- </ul>
362
- </li>
363
- <li>
364
- <strong>Version 2.10 (01-02-2007)</strong>
365
- <ul>
366
- <li>NEW: Added Fam Fam Fam's Printer Icon</li>
367
- <li>NEW: Works For WordPress 2.1 Only</li>
368
- <li>NEW: Localize WP-Print</li>
369
- <li>NEW: Ability To Configure The Text For Print Links Via 'WP-Admin -> Options -> Print'</li>
370
- <li>NEW: The Text For Print Links Can No Longer Be Pass To The Function print_link() or print_link_image()</li>
371
- <li>FIXED: MUltiple URL Type Fixed By (Virgil - <a href="http://virgil.gr">http://virgil.gr</a>)</li>
372
- <li>FIXED: 'Click Here To Print' Will Be Hidden When Printing By <a href="http://blog.fileville.net/">Joe (Ttech)</a></li>
373
- </ul>
374
- </li>
375
- <li>
376
- <strong>Version 2.06 (01-10-2006)</strong>
377
- <ul>
378
- <li>NEW: Used Default Date/Time Format Under WordPress Options</li>
379
- <li>NEW: Added robots: noindex To Printer Friendly Pages</li>
380
- <li>NEW: Added rel="nofollow" To All Links Generated By WP-Print</li>
381
- <li>FIXED: &lt;abbr&gt; Tag Mixed Up With &lt;a&gt;</li>
382
- <li>FIXED: PHP5 Compatibility Issue</li>
383
- <li>FIXED: Long URL Will Not Break Into More Than 1 Line</li>
384
- </ul>
385
- </li>
386
- <li>
387
- <strong>Version 2.05 (01-06-2006)</strong>
388
- <ul>
389
- <li>NEW: Added Print Options In WP Administration Panel Under 'Options -> Print'</li>
390
- <li>NEW: Print Administration Panel And The Code That WP-Print Generated Is XHTML 1.0 Transitional</li>
391
- <li>FIXED: Comment's Content Formatting</li>
392
- </ul>
393
- </li>
394
- <li>
395
- <strong>Version 2.04 (01-04-2006)</strong>
396
- <ul>
397
- <li>NEW: Able To Print Comments Together With Post Using $can_print_comments In wp-print.php</li>
398
- <li>NEW: Moved wp-print.php To Plugin Folder</li>
399
- <li>FIXED: Removed Link From Post Comment Count And Post Category</li>
400
- </ul>
401
- </li>
402
- <li>
403
- <strong>Version 2.03 (01-03-2006)</strong>
404
- <ul>
405
- <li>NEW: Added Print Image With print_link_image()</li>
406
- <li>NEW: Automatically Break To Next Line If Link Contains More Than 100 Chars</li>
407
- <li>FIXED: Comment Numbers Showing In Password Protected Post</li>
408
- </ul>
409
- </li>
410
- <li>
411
- <strong>Version 2.02 (01-02-2006)</strong>
412
- <ul>
413
- <li>FIXED: Able To View Password Protected Blog</li>
414
- </ul>
415
- </li>
416
- <li>
417
- <strong>Version 2.01 (01-01-2006)</strong>
418
- <ul>
419
- <li>NEW: Compatible With WordPress 2.0</li>
420
- <li>NEW: Automatically Detect Whether You Are Using Nice Permalink</li>
421
- <li>NEW: Automated Permalink</li>
422
- <li>NEW: Now You Only Need To Insert 1 Line Into Your index.php Of Your Theme</li>
423
- <li>NEW: GPL License Added</li>
424
- <li>FIXED: Links Not Displaying Properly When Printing More Than 1 Post On A Single Page</li>
425
- </ul>
426
- </li>
427
- <li>
428
- <strong>Version 2.00a (17-11-2005)</strong>
429
- <ul>
430
- <li>NEW: Permlink For The Page Feature</li>
431
- </ul>
432
- </li>
433
- <li>
434
- <strong>Version 2.00 (10-11-2005)</strong>
435
- <ul>
436
- <li>NEW: Print Out A Summary Of URLS In The Post At The Bottom Of The Page</li>
437
- </ul>
438
- </li>
439
- </ul>
440
- </div>
441
-
442
- <!-- Installation Instructions -->
443
- <div id="Install" style="display: none;">
444
- <div class="SubTitle">&raquo; Installation Instructions</div>
445
- <ol>
446
- <li>
447
- Open <strong>wp-content/plugins</strong> Folder
448
- </li>
449
- <li>
450
- Put:
451
- <blockquote>Folder: wp-print</blockquote>
452
- </li>
453
- <li>
454
- <strong>Activate</strong> WP-Print Plugin
455
- </li>
456
- <li>
457
- You Need To Re-Generate The Permalink (<strong>WP-Admin -> Settings -> Permalinks -> Save Changes</strong>)
458
- </li>
459
- <li>
460
- Refer To <strong>Usage</strong> For Further Instructions
461
- </li>
462
- </ol>
463
- </div>
464
-
465
- <!-- Upgrade Instructions -->
466
- <div id="Upgrade" style="display: none;">
467
- <div class="SubTitle">&raquo; Upgrade Instructions</div>
468
- <div class="SubSubTitle">From v2.0x To v2.50</div>
469
- <ol>
470
- <li>
471
- <strong>Deactivate</strong> WP-Print Plugin
472
- </li>
473
- <li>
474
- Open <strong>wp-content/plugins</strong> Folder
475
- </li>
476
- <li>
477
- Put/Overwrite:
478
- <blockquote>Folder: wp-print</blockquote>
479
- </li>
480
- <li>
481
- Delete this folder if exists:
482
- <blockquote>
483
- Folder: print
484
- </blockquote>
485
- </li>
486
- <li>
487
- <strong>Activate</strong> WP-Print Plugin
488
- </li>
489
- <li>
490
- You Need To Re-Generate The Permalink (<strong>WP-Admin -> Settings -> Permalinks -> Save Changes</strong>)
491
- </li>
492
- <li>
493
- Refer To <strong>Usage</strong> For Further Instructions
494
- </li>
495
- </ol>
496
- </div>
497
-
498
- <!-- Usage Instructions -->
499
- <div id="Usage" style="display: none;">
500
- <div class="SubTitle">&raquo; Usage Instructions</div>
501
- <div class="SubSubTitle">General Usage</div>
502
- <ol>
503
- <li>
504
- Open <strong>wp-content/themes/&lt;YOUR THEME NAME&gt;/index.php</strong>
505
- <p>You may place it in <strong>single.php</strong>, <strong>post.php</strong>, <strong>page.php</strong> or <strong>theloop.php</strong> also.</p>
506
- </li>
507
- <li>
508
- Find:
509
- <blockquote>
510
- &lt;?php while (have_posts()) : the_post(); ?&gt;
511
- </blockquote>
512
- </li>
513
- <li>
514
- Add Anywhere Below It:
515
- <blockquote>
516
- &lt;?php if(function_exists('wp_print')) { print_link(); } ?&gt;
517
- </blockquote>
518
- <p>If you DO NOT want the print link to appear in every post/page, DO NOT use the code above. Just type in <strong>[print_link]</strong> into the selected post/page content and it will embed the print link into that post/page only.</p>
519
- <p>The <b>first value</b> is the text for printing post.</p>
520
- <p>The <b>second value</b> is the text for printing page.</p>
521
- <p>Default: print_link('', '')</p>
522
- <p>Alternatively, you can set the text in 'WP-Admin -> Settings -> Print'.</p>
523
- </li>
524
- <li>
525
- Go to <strong>'WP-Admin -> Settings -> Print'</strong> to configure the style of the print text link.
526
- </li>
527
- </ol>
528
- <div class="SubSubTitle">Note</div>
529
- <ul>
530
- <li>
531
- If you do not want to print a portion of your post's content, do the following:
532
- <blockquote>
533
- [donotprint]Text within this tag will not be displayed when printing[/donotprint]
534
- </blockquote>
535
- <p>The text within [donotprint][/donotprint] will not be displayed when you are viewing a printer friendly version of a post or page.</p>
536
- <p>However, it will still be displayed as normal on a normal post or page view.</p>
537
- <p>Do note that if you are using WP-Email, any text within [donotprint][/donotprint] will not be emailed as well.</p>
538
- </li>
539
- <li>
540
- WP-Print will load '<strong>print-css.css</strong>', '<strong>print-posts.php</strong>' and '<strong>print-comments.php</strong>' from your theme's directory if it exists.
541
- <ul>
542
- <li>If it doesn't exists, it will just load the respective defalult file that comes with WP-Print.</li>
543
- <li>This will allow you to upgrade WP-Print without worrying about overwriting your printing styles or templates that you have created.</li>
544
- </ul>
545
- </li>
546
- </ul>
547
- </div>
548
- </div>
549
- </div>
550
- <p id="Copyright">WP-Print 2.50<br />Copyright &copy; 2009 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
551
- </body>
552
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,29 +1,217 @@
1
  === WP-Print ===
2
- Contributors: aaroncampbell,GamerZ
3
- Donate link: http://lesterchan.net/wordpress
4
  Tags: print, printer, wp-print
5
  Requires at least: 2.8
6
- Stable tag: 2.50
 
7
 
8
  Displays a printable version of your WordPress blog's post/page.
9
 
10
  == Description ==
11
 
12
- All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-Print Readme](http://lesterchan.net/wordpress/readme/wp-print.html "WP-Print Readme").
13
- It is the exact same readme.html is included in the zip package.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- == Development Blog ==
 
 
 
 
16
 
17
- [GaMerZ WordPress Plugins Development Blog](http://lesterchan.net/wordpress/ "GaMerZ WordPress Plugins Development Blog")
 
18
 
19
  == Installation ==
20
 
21
- [WP-Print Readme](http://lesterchan.net/wordpress/readme/wp-print.html "WP-Print Readme") (Installation Tab)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  == Screenshots ==
24
 
25
- [WP-Print Screenshots](http://lesterchan.net/wordpress/screenshots/browse/wp-print/ "WP-Print Screenshots")
 
 
 
26
 
27
  == Frequently Asked Questions ==
28
 
29
- [WP-Print Support Forums](http://forums.lesterchan.net/index.php?board=18.0 "WP-Print Support Forums")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  === WP-Print ===
2
+ Contributors: GamerZ, aaroncampbell
3
+ Donate link: http://lesterchan.net/site/donation/
4
  Tags: print, printer, wp-print
5
  Requires at least: 2.8
6
+ Tested up to: 3.5.1
7
+ Stable tag: trunk
8
 
9
  Displays a printable version of your WordPress blog's post/page.
10
 
11
  == Description ==
12
 
13
+ Displays a printable version of your WordPress blog's post/page.
14
+
15
+ = Previous Versions =
16
+ * [WP-Print 2.50 For WordPress 2.7.x And 2.8.x](http://downloads.wordpress.org/plugin/wp-print.2.50.zip "WP-Print 2.50 For WordPress 2.7.x And 2.8.x")
17
+ * [WP-Print 2.50 For WordPress 2.7.x And 2.8.x](http://downloads.wordpress.org/plugin/wp-print.2.50.zip "WP-Print 2.50 For WordPress 2.7.x And 2.8.x")
18
+ * [WP-Print 2.31 For WordPress 2.5.x And 2.6.x](http://downloads.wordpress.org/plugin/wp-print.2.31.zip "WP-Print 2.31 For WordPress 2.5.x And 2.6.x")
19
+ * [WP-Print 2.20 For WordPress 2.1.x, 2.2.x And 2.3.x](http://downloads.wordpress.org/plugin/wp-print.2.20.zip "WP-Print 2.20 For WordPress 2.1.x, 2.2.x And 2.3.x")
20
+ * [WP-Print 2.06 For WordPress 2.0.x](http://downloads.wordpress.org/plugin/wp-print.2.06.zip "WP-Print 2.06 For WordPress 2.0.x")
21
+ * [WP-Print 2.00 For WordPress 1.5.2](http://downloads.wordpress.org/plugin/wp-print.2.00.zip "WP-Print 2.00 For WordPress 1.5.2")
22
+
23
+ = Development =
24
+ * [http://dev.wp-plugins.org/browser/wp-print/](http://dev.wp-plugins.org/browser/wp-print/ "http://dev.wp-plugins.org/browser/wp-print/")
25
+
26
+ = Translations =
27
+ * [http://dev.wp-plugins.org/browser/wp-print/i18n/](http://dev.wp-plugins.org/browser/wp-print/i18n/ "http://dev.wp-plugins.org/browser/wp-print/i18n/")
28
+
29
+ = Support Forums =
30
+ * [http://forums.lesterchan.net/index.php?board=18.0](http://forums.lesterchan.net/index.php?board=18.0 "http://forums.lesterchan.net/index.php?board=18.0")
31
 
32
+ = Credits =
33
+ * Icons courtesy of [FamFamFam](http://www.famfamfam.com/)
34
+ * __ngetext() by [Anna Ozeritskaya](http://hweia.ru/)
35
+ * Right-to-left language support by [Kambiz R. Khojasteh](http://persian-programming.com/)
36
+ * Do Not Print idea by [Robert "Nilpo" Dunham](http://www.nilpo.com/)
37
 
38
+ = Donations =
39
+ I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks as my school allowance, I will really appreciate it. If not feel free to use it without any obligations. Thank You. My Paypal account is lesterchan@gmail.com.
40
 
41
  == Installation ==
42
 
43
+ You can either install it automatically from the WordPress admin, or do it manually:
44
+
45
+ 1. Upload the whole `wp-print` directory into your plugins folder(`/wp-content/plugins/`)
46
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
47
+
48
+ Once installed take the following steps to set it up:
49
+
50
+ 1. WP-Print settings page is located in WP-Admin -> Settings -> Print
51
+ 1. You Need To Re-Generate The Permalink (WP-Admin -> Settings -> Permalinks -> Save Changes)
52
+ 1. Refer To Usage For Further Instructions
53
+
54
+ = Usage =
55
+
56
+ 1. Open `wp-content/themes/<YOUR THEME NAME>/index.php`
57
+ You may place it in single.php, post.php, page.php, etc also.
58
+ 1. Find: `<?php while (have_posts()) : the_post(); ?>`
59
+ 1. Add Anywhere Below It: `<?php if(function_exists('wp_print')) { print_link(); } ?>`
60
+
61
+ * The first value is the text for printing post.
62
+ * The second value is the text for printing page.
63
+ * Default: print_link('', '')
64
+ * Alternatively, you can set the text in 'WP-Admin -> Settings -> Print'.
65
+ * If you DO NOT want the print link to appear in every post/page, DO NOT use the code above. Just type in <strong>[print_link]</strong> into the selected post/page content and it will embed the print link into that post/page only.
66
+
67
 
68
  == Screenshots ==
69
 
70
+ 1. Admin Print Options
71
+ 2. Print Post Link
72
+ 3. Print Page link
73
+ 4. Print Page
74
 
75
  == Frequently Asked Questions ==
76
 
77
+ = How do I add this to my theme? =
78
+
79
+ 1. Open `wp-content/themes/<YOUR THEME NAME>/index.php`
80
+ You may place it in single.php, post.php, page.php, etc also.
81
+ 1. Find: `<?php while (have_posts()) : the_post(); ?>`
82
+ 1. Add Anywhere Below It: `<?php if(function_exists('wp_print')) { print_link(); } ?>`
83
+
84
+ Simply add this code <strong>inside the loop = where you want the print link to display:
85
+ <code>
86
+ if(function_exists('wp_print')) {
87
+ print_link();
88
+ }
89
+ </code>
90
+
91
+ = If you do not want to print a portion of your post's content =
92
+ <code>
93
+ [donotprint]Text within this tag will not be displayed when printing[/donotprint]
94
+ </code>
95
+ * The text within [donotprint][/donotprint] will not be displayed when you are viewing a printer friendly version of a post or page.
96
+ * However, it will still be displayed as normal on a normal post or page view.
97
+ * Do note that if you are using WP-Email, any text within [donotprint][/donotprint] will not be emailed as well.
98
+
99
+ = Custom Template =
100
+ * WP-Print will load 'print-css.css', '<strong>print-posts.php' and 'print-comments.php' from your theme's directory if it exists.
101
+ * If it doesn't exists, it will just load the respective default file that comes with WP-Print.
102
+ * This will allow you to upgrade WP-Print without worrying about overwriting your printing styles or templates that you have created.
103
+
104
+
105
+ == Changelog ==
106
+
107
+ = 2.52 =
108
+ * FIXED: Added nonce to Options. Credits to Charlie Eriksen via Secunia SVCRP.
109
+
110
+ = 2.51 =
111
+ * NEW: Support for links that start with "//"
112
+ * FIXED: Unable to load WP-Print on Password Protected posts
113
+
114
+ = 2.50 =
115
+ * NEW: Uses jQuery Framework
116
+ * NEW: [donotprint][/donotprint] ShortCode Will Not Be Displayed As Well When Using WP-Email (Refer To Usage Tab)
117
+ * NEW: Use _n() Instead Of __ngettext() And _n_noop() Instead Of __ngettext_noop()
118
+ * FIXED: Uses $_SERVER['PHP_SELF'] With plugin_basename(__FILE__) Instead Of Just $_SERVER['REQUEST_URI']
119
+ * FIXED: Nested ShortCode Issues
120
+
121
+ = 2.40 =
122
+ * NEW: Works For WordPress 2.7 Only
123
+ * NEW: Better Translation Using __ngetext() by Anna Ozeritskaya
124
+ * NEW: Right To Left Language Support by Kambiz R. Khojasteh
125
+ * NEW: Call print_textdomain() In print_init() by Kambiz R. Khojasteh
126
+ * NEW: Replace "text_direction" Option With $text_direction And language_attributes() by Kambiz R. Khojasteh
127
+ * NEW: Added "print-css-rtl.css" by Kambiz R. Khojasteh
128
+ * NEW: Page Title Is Now "Post Title -> Print" Instead Of "Print -> Post Title" by Kambiz R. Khojasteh
129
+ * NEW: Modified "print-css.css" To Hide "comments_controls" Element For Print by Kambiz R. Khojasteh
130
+ * FIXED: Footnotes Referencing Is Now "link1 <sup>[1]</sup>" Instead Of "[1] link1" by Kambiz R. Khojasteh
131
+ * FIXED: Remove chunk_split() As Browser Will Try To Wrap Word Boundaries Based On Page Width by Kambiz R. Khojasteh
132
+ * FIXED: Remove [print_link] ShortCode In Print Pages
133
+
134
+ = 2.31 =
135
+ * NEW: Works For WordPress 2.6
136
+ * NEW: Added donotprint ShortCode. See Usage Tab
137
+ * NEW: WP-Print Will Load print-posts.php And print-comments.php Templates From Your Theme Directory First If The Exist
138
+ * FIXED: Replace &lt;center&gt; With &lt;div style="margin: 0px auto 0px auto;"&gt;
139
+
140
+ = 2.30 =
141
+ * NEW: Works For WordPress 2.5 Only
142
+ * NEW: WP-Print Will Load 'print-css.css' Inside Your Theme Directory If It Exists. If Not, It Will Just Load The Default 'print-css.css' By WP-Print
143
+ * NEW: Uses Shortcode API
144
+ * NEW: Added "Right To Left" And "Left To Right Text" Direction Option
145
+ * NEW: Option To Remove Videos From Post
146
+ * NEW: Duplicate Links Now Uses A Single Number And Printed Only Once By Constantinos Neophytou
147
+ * NEW: &lt;IMG&gt; And &lt;A&gt; Tag Now Matches Single Quotes By Constantinos Neophytou
148
+ * NEW: Uses /wp-print/ Folder Instead Of /print/
149
+ * NEW: Uses wp-print.php Instead Of print.php
150
+ * NEW: Changed wp-print.php To print-posts.php
151
+ * NEW: Changed wp-print-comments.php To print-comments.php
152
+ * NEW: Changed wp-print-css.css To print-css.css
153
+ * FIXED: Comment Type Not Translated
154
+
155
+ = 2.20 =
156
+ * NEW: Works For WordPress 2.3 Only
157
+ * NEW: Ability To Embed [print_link] Into Excerpt
158
+ * NEW: wp-print-css.css Now Controls The CSS Styles For The Printer Friendly Page
159
+ * NEW: Disclaimer/Copyright Text Option By Duane Craig
160
+ * NEW: Anchor Link To Comments By Reinventia
161
+ * NEW: Collapsable Comments By Reinventia
162
+ * NEW: Ability To Uninstall WP-Print
163
+ * FIXED: If There Is No Trailing Slash In Your Permalink, WP-Print Will Add It For You
164
+
165
+ = 2.11 =
166
+ * NEW: Putting [print_link] In Your Post/Page Content Will Display A Link To The Printable Post/Page
167
+ * FIXED: Worked With Polyglot Plugin, Fixed By zeridon
168
+ * FIXED: Wrong URL If Front Page Is A Static Page
169
+
170
+ = 2.10 =
171
+ * NEW: Added Fam Fam Fam's Printer Icon
172
+ * NEW: Works For WordPress 2.1 Only
173
+ * NEW: Localize WP-Print
174
+ * NEW: Ability To Configure The Text For Print Links Via 'WP-Admin -> Options -> Print'
175
+ * NEW: The Text For Print Links Can No Longer Be Pass To The Function print_link() or print_link_image()
176
+ * FIXED: MUltiple URL Type Fixed By Virgil
177
+ * FIXED: 'Click Here To Print' Will Be Hidden When Printing By Joe (Ttech)
178
+
179
+ = 2.06 =
180
+ * NEW: Used Default Date/Time Format Under WordPress Options
181
+ * NEW: Added robots: noindex To Printer Friendly Pages
182
+ * NEW: Added rel="nofollow" To All Links Generated By WP-Print
183
+ * FIXED: &lt;abbr&gt; Tag Mixed Up With &lt;a&gt;
184
+ * FIXED: PHP5 Compatibility Issue
185
+ * FIXED: Long URL Will Not Break Into More Than 1 Line
186
+
187
+ = 2.05 =
188
+ * NEW: Added Print Options In WP Administration Panel Under 'Options -> Print'
189
+ * NEW: Print Administration Panel And The Code That WP-Print Generated Is XHTML 1.0 Transitional
190
+ * FIXED: Comment's Content Formatting
191
+
192
+ = 2.04 =
193
+ * NEW: Able To Print Comments Together With Post Using $can_print_comments In wp-print.php
194
+ * NEW: Moved wp-print.php To Plugin Folder
195
+ * FIXED: Removed Link From Post Comment Count And Post Category
196
+
197
+ = 2.03 =
198
+ * NEW: Added Print Image With print_link_image()
199
+ * NEW: Automatically Break To Next Line If Link Contains More Than 100 Chars
200
+ * FIXED: Comment Numbers Showing In Password Protected Post
201
+
202
+ = 2.02 =
203
+ * FIXED: Able To View Password Protected Blog
204
+
205
+ = 2.01 =
206
+ * NEW: Compatible With WordPress 2.0
207
+ * NEW: Automatically Detect Whether You Are Using Nice Permalink
208
+ * NEW: Automated Permalink
209
+ * NEW: Now You Only Need To Insert 1 Line Into Your index.php Of Your Theme
210
+ * NEW: GPL License Added
211
+ * FIXED: Links Not Displaying Properly When Printing More Than 1 Post On A Single Page
212
+
213
+ = 2.00a =
214
+ * NEW: Permlink For The Page Feature
215
+
216
+ = 2.00 =
217
+ * NEW: Print Out A Summary Of URLS In The Post At The Bottom Of The Page
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
wp-print.mo DELETED
Binary file
wp-print.php CHANGED
@@ -3,14 +3,15 @@
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.50
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
 
9
  */
10
 
11
 
12
- /*
13
- Copyright 2009 Lester Chan (email : lesterchan@gmail.com)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
@@ -70,7 +71,7 @@ function print_rewrite($wp_rewrite) {
70
  $uris = $page_uris[0];
71
  if(is_array($uris)) {
72
  $print_page_rules = array();
73
- foreach ($uris as $uri => $pagename) {
74
  $wp_rewrite->add_rewrite_tag('%pagename%', "($uri)", 'pagename=');
75
  $rewrite_rules = $wp_rewrite->generate_rewrite_rules($wp_rewrite->get_page_permastruct().'/printpage', EP_PAGES);
76
  $rewrite_rules = array_slice($rewrite_rules, 5, 1);
@@ -116,7 +117,7 @@ function print_link($print_post_text = '', $print_page_text = '', $echo = true)
116
  $print_link = get_permalink();
117
  $print_html = stripslashes($print_options['print_html']);
118
  // Fix For Static Page
119
- if(get_option('show_on_front') == 'page' && is_page()) {
120
  if(intval(get_option('page_on_front')) > 0) {
121
  $print_link = _get_page_link();
122
  }
@@ -204,7 +205,7 @@ function print_content($display = true) {
204
  if (!isset($matched_links)) {
205
  $matched_links = array();
206
  }
207
- if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
208
  $content = get_the_password_form();
209
  } else {
210
  if($multipage) {
@@ -235,16 +236,18 @@ function print_content($display = true) {
235
  for ($i=0; $i < count($matches[0]); $i++) {
236
  $link_match = $matches[0][$i];
237
  $link_url = $matches[2][$i];
238
- if(stristr($link_url, 'https://')) {
239
- $link_url =(strtolower(substr($link_url,0,8)) != 'https://') ?get_option('home') . $link_url : $link_url;
240
- } else if( stristr($link_url, 'mailto:')) {
 
 
241
  $link_url =(strtolower(substr($link_url,0,7)) != 'mailto:') ?get_option('home') . $link_url : $link_url;
242
- } else if( $link_url[0] == '#' ) {
243
- $link_url = $link_url;
244
  } else {
245
  $link_url =(strtolower(substr($link_url,0,7)) != 'http://') ?get_option('home') . $link_url : $link_url;
246
  }
247
- $link_text = $matches[4][$i];+
248
  $new_link = true;
249
  $link_url_hash = md5($link_url);
250
  if (!isset($matched_links[$link_url_hash])) {
@@ -306,7 +309,7 @@ function print_comments_content($display = true) {
306
  } else if(stristr($link_url, 'mailto:')) {
307
  $link_url =(strtolower(substr($link_url,0,7)) != 'mailto:') ?get_option('home') . $link_url : $link_url;
308
  } else if($link_url[0] == '#') {
309
- $link_url = $link_url;
310
  } else {
311
  $link_url =(strtolower(substr($link_url,0,7)) != 'http://') ?get_option('home') . $link_url : $link_url;
312
  }
@@ -352,7 +355,7 @@ function print_comments_number() {
352
  } else {
353
  $comment_text = __('Comments Disabled', 'wp-print');
354
  }
355
- if(!empty($post->post_password) && stripslashes($_COOKIE['wp-postpass_'.COOKIEHASH]) != $post->post_password) {
356
  _e('Comments Hidden', 'wp-print');
357
  } else {
358
  echo $comment_text;
@@ -366,8 +369,8 @@ function print_links($text_links = '') {
366
  if(empty($text_links)) {
367
  $text_links = __('URLs in this post:', 'wp-print');
368
  }
369
- if(!empty($links_text)) {
370
- echo $text_links.$links_text;
371
  }
372
  }
373
 
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.52
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
+ Text Domain: wp-print
10
  */
11
 
12
 
13
+ /*
14
+ Copyright 2013 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
71
  $uris = $page_uris[0];
72
  if(is_array($uris)) {
73
  $print_page_rules = array();
74
+ foreach ($uris as $uri => $pagename) {
75
  $wp_rewrite->add_rewrite_tag('%pagename%', "($uri)", 'pagename=');
76
  $rewrite_rules = $wp_rewrite->generate_rewrite_rules($wp_rewrite->get_page_permastruct().'/printpage', EP_PAGES);
77
  $rewrite_rules = array_slice($rewrite_rules, 5, 1);
117
  $print_link = get_permalink();
118
  $print_html = stripslashes($print_options['print_html']);
119
  // Fix For Static Page
120
+ if(get_option('show_on_front') == 'page' && is_page()) {
121
  if(intval(get_option('page_on_front')) > 0) {
122
  $print_link = _get_page_link();
123
  }
205
  if (!isset($matched_links)) {
206
  $matched_links = array();
207
  }
208
+ if(post_password_required()) {
209
  $content = get_the_password_form();
210
  } else {
211
  if($multipage) {
236
  for ($i=0; $i < count($matches[0]); $i++) {
237
  $link_match = $matches[0][$i];
238
  $link_url = $matches[2][$i];
239
+ if(substr($link_url, 0, 2) == '//') {
240
+ $link_url = (is_ssl() ? 'https:' : 'http:') . $link_url;
241
+ } elseif(stristr($link_url, 'https://')) {
242
+ $link_url =(strtolower(substr($link_url,0,8)) != 'https://') ?get_option('home') . $link_url : $link_url;
243
+ } else if(stristr($link_url, 'mailto:')) {
244
  $link_url =(strtolower(substr($link_url,0,7)) != 'mailto:') ?get_option('home') . $link_url : $link_url;
245
+ } else if($link_url[0] == '#') {
246
+ $link_url = $link_url;
247
  } else {
248
  $link_url =(strtolower(substr($link_url,0,7)) != 'http://') ?get_option('home') . $link_url : $link_url;
249
  }
250
+ $link_text = $matches[4][$i];
251
  $new_link = true;
252
  $link_url_hash = md5($link_url);
253
  if (!isset($matched_links[$link_url_hash])) {
309
  } else if(stristr($link_url, 'mailto:')) {
310
  $link_url =(strtolower(substr($link_url,0,7)) != 'mailto:') ?get_option('home') . $link_url : $link_url;
311
  } else if($link_url[0] == '#') {
312
+ $link_url = $link_url;
313
  } else {
314
  $link_url =(strtolower(substr($link_url,0,7)) != 'http://') ?get_option('home') . $link_url : $link_url;
315
  }
355
  } else {
356
  $comment_text = __('Comments Disabled', 'wp-print');
357
  }
358
+ if(post_password_required()) {
359
  _e('Comments Hidden', 'wp-print');
360
  } else {
361
  echo $comment_text;
369
  if(empty($text_links)) {
370
  $text_links = __('URLs in this post:', 'wp-print');
371
  }
372
+ if(!empty($links_text)) {
373
+ echo $text_links.$links_text;
374
  }
375
  }
376
 
wp-print.pot DELETED
@@ -1,316 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WP-Print 2.50\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-08-02 01:12+0800\n"
6
- "PO-Revision-Date: 2009-08-02 01:12+0800\n"
7
- "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
8
- "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-Language: English\n"
13
- "X-Poedit-Country: SINGAPORE\n"
14
- "X-Poedit-KeywordsList: __;_e;_n:1,2;__ngettext_noop:1,2\n"
15
- "X-Poedit-Basepath: .\n"
16
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
17
- "X-Poedit-SearchPath-0: .\n"
18
-
19
- #: print-comments.php:23
20
- msgid "Open"
21
- msgstr ""
22
-
23
- #: print-comments.php:23
24
- msgid "Close"
25
- msgstr ""
26
-
27
- #: print-comments.php:25
28
- msgid "To"
29
- msgstr ""
30
-
31
- #: print-comments.php:28
32
- msgid "Comment"
33
- msgstr ""
34
-
35
- #: print-comments.php:28
36
- msgid "Trackback"
37
- msgstr ""
38
-
39
- #: print-comments.php:28
40
- msgid "Pingback"
41
- msgstr ""
42
-
43
- #: print-comments.php:28
44
- msgid "By"
45
- msgstr ""
46
-
47
- #: print-comments.php:28
48
- #: print-posts.php:47
49
- msgid "On"
50
- msgstr ""
51
-
52
- #: print-comments.php:28
53
- #: print-posts.php:47
54
- #, php-format
55
- msgid "%s @ %s"
56
- msgstr ""
57
-
58
- #: print-comments.php:32
59
- msgid "Your comment is awaiting moderation."
60
- msgstr ""
61
-
62
- #: print-options.php:45
63
- #: print-options.php:131
64
- #: print-options.php:195
65
- msgid "Print Options"
66
- msgstr ""
67
-
68
- #: print-options.php:50
69
- msgid "Updated"
70
- msgstr ""
71
-
72
- #: print-options.php:55
73
- msgid "No Print Option Updated"
74
- msgstr ""
75
-
76
- #: print-options.php:61
77
- #: print-options.php:286
78
- msgid "UNINSTALL WP-Print"
79
- msgstr ""
80
-
81
- #: print-options.php:69
82
- #, php-format
83
- msgid "Setting Key '%s' has been deleted."
84
- msgstr ""
85
-
86
- #: print-options.php:73
87
- #, php-format
88
- msgid "Error deleting Setting Key '%s'."
89
- msgstr ""
90
-
91
- #: print-options.php:94
92
- #: print-options.php:254
93
- msgid "Uninstall WP-Print"
94
- msgstr ""
95
-
96
- #: print-options.php:95
97
- #, php-format
98
- msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-Print Will Be Deactivated Automatically."
99
- msgstr ""
100
-
101
- #: print-options.php:120
102
- #: wp-print.php:450
103
- #, php-format
104
- msgid "Copyright &copy; %s %s. All rights reserved."
105
- msgstr ""
106
-
107
- #: print-options.php:132
108
- msgid "Print Styles"
109
- msgstr ""
110
-
111
- #: print-options.php:135
112
- msgid "Print Text Link For Post"
113
- msgstr ""
114
-
115
- #: print-options.php:141
116
- msgid "Print Text Link For Page"
117
- msgstr ""
118
-
119
- #: print-options.php:147
120
- msgid "Print Icon"
121
- msgstr ""
122
-
123
- #: print-options.php:176
124
- msgid "Print Text Link Style"
125
- msgstr ""
126
-
127
- #: print-options.php:179
128
- msgid "Print Icon With Text Link"
129
- msgstr ""
130
-
131
- #: print-options.php:180
132
- msgid "Print Icon Only"
133
- msgstr ""
134
-
135
- #: print-options.php:181
136
- msgid "Print Text Link Only"
137
- msgstr ""
138
-
139
- #: print-options.php:182
140
- msgid "Custom"
141
- msgstr ""
142
-
143
- #: print-options.php:186
144
- #: print-options.php:240
145
- msgid "HTML is allowed."
146
- msgstr ""
147
-
148
- #: print-options.php:187
149
- msgid "URL to the printable post/page."
150
- msgstr ""
151
-
152
- #: print-options.php:188
153
- msgid "Print text link of the post/page that you have typed in above."
154
- msgstr ""
155
-
156
- #: print-options.php:189
157
- msgid "URL to the print icon you have chosen above."
158
- msgstr ""
159
-
160
- #: print-options.php:190
161
- #: print-options.php:237
162
- msgid "Restore Default Template"
163
- msgstr ""
164
-
165
- #: print-options.php:198
166
- msgid "Print Comments?"
167
- msgstr ""
168
-
169
- #: print-options.php:201
170
- #: print-options.php:210
171
- #: print-options.php:219
172
- #: print-options.php:228
173
- #: print-options.php:285
174
- msgid "Yes"
175
- msgstr ""
176
-
177
- #: print-options.php:202
178
- #: print-options.php:211
179
- #: print-options.php:220
180
- #: print-options.php:229
181
- msgid "No"
182
- msgstr ""
183
-
184
- #: print-options.php:207
185
- msgid "Print Links?"
186
- msgstr ""
187
-
188
- #: print-options.php:216
189
- msgid "Print Images?"
190
- msgstr ""
191
-
192
- #: print-options.php:225
193
- msgid "Print Videos?"
194
- msgstr ""
195
-
196
- #: print-options.php:235
197
- msgid "Disclaimer/Copyright Text?"
198
- msgstr ""
199
-
200
- #: print-options.php:245
201
- msgid "Save Changes"
202
- msgstr ""
203
-
204
- #: print-options.php:256
205
- msgid "Deactivating WP-Print plugin does not remove any data that may have been created, such as the print options. To completely remove this plugin, you can uninstall it here."
206
- msgstr ""
207
-
208
- #: print-options.php:259
209
- msgid "WARNING:"
210
- msgstr ""
211
-
212
- #: print-options.php:260
213
- msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
214
- msgstr ""
215
-
216
- #: print-options.php:263
217
- msgid "The following WordPress Options will be DELETED:"
218
- msgstr ""
219
-
220
- #: print-options.php:268
221
- msgid "WordPress Options"
222
- msgstr ""
223
-
224
- #: print-options.php:286
225
- msgid ""
226
- "You Are About To Uninstall WP-Print From WordPress.\\n"
227
- "This Action Is Not Reversible.\\n"
228
- "\\n"
229
- " Choose [Cancel] To Stop, [OK] To Uninstall."
230
- msgstr ""
231
-
232
- #: print-posts.php:47
233
- msgid "Posted By"
234
- msgstr ""
235
-
236
- #: print-posts.php:47
237
- msgid "In"
238
- msgstr ""
239
-
240
- #: print-posts.php:54
241
- msgid "Article printed from"
242
- msgstr ""
243
-
244
- #: print-posts.php:55
245
- msgid "URL to article"
246
- msgstr ""
247
-
248
- #: print-posts.php:59
249
- msgid "Click"
250
- msgstr ""
251
-
252
- #: print-posts.php:59
253
- msgid "Click here to print."
254
- msgstr ""
255
-
256
- #: print-posts.php:59
257
- msgid "here"
258
- msgstr ""
259
-
260
- #: print-posts.php:59
261
- msgid "to print."
262
- msgstr ""
263
-
264
- #: print-posts.php:61
265
- msgid "No posts matched your criteria."
266
- msgstr ""
267
-
268
- #: wp-print.php:42
269
- #: wp-print.php:398
270
- msgid "Print"
271
- msgstr ""
272
-
273
- #: wp-print.php:183
274
- msgid "Note: There is a print link embedded within this post, please visit this post to print it."
275
- msgstr ""
276
-
277
- #: wp-print.php:260
278
- #: wp-print.php:325
279
- msgid "Image"
280
- msgstr ""
281
-
282
- #: wp-print.php:280
283
- msgid ","
284
- msgstr ""
285
-
286
- #: wp-print.php:348
287
- msgid "No Comments"
288
- msgstr ""
289
-
290
- #: wp-print.php:350
291
- #, php-format
292
- msgid "%s Comment"
293
- msgid_plural "%s Comments"
294
- msgstr[0] ""
295
- msgstr[1] ""
296
-
297
- #: wp-print.php:353
298
- msgid "Comments Disabled"
299
- msgstr ""
300
-
301
- #: wp-print.php:356
302
- msgid "Comments Hidden"
303
- msgstr ""
304
-
305
- #: wp-print.php:367
306
- msgid "URLs in this post:"
307
- msgstr ""
308
-
309
- #: wp-print.php:441
310
- msgid "Print This Post"
311
- msgstr ""
312
-
313
- #: wp-print.php:442
314
- msgid "Print This Page"
315
- msgstr ""
316
-