Version Description
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-Print |
Version | 2.40 |
Comparing to | |
See all releases |
Code changes from version 2.31 to 2.40
- print-comments.php +4 -4
- print-css-rtl.css +25 -0
- print-css.css +2 -1
- print-options.php +9 -17
- print-posts.php +18 -21
- print.php +1 -11
- readme.html +25 -6
- readme.txt +2 -2
- wp-print.mo +0 -0
- wp-print.php +26 -47
- wp-print.pot +80 -88
print-comments.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
-
| WordPress 2.
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
@@ -19,13 +19,13 @@
|
|
19 |
|
20 |
|
21 |
<?php if($comments) : ?>
|
22 |
-
<?php $comment_count = 1; ?>
|
23 |
-
<span style='float:right' id='comments_controls'><?php print_comments_number(); ?> (<a href="#" onclick="javascript:document.getElementById('comments_box').style.display = 'block'; return false;"><?php _e('Open', 'wp-print'); ?></a> | <a href="#" onclick="javascript:document.getElementById('comments_box').style.display = 'none'; return false;"><?php _e('Close', 'wp-print'); ?></a>)</span>
|
24 |
<div id="comments_box">
|
25 |
<p id="CommentTitle"><?php print_comments_number(); ?> <?php _e('To', 'wp-print'); ?> "<?php the_title(); ?>"</p>
|
26 |
<?php foreach ($comments as $comment) : ?>
|
27 |
<p class="CommentDate">
|
28 |
-
<strong>#<?php echo $comment_count; ?> <?php comment_type(__('Comment', 'wp-print'), __('Trackback', 'wp-print'), __('Pingback', 'wp-print')); ?></strong> <?php _e('By', 'wp-print'); ?> <u><?php comment_author(); ?></u> <?php _e('On', 'wp-print'); ?> <?php comment_date(sprintf(__('%s @ %s', 'wp-print'), get_option('date_format'), get_option('time_format'))); ?>
|
29 |
</p>
|
30 |
<div class="CommentContent">
|
31 |
<?php if ($comment->comment_approved == '0') : ?>
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
19 |
|
20 |
|
21 |
<?php if($comments) : ?>
|
22 |
+
<?php $comment_count = 1; global $text_direction; ?>
|
23 |
+
<span style='float:<?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>' id='comments_controls'><?php print_comments_number(); ?> (<a href="#" onclick="javascript:document.getElementById('comments_box').style.display = 'block'; return false;"><?php _e('Open', 'wp-print'); ?></a> | <a href="#" onclick="javascript:document.getElementById('comments_box').style.display = 'none'; return false;"><?php _e('Close', 'wp-print'); ?></a>)</span>
|
24 |
<div id="comments_box">
|
25 |
<p id="CommentTitle"><?php print_comments_number(); ?> <?php _e('To', 'wp-print'); ?> "<?php the_title(); ?>"</p>
|
26 |
<?php foreach ($comments as $comment) : ?>
|
27 |
<p class="CommentDate">
|
28 |
+
<strong>#<?php echo number_format_i18n($comment_count); ?> <?php comment_type(__('Comment', 'wp-print'), __('Trackback', 'wp-print'), __('Pingback', 'wp-print')); ?></strong> <?php _e('By', 'wp-print'); ?> <u><?php comment_author(); ?></u> <?php _e('On', 'wp-print'); ?> <?php comment_date(sprintf(__('%s @ %s', 'wp-print'), get_option('date_format'), get_option('time_format'))); ?>
|
29 |
</p>
|
30 |
<div class="CommentContent">
|
31 |
<?php if ($comment->comment_approved == '0') : ?>
|
print-css-rtl.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
+----------------------------------------------------------------+
|
3 |
+
| |
|
4 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
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;
|
21 |
+
}
|
22 |
+
|
23 |
+
pre {
|
24 |
+
direction: ltr;
|
25 |
+
}
|
print-css.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*
|
2 |
+----------------------------------------------------------------+
|
3 |
| |
|
4 |
-
| WordPress 2.
|
5 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
6 |
| |
|
7 |
| File Written By: |
|
@@ -62,6 +62,7 @@ HR.Divider {
|
|
62 |
padding: 2px 10px 10px 10px;
|
63 |
}
|
64 |
@media print {
|
|
|
65 |
#print-link {
|
66 |
display: none;
|
67 |
}
|
1 |
/*
|
2 |
+----------------------------------------------------------------+
|
3 |
| |
|
4 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
5 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
6 |
| |
|
7 |
| File Written By: |
|
62 |
padding: 2px 10px 10px 10px;
|
63 |
}
|
64 |
@media print {
|
65 |
+
#comments_controls,
|
66 |
#print-link {
|
67 |
display: none;
|
68 |
}
|
print-options.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
-
| WordPress 2.
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
@@ -38,7 +38,6 @@ if(!empty($_POST['Submit'])) {
|
|
38 |
$print_options['links'] = intval($_POST['print_links']);
|
39 |
$print_options['images'] = intval($_POST['print_images']);
|
40 |
$print_options['videos'] = intval($_POST['print_videos']);
|
41 |
-
$print_options['text_direction'] = trim($_POST['print_text_direction']);
|
42 |
$print_options['disclaimer'] = trim($_POST['print_disclaimer']);
|
43 |
$update_print_queries = array();
|
44 |
$update_print_text = array();
|
@@ -129,6 +128,7 @@ switch($mode) {
|
|
129 |
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
130 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
131 |
<div class="wrap">
|
|
|
132 |
<h2><?php _e('Print Options', 'wp-print'); ?></h2>
|
133 |
<h3><?php _e('Print Styles', 'wp-print'); ?></h3>
|
134 |
<table class="form-table">
|
@@ -149,12 +149,13 @@ switch($mode) {
|
|
149 |
<td>
|
150 |
<?php
|
151 |
$print_icon = $print_options['print_icon'];
|
152 |
-
$print_icon_url =
|
153 |
$print_icon_path = WP_PLUGIN_DIR.'/wp-print/images';
|
154 |
if($handle = @opendir($print_icon_path)) {
|
155 |
while (false !== ($filename = readdir($handle))) {
|
156 |
if ($filename != '.' && $filename != '..') {
|
157 |
if(is_file($print_icon_path.'/'.$filename)) {
|
|
|
158 |
if($print_icon == $filename) {
|
159 |
echo '<input type="radio" name="print_icon" value="'.$filename.'" checked="checked" />'."\n";
|
160 |
} else {
|
@@ -163,7 +164,7 @@ switch($mode) {
|
|
163 |
echo ' ';
|
164 |
echo '<img src="'.$print_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n";
|
165 |
echo ' ('.$filename.')';
|
166 |
-
echo '
|
167 |
}
|
168 |
}
|
169 |
}
|
@@ -230,15 +231,6 @@ switch($mode) {
|
|
230 |
</select>
|
231 |
</td>
|
232 |
</tr>
|
233 |
-
<tr>
|
234 |
-
<th scope="row" valign="top"><?php _e('Text Direction?', 'wp-print'); ?></th>
|
235 |
-
<td>
|
236 |
-
<select name="print_text_direction" size="1">
|
237 |
-
<option value="ltr"<?php selected('ltr', $print_options['text_direction']); ?>><?php _e('Left To Right', 'wp-print'); ?></option>
|
238 |
-
<option value="rtl"<?php selected('rtl', $print_options['text_direction']); ?>><?php _e('Right To Left', 'wp-print'); ?></option>
|
239 |
-
</select>
|
240 |
-
</td>
|
241 |
-
</tr>
|
242 |
<tr>
|
243 |
<th scope="row" valign="top">
|
244 |
<?php _e('Disclaimer/Copyright Text?', 'wp-print'); ?>
|
@@ -260,15 +252,15 @@ switch($mode) {
|
|
260 |
<!-- Uninstall WP-Print -->
|
261 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
262 |
<div class="wrap">
|
263 |
-
<
|
264 |
-
<p
|
265 |
<?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'); ?>
|
266 |
</p>
|
267 |
-
<p style="
|
268 |
<strong><?php _e('WARNING:', 'wp-print'); ?></strong><br />
|
269 |
<?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-print'); ?>
|
270 |
</p>
|
271 |
-
<p style="
|
272 |
<strong><?php _e('The following WordPress Options will be DELETED:', 'wp-print'); ?></strong><br />
|
273 |
</p>
|
274 |
<table class="widefat">
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
38 |
$print_options['links'] = intval($_POST['print_links']);
|
39 |
$print_options['images'] = intval($_POST['print_images']);
|
40 |
$print_options['videos'] = intval($_POST['print_videos']);
|
|
|
41 |
$print_options['disclaimer'] = trim($_POST['print_disclaimer']);
|
42 |
$update_print_queries = array();
|
43 |
$update_print_text = array();
|
128 |
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
129 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
130 |
<div class="wrap">
|
131 |
+
<?php screen_icon(); ?>
|
132 |
<h2><?php _e('Print Options', 'wp-print'); ?></h2>
|
133 |
<h3><?php _e('Print Styles', 'wp-print'); ?></h3>
|
134 |
<table class="form-table">
|
149 |
<td>
|
150 |
<?php
|
151 |
$print_icon = $print_options['print_icon'];
|
152 |
+
$print_icon_url = plugins_url('wp-print/images');
|
153 |
$print_icon_path = WP_PLUGIN_DIR.'/wp-print/images';
|
154 |
if($handle = @opendir($print_icon_path)) {
|
155 |
while (false !== ($filename = readdir($handle))) {
|
156 |
if ($filename != '.' && $filename != '..') {
|
157 |
if(is_file($print_icon_path.'/'.$filename)) {
|
158 |
+
echo '<p>';
|
159 |
if($print_icon == $filename) {
|
160 |
echo '<input type="radio" name="print_icon" value="'.$filename.'" checked="checked" />'."\n";
|
161 |
} else {
|
164 |
echo ' ';
|
165 |
echo '<img src="'.$print_icon_url.'/'.$filename.'" alt="'.$filename.'" />'."\n";
|
166 |
echo ' ('.$filename.')';
|
167 |
+
echo '</p>'."\n";
|
168 |
}
|
169 |
}
|
170 |
}
|
231 |
</select>
|
232 |
</td>
|
233 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
<tr>
|
235 |
<th scope="row" valign="top">
|
236 |
<?php _e('Disclaimer/Copyright Text?', 'wp-print'); ?>
|
252 |
<!-- Uninstall WP-Print -->
|
253 |
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
254 |
<div class="wrap">
|
255 |
+
<h3><?php _e('Uninstall WP-Print', 'wp-print'); ?></h3>
|
256 |
+
<p>
|
257 |
<?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'); ?>
|
258 |
</p>
|
259 |
+
<p style="color: red">
|
260 |
<strong><?php _e('WARNING:', 'wp-print'); ?></strong><br />
|
261 |
<?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-print'); ?>
|
262 |
</p>
|
263 |
+
<p style="color: red">
|
264 |
<strong><?php _e('The following WordPress Options will be DELETED:', 'wp-print'); ?></strong><br />
|
265 |
</p>
|
266 |
<table class="widefat">
|
print-posts.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
-
| WordPress 2.
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
@@ -17,31 +17,28 @@
|
|
17 |
*/
|
18 |
?>
|
19 |
|
20 |
-
|
21 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
22 |
-
<html xmlns="http://www.w3.org/1999/xhtml"
|
23 |
<head>
|
24 |
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
|
25 |
-
<meta http-equiv="Content-Type" content="
|
26 |
<meta name="Robots" content="noindex, nofollow" />
|
27 |
-
<style type="text/css" media="screen, print">
|
28 |
-
BODY {
|
29 |
-
direction: <?php echo $text_direction; ?>;
|
30 |
-
text-align: <?php echo $text_align; ?>;
|
31 |
-
}
|
32 |
-
#Outline {
|
33 |
-
direction: <?php echo $text_direction; ?>;
|
34 |
-
text-align: <?php echo $text_align; ?>;
|
35 |
-
}
|
36 |
-
</style>
|
37 |
<?php if(@file_exists(TEMPLATEPATH.'/print-css.css')): ?>
|
38 |
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
|
39 |
<?php else: ?>
|
40 |
-
<link rel="stylesheet" href="<?php echo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<?php endif; ?>
|
42 |
</head>
|
43 |
<body>
|
44 |
-
<p style="text-align: center;"><strong>- <?php bloginfo('name'); ?> -
|
45 |
<div class="Center">
|
46 |
<div id="Outline">
|
47 |
<?php if (have_posts()): ?>
|
@@ -54,14 +51,14 @@
|
|
54 |
<?php if(print_can('comments')): ?>
|
55 |
<?php comments_template(); ?>
|
56 |
<?php endif; ?>
|
57 |
-
<p
|
58 |
-
<p
|
59 |
<?php if(print_can('links')): ?>
|
60 |
-
<p
|
61 |
<?php endif; ?>
|
62 |
-
<p style="text-align: <?php echo $
|
63 |
<?php else: ?>
|
64 |
-
<p
|
65 |
<?php endif; ?>
|
66 |
</div>
|
67 |
</div>
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
17 |
*/
|
18 |
?>
|
19 |
|
20 |
+
<?php global $text_direction; ?>
|
21 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
22 |
+
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
23 |
<head>
|
24 |
<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
|
25 |
+
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
26 |
<meta name="Robots" content="noindex, nofollow" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<?php if(@file_exists(TEMPLATEPATH.'/print-css.css')): ?>
|
28 |
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
|
29 |
<?php else: ?>
|
30 |
+
<link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css.css'); ?>" type="text/css" media="screen, print" />
|
31 |
+
<?php endif; ?>
|
32 |
+
<?php if('rtl' == $text_direction): ?>
|
33 |
+
<?php if(@file_exists(TEMPLATEPATH.'/print-css-rtl.css')): ?>
|
34 |
+
<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css-rtl.css" type="text/css" media="screen, print" />
|
35 |
+
<?php else: ?>
|
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>
|
42 |
<div class="Center">
|
43 |
<div id="Outline">
|
44 |
<?php if (have_posts()): ?>
|
51 |
<?php if(print_can('comments')): ?>
|
52 |
<?php comments_template(); ?>
|
53 |
<?php endif; ?>
|
54 |
+
<p><?php _e('Article printed from', 'wp-print'); ?> <?php bloginfo('name'); ?>: <strong dir="ltr"><?php bloginfo('url'); ?></strong></p>
|
55 |
+
<p><?php _e('URL to article', 'wp-print'); ?>: <strong dir="ltr"><?php the_permalink(); ?></strong></p>
|
56 |
<?php if(print_can('links')): ?>
|
57 |
+
<p><?php print_links(); ?></p>
|
58 |
<?php endif; ?>
|
59 |
+
<p style="text-align: <?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>;" id="print-link"><?php _e('Click', 'wp-print'); ?> <a href="#Print" onclick="window.print(); return false;" title="<?php _e('Click here to print.', 'wp-print'); ?>"><?php _e('here', 'wp-print'); ?></a> <?php _e('to print.', 'wp-print'); ?></p>
|
60 |
<?php else: ?>
|
61 |
+
<p><?php _e('No posts matched your criteria.', 'wp-print'); ?></p>
|
62 |
<?php endif; ?>
|
63 |
</div>
|
64 |
</div>
|
print.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
-
| WordPress 2.
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
@@ -30,16 +30,6 @@ add_filter('comments_template', 'print_template_comments');
|
|
30 |
### Print Options
|
31 |
$print_options = get_option('print_options');
|
32 |
|
33 |
-
### Determine Text Direction
|
34 |
-
$text_direction = 'ltr';
|
35 |
-
$text_align = 'left';
|
36 |
-
$text_align_opposite = 'right';
|
37 |
-
if($print_options['text_direction'] == 'rtl') {
|
38 |
-
$text_direction = 'rtl';
|
39 |
-
$text_align = 'right';
|
40 |
-
$text_align_opposite = 'left';
|
41 |
-
}
|
42 |
-
|
43 |
### Load Print Post/Page Template
|
44 |
if(file_exists(TEMPLATEPATH.'/print-posts.php')) {
|
45 |
include(TEMPLATEPATH.'/print-posts.php');
|
2 |
/*
|
3 |
+----------------------------------------------------------------+
|
4 |
| |
|
5 |
+
| WordPress 2.6 Plugin: WP-Print 2.40 |
|
6 |
| Copyright (c) 2008 Lester "GaMerZ" Chan |
|
7 |
| |
|
8 |
| File Written By: |
|
30 |
### Print Options
|
31 |
$print_options = get_option('print_options');
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
### Load Print Post/Page Template
|
34 |
if(file_exists(TEMPLATEPATH.'/print-posts.php')) {
|
35 |
include(TEMPLATEPATH.'/print-posts.php');
|
readme.html
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
-
<html>
|
3 |
<head>
|
4 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5 |
-
<title>WP-Print 2.
|
6 |
<style type="text/css" media="screen">
|
7 |
/* Default Style */
|
8 |
BODY {
|
@@ -203,7 +203,7 @@
|
|
203 |
<body>
|
204 |
<div id="Container">
|
205 |
<!-- Title -->
|
206 |
-
<div id="Title">WP-Print 2.
|
207 |
|
208 |
<!-- Tabs -->
|
209 |
<ul id="Tabs">
|
@@ -234,6 +234,7 @@
|
|
234 |
</p>
|
235 |
<p>
|
236 |
<strong>Download:</strong><br />
|
|
|
237 |
<strong>»</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 />
|
238 |
<strong>»</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 />
|
239 |
<strong>»</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 />
|
@@ -262,7 +263,9 @@
|
|
262 |
<p>
|
263 |
<strong>Credits:</strong><br />
|
264 |
<strong>»</strong> Icons courtesy of <a href="http://www.famfamfam.com/">FamFamFam</a>.<br />
|
265 |
-
<strong>»</strong> Do Not Print idea by <a href="http://www.nilpo.com/">Robert "Nilpo" Dunham</a
|
|
|
|
|
266 |
</p>
|
267 |
<p>
|
268 |
<strong>Note:</strong><br />
|
@@ -283,6 +286,22 @@
|
|
283 |
<div id="Changelog" style="display: none;">
|
284 |
<div class="SubTitle">» Changelog</div>
|
285 |
<ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
<li>
|
287 |
<strong>Version 2.31 (16-07-2008)</strong>
|
288 |
<ul>
|
@@ -436,7 +455,7 @@
|
|
436 |
<!-- Upgrade Instructions -->
|
437 |
<div id="Upgrade" style="display: none;">
|
438 |
<div class="SubTitle">» Upgrade Instructions</div>
|
439 |
-
<div class="SubSubTitle">From v2.0x To v2.
|
440 |
<ol>
|
441 |
<li>
|
442 |
<strong>Deactivate</strong> WP-Print Plugin
|
@@ -517,6 +536,6 @@
|
|
517 |
</div>
|
518 |
</div>
|
519 |
</div>
|
520 |
-
<p id="Copyright">WP-Print 2.
|
521 |
</body>
|
522 |
</html>
|
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.40 Readme</title>
|
6 |
<style type="text/css" media="screen">
|
7 |
/* Default Style */
|
8 |
BODY {
|
203 |
<body>
|
204 |
<div id="Container">
|
205 |
<!-- Title -->
|
206 |
+
<div id="Title">WP-Print 2.40 <span style="color: #aaaaaa;">Readme</span></div>
|
207 |
|
208 |
<!-- Tabs -->
|
209 |
<ul id="Tabs">
|
234 |
</p>
|
235 |
<p>
|
236 |
<strong>Download:</strong><br />
|
237 |
+
<strong>»</strong> <a href="http://downloads.wordpress.org/plugin/wp-print.2.40.zip" title="http://downloads.wordpress.org/plugin/wp-print.2.40.zip">WP-Print 2.40 For WordPress 2.7.x</a><br />
|
238 |
<strong>»</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>»</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>»</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 />
|
263 |
<p>
|
264 |
<strong>Credits:</strong><br />
|
265 |
<strong>»</strong> Icons courtesy of <a href="http://www.famfamfam.com/">FamFamFam</a>.<br />
|
266 |
+
<strong>»</strong> Do Not Print idea by <a href="http://www.nilpo.com/">Robert "Nilpo" Dunham</a>.<br />
|
267 |
+
<strong>»</strong> __ngetext() by <a href="http://hweia.ru/" title="http://hweia.ru/">Anna Ozeritskaya</a>.<br />
|
268 |
+
<strong>»</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 />
|
286 |
<div id="Changelog" style="display: none;">
|
287 |
<div class="SubTitle">» Changelog</div>
|
288 |
<ul>
|
289 |
+
<li>
|
290 |
+
<strong>Version 2.40 (12-12-2008)</strong>
|
291 |
+
<ul>
|
292 |
+
<li>NEW: Works For WordPress 2.67 Only</li>
|
293 |
+
<li>NEW: Better Translation Using __ngetext() by <a href="http://hweia.ru/" title="http://hweia.ru/">Anna Ozeritskaya</a></li>
|
294 |
+
<li>NEW: Right To Left Language Support by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
|
295 |
+
<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>
|
296 |
+
<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>
|
297 |
+
<li>NEW: Added "print-css-rtl.css" by <a href="http://persian-programming.com/" title="http://persian-programming.com/">Kambiz R. Khojasteh</a></li>
|
298 |
+
<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>
|
299 |
+
<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>
|
300 |
+
<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>
|
301 |
+
<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>
|
302 |
+
<li>FIXED: Remove [print_link] ShortCode In Print Pages</li>
|
303 |
+
</ul>
|
304 |
+
</li>
|
305 |
<li>
|
306 |
<strong>Version 2.31 (16-07-2008)</strong>
|
307 |
<ul>
|
455 |
<!-- Upgrade Instructions -->
|
456 |
<div id="Upgrade" style="display: none;">
|
457 |
<div class="SubTitle">» Upgrade Instructions</div>
|
458 |
+
<div class="SubSubTitle">From v2.0x To v2.40</div>
|
459 |
<ol>
|
460 |
<li>
|
461 |
<strong>Deactivate</strong> WP-Print Plugin
|
536 |
</div>
|
537 |
</div>
|
538 |
</div>
|
539 |
+
<p id="Copyright">WP-Print 2.40<br />Copyright © 2008 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
|
540 |
</body>
|
541 |
</html>
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: GamerZ
|
3 |
Donate link: http://lesterchan.net/wordpress
|
4 |
Tags: print, printer, wp-print
|
5 |
-
Requires at least: 2.
|
6 |
-
Stable tag: 2.
|
7 |
|
8 |
Displays a printable version of your WordPress blog's post/page.
|
9 |
|
2 |
Contributors: GamerZ
|
3 |
Donate link: http://lesterchan.net/wordpress
|
4 |
Tags: print, printer, wp-print
|
5 |
+
Requires at least: 2.7
|
6 |
+
Stable tag: 2.40
|
7 |
|
8 |
Displays a printable version of your WordPress blog's post/page.
|
9 |
|
wp-print.mo
CHANGED
Binary file
|
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.
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: http://lesterchan.net
|
9 |
*/
|
@@ -28,29 +28,10 @@ Author URI: http://lesterchan.net
|
|
28 |
*/
|
29 |
|
30 |
|
31 |
-
### Use WordPress 2.6 Constants
|
32 |
-
if (!defined('WP_CONTENT_DIR')) {
|
33 |
-
define( 'WP_CONTENT_DIR', ABSPATH.'wp-content');
|
34 |
-
}
|
35 |
-
if (!defined('WP_CONTENT_URL')) {
|
36 |
-
define('WP_CONTENT_URL', get_option('siteurl').'/wp-content');
|
37 |
-
}
|
38 |
-
if (!defined('WP_PLUGIN_DIR')) {
|
39 |
-
define('WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins');
|
40 |
-
}
|
41 |
-
if (!defined('WP_PLUGIN_URL')) {
|
42 |
-
define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
### Create Text Domain For Translations
|
47 |
add_action('init', 'print_textdomain');
|
48 |
function print_textdomain() {
|
49 |
-
|
50 |
-
load_plugin_textdomain('wp-print', 'wp-content/plugins/wp-print');
|
51 |
-
} else {
|
52 |
-
load_plugin_textdomain('wp-print', false, 'wp-print');
|
53 |
-
}
|
54 |
}
|
55 |
|
56 |
|
@@ -76,7 +57,7 @@ function print_rewrite($wp_rewrite) {
|
|
76 |
$print_link_text = 'print';
|
77 |
}
|
78 |
$rewrite_rules = $wp_rewrite->generate_rewrite_rule($wp_rewrite->permalink_structure.$print_link_text, EP_PERMALINK);
|
79 |
-
$rewrite_rules = array_slice($rewrite_rules,
|
80 |
$r_rule = array_keys($rewrite_rules);
|
81 |
$r_rule = array_shift($r_rule);
|
82 |
$r_rule = str_replace('/trackback', '',$r_rule);
|
@@ -92,7 +73,7 @@ function print_rewrite($wp_rewrite) {
|
|
92 |
foreach ($uris as $uri => $pagename) {
|
93 |
$wp_rewrite->add_rewrite_tag('%pagename%', "($uri)", 'pagename=');
|
94 |
$rewrite_rules = $wp_rewrite->generate_rewrite_rules($wp_rewrite->get_page_permastruct().'/printpage', EP_PAGES);
|
95 |
-
$rewrite_rules = array_slice($rewrite_rules,
|
96 |
$r_rule = array_keys($rewrite_rules);
|
97 |
$r_rule = array_shift($r_rule);
|
98 |
$r_rule = str_replace('/trackback', '',$r_rule);
|
@@ -131,7 +112,7 @@ function print_link($print_post_text = '', $print_page_text = '', $echo = true)
|
|
131 |
} else {
|
132 |
$print_text = $print_post_text;
|
133 |
}
|
134 |
-
$print_icon =
|
135 |
$print_link = get_permalink();
|
136 |
$print_html = stripslashes($print_options['print_html']);
|
137 |
// Fix For Static Page
|
@@ -202,6 +183,9 @@ function print_link_shortcode($atts) {
|
|
202 |
return __('Note: There is a print link embedded within this post, please visit this post to print it.', 'wp-print');
|
203 |
}
|
204 |
}
|
|
|
|
|
|
|
205 |
|
206 |
|
207 |
### Function: Short Code For DO NOT PRINT Content
|
@@ -217,7 +201,6 @@ function print_donotprint_shortcode2($atts, $content = null) {
|
|
217 |
### Function: Print Content
|
218 |
function print_content($display = true) {
|
219 |
global $links_text, $link_number, $max_link_number, $matched_links, $pages, $multipage, $numpages, $post;
|
220 |
-
$max_url_char = 80;
|
221 |
if (!isset($matched_links)) {
|
222 |
$matched_links = array();
|
223 |
}
|
@@ -233,6 +216,8 @@ function print_content($display = true) {
|
|
233 |
}
|
234 |
remove_shortcode('donotprint', 'print_donotprint_shortcode');
|
235 |
add_shortcode('donotprint', 'print_donotprint_shortcode2');
|
|
|
|
|
236 |
$content = apply_filters('the_content', $content);
|
237 |
$content = str_replace(']]>', ']]>', $content);
|
238 |
if(!print_can('images')) {
|
@@ -265,15 +250,12 @@ function print_content($display = true) {
|
|
265 |
$new_link = false;
|
266 |
$link_number = $matched_links[$link_url_hash];
|
267 |
}
|
268 |
-
$content = str_replace_one($link_match,
|
269 |
if ($new_link) {
|
270 |
-
if(strlen($link_url) > 100) {
|
271 |
-
$link_url = chunk_split($link_url, 100, "<br />\n");
|
272 |
-
}
|
273 |
if(preg_match('/<img(.+?)src=[\"\'](.+?)[\"\'](.*?)>/',$link_text)) {
|
274 |
-
$links_text .= '<
|
275 |
} else {
|
276 |
-
$links_text .= '<
|
277 |
}
|
278 |
}
|
279 |
}
|
@@ -289,9 +271,9 @@ function print_content($display = true) {
|
|
289 |
|
290 |
### Function: Print Categories
|
291 |
function print_categories($before = '', $after = '') {
|
292 |
-
$temp_cat = strip_tags(get_the_category_list(','
|
293 |
$temp_cat = explode(', ', $temp_cat);
|
294 |
-
$temp_cat = implode($after.', '.$before, $temp_cat);
|
295 |
echo $before.$temp_cat.$after;
|
296 |
}
|
297 |
|
@@ -333,15 +315,12 @@ function print_comments_content($display = true) {
|
|
333 |
$new_link = false;
|
334 |
$link_number = $matched_links[$link_url_hash];
|
335 |
}
|
336 |
-
$content = str_replace_one($link_match,
|
337 |
if ($new_link) {
|
338 |
-
if(strlen($link_url) > 100) {
|
339 |
-
$link_url = chunk_split($link_url, 100, "<br />\n");
|
340 |
-
}
|
341 |
if(preg_match('/<img(.+?)src=[\"\'](.+?)[\"\'](.*?)>/',$link_text)) {
|
342 |
-
$links_text .= '<
|
343 |
} else {
|
344 |
-
$links_text .= '<
|
345 |
}
|
346 |
}
|
347 |
}
|
@@ -363,10 +342,8 @@ function print_comments_number() {
|
|
363 |
$num_comments = get_comments_number();
|
364 |
if($num_comments == 0) {
|
365 |
$comment_text = __('No Comments', 'wp-print');
|
366 |
-
} elseif($num_comments == 1) {
|
367 |
-
$comment_text = __('1 Comment', 'wp-print');
|
368 |
} else {
|
369 |
-
$comment_text = sprintf(
|
370 |
}
|
371 |
} else {
|
372 |
$comment_text = __('Comments Disabled', 'wp-print');
|
@@ -392,7 +369,7 @@ function print_links($text_links = '') {
|
|
392 |
|
393 |
|
394 |
### Function: Load WP-Print
|
395 |
-
add_action('template_redirect', 'wp_print');
|
396 |
function wp_print() {
|
397 |
if(intval(get_query_var('print')) == 1 || intval(get_query_var('printpage')) == 1) {
|
398 |
include(WP_PLUGIN_DIR.'/wp-print/print.php');
|
@@ -413,8 +390,9 @@ function print_template_comments($file = '') {
|
|
413 |
|
414 |
|
415 |
### Function: Print Page Title
|
416 |
-
function print_pagetitle($
|
417 |
-
|
|
|
418 |
}
|
419 |
|
420 |
|
@@ -435,6 +413,7 @@ function remove_image($content) {
|
|
435 |
### Function: Remove Video From Text
|
436 |
function remove_video($content) {
|
437 |
$content= preg_replace('/<object[^>]*?>.*?<\/object>/', '',$content);
|
|
|
438 |
return $content;
|
439 |
}
|
440 |
|
@@ -452,6 +431,7 @@ function str_replace_one($search, $replace, $content){
|
|
452 |
### Function: Print Options
|
453 |
add_action('activate_wp-print/wp-print.php', 'print_init');
|
454 |
function print_init() {
|
|
|
455 |
// Add Options
|
456 |
$print_options = array();
|
457 |
$print_options['post_text'] = __('Print This Post', 'wp-print');
|
@@ -464,7 +444,6 @@ function print_init() {
|
|
464 |
$print_options['images'] = 1;
|
465 |
$print_options['videos'] = 0;
|
466 |
$print_options['disclaimer'] = sprintf(__('Copyright © %s %s. All rights reserved.', 'wp-print'), date('Y'), get_option('blogname'));
|
467 |
-
$print_options['text_direction'] = 'ltr';
|
468 |
add_option('print_options', $print_options, 'Print Options');
|
469 |
}
|
470 |
-
?>
|
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.40
|
7 |
Author: Lester 'GaMerZ' Chan
|
8 |
Author URI: http://lesterchan.net
|
9 |
*/
|
28 |
*/
|
29 |
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
### Create Text Domain For Translations
|
32 |
add_action('init', 'print_textdomain');
|
33 |
function print_textdomain() {
|
34 |
+
load_plugin_textdomain('wp-print', false, 'wp-print');
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
|
57 |
$print_link_text = 'print';
|
58 |
}
|
59 |
$rewrite_rules = $wp_rewrite->generate_rewrite_rule($wp_rewrite->permalink_structure.$print_link_text, EP_PERMALINK);
|
60 |
+
$rewrite_rules = array_slice($rewrite_rules, 5, 1);
|
61 |
$r_rule = array_keys($rewrite_rules);
|
62 |
$r_rule = array_shift($r_rule);
|
63 |
$r_rule = str_replace('/trackback', '',$r_rule);
|
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);
|
77 |
$r_rule = array_keys($rewrite_rules);
|
78 |
$r_rule = array_shift($r_rule);
|
79 |
$r_rule = str_replace('/trackback', '',$r_rule);
|
112 |
} else {
|
113 |
$print_text = $print_post_text;
|
114 |
}
|
115 |
+
$print_icon = plugins_url('wp-print/images/'.$print_options['print_icon']);
|
116 |
$print_link = get_permalink();
|
117 |
$print_html = stripslashes($print_options['print_html']);
|
118 |
// Fix For Static Page
|
183 |
return __('Note: There is a print link embedded within this post, please visit this post to print it.', 'wp-print');
|
184 |
}
|
185 |
}
|
186 |
+
function print_link_shortcode2($atts) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
|
190 |
|
191 |
### Function: Short Code For DO NOT PRINT Content
|
201 |
### Function: Print Content
|
202 |
function print_content($display = true) {
|
203 |
global $links_text, $link_number, $max_link_number, $matched_links, $pages, $multipage, $numpages, $post;
|
|
|
204 |
if (!isset($matched_links)) {
|
205 |
$matched_links = array();
|
206 |
}
|
216 |
}
|
217 |
remove_shortcode('donotprint', 'print_donotprint_shortcode');
|
218 |
add_shortcode('donotprint', 'print_donotprint_shortcode2');
|
219 |
+
remove_shortcode('print_link', 'print_link_shortcode');
|
220 |
+
add_shortcode('print_link', 'print_link_shortcode2');
|
221 |
$content = apply_filters('the_content', $content);
|
222 |
$content = str_replace(']]>', ']]>', $content);
|
223 |
if(!print_can('images')) {
|
250 |
$new_link = false;
|
251 |
$link_number = $matched_links[$link_url_hash];
|
252 |
}
|
253 |
+
$content = str_replace_one($link_match, "<a href=\"$link_url\" rel=\"external\">".$link_text.'</a> <sup>['.number_format_i18n($link_number).']</sup>', $content);
|
254 |
if ($new_link) {
|
|
|
|
|
|
|
255 |
if(preg_match('/<img(.+?)src=[\"\'](.+?)[\"\'](.*?)>/',$link_text)) {
|
256 |
+
$links_text .= '<p style="margin: 2px 0;">['.number_format_i18n($link_number).'] '.__('Image', 'wp-print').': <b><span dir="ltr">'.$link_url.'</span></b></p>';
|
257 |
} else {
|
258 |
+
$links_text .= '<p style="margin: 2px 0;">['.number_format_i18n($link_number).'] '.$link_text.': <b><span dir="ltr">'.$link_url.'</span></b></p>';
|
259 |
}
|
260 |
}
|
261 |
}
|
271 |
|
272 |
### Function: Print Categories
|
273 |
function print_categories($before = '', $after = '') {
|
274 |
+
$temp_cat = strip_tags(get_the_category_list(',', $parents));
|
275 |
$temp_cat = explode(', ', $temp_cat);
|
276 |
+
$temp_cat = implode($after.__(',', 'wp-print').' '.$before, $temp_cat);
|
277 |
echo $before.$temp_cat.$after;
|
278 |
}
|
279 |
|
315 |
$new_link = false;
|
316 |
$link_number = $matched_links[$link_url_hash];
|
317 |
}
|
318 |
+
$content = str_replace_one($link_match, "<a href=\"$link_url\" rel=\"external\">".$link_text.'</a> <sup>['.number_format_i18n($link_number).']</sup>', $content);
|
319 |
if ($new_link) {
|
|
|
|
|
|
|
320 |
if(preg_match('/<img(.+?)src=[\"\'](.+?)[\"\'](.*?)>/',$link_text)) {
|
321 |
+
$links_text .= '<p style="margin: 2px 0;">['.number_format_i18n($link_number).'] '.__('Image', 'wp-print').': <b><span dir="ltr">'.$link_url.'</span></b></p>';
|
322 |
} else {
|
323 |
+
$links_text .= '<p style="margin: 2px 0;">['.number_format_i18n($link_number).'] '.$link_text.': <b><span dir="ltr">'.$link_url.'</span></b></p>';
|
324 |
}
|
325 |
}
|
326 |
}
|
342 |
$num_comments = get_comments_number();
|
343 |
if($num_comments == 0) {
|
344 |
$comment_text = __('No Comments', 'wp-print');
|
|
|
|
|
345 |
} else {
|
346 |
+
$comment_text = sprintf(__ngettext('%s Comment', '%s Comments', $num_comments, 'wp-print'), number_format_i18n($num_comments));
|
347 |
}
|
348 |
} else {
|
349 |
$comment_text = __('Comments Disabled', 'wp-print');
|
369 |
|
370 |
|
371 |
### Function: Load WP-Print
|
372 |
+
add_action('template_redirect', 'wp_print', 5);
|
373 |
function wp_print() {
|
374 |
if(intval(get_query_var('print')) == 1 || intval(get_query_var('printpage')) == 1) {
|
375 |
include(WP_PLUGIN_DIR.'/wp-print/print.php');
|
390 |
|
391 |
|
392 |
### Function: Print Page Title
|
393 |
+
function print_pagetitle($page_title) {
|
394 |
+
$page_title .= ' » '.__('Print', 'wp-print');
|
395 |
+
return $page_title;
|
396 |
}
|
397 |
|
398 |
|
413 |
### Function: Remove Video From Text
|
414 |
function remove_video($content) {
|
415 |
$content= preg_replace('/<object[^>]*?>.*?<\/object>/', '',$content);
|
416 |
+
$content= preg_replace('/<embed[^>]*?>.*?<\/embed>/', '',$content);
|
417 |
return $content;
|
418 |
}
|
419 |
|
431 |
### Function: Print Options
|
432 |
add_action('activate_wp-print/wp-print.php', 'print_init');
|
433 |
function print_init() {
|
434 |
+
print_textdomain();
|
435 |
// Add Options
|
436 |
$print_options = array();
|
437 |
$print_options['post_text'] = __('Print This Post', 'wp-print');
|
444 |
$print_options['images'] = 1;
|
445 |
$print_options['videos'] = 0;
|
446 |
$print_options['disclaimer'] = sprintf(__('Copyright © %s %s. All rights reserved.', 'wp-print'), date('Y'), get_option('blogname'));
|
|
|
447 |
add_option('print_options', $print_options, 'Print Options');
|
448 |
}
|
449 |
+
?>
|
wp-print.pot
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: WP-Print 2.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2008-
|
6 |
-
"PO-Revision-Date: 2008-
|
7 |
"Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
|
8 |
"Language-Team: Lester Chan <lesterchan@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -11,8 +11,9 @@ msgstr ""
|
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"X-Poedit-Language: English\n"
|
13 |
"X-Poedit-Country: SINGAPORE\n"
|
14 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
15 |
"X-Poedit-Basepath: .\n"
|
|
|
16 |
"X-Poedit-SearchPath-0: .\n"
|
17 |
|
18 |
#: print-comments.php:23
|
@@ -44,12 +45,12 @@ msgid "By"
|
|
44 |
msgstr ""
|
45 |
|
46 |
#: print-comments.php:28
|
47 |
-
#: print-posts.php:
|
48 |
msgid "On"
|
49 |
msgstr ""
|
50 |
|
51 |
#: print-comments.php:28
|
52 |
-
#: print-posts.php:
|
53 |
#, php-format
|
54 |
msgid "%s @ %s"
|
55 |
msgstr ""
|
@@ -58,47 +59,47 @@ msgstr ""
|
|
58 |
msgid "Your comment is awaiting moderation."
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: print-options.php:
|
62 |
#: print-options.php:132
|
63 |
-
#: print-options.php:
|
64 |
msgid "Print Options"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: print-options.php:
|
68 |
msgid "Updated"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: print-options.php:
|
72 |
msgid "No Print Option Updated"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: print-options.php:
|
76 |
-
#: print-options.php:
|
77 |
msgid "UNINSTALL WP-Print"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: print-options.php:
|
81 |
#, php-format
|
82 |
msgid "Setting Key '%s' has been deleted."
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: print-options.php:
|
86 |
#, php-format
|
87 |
msgid "Error deleting Setting Key '%s'."
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: print-options.php:
|
91 |
-
#: print-options.php:
|
92 |
msgid "Uninstall WP-Print"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: print-options.php:
|
96 |
#, php-format
|
97 |
msgid "<a href=\"%s\">Click Here</a> To Finish The Uninstallation And WP-Print Will Be Deactivated Automatically."
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: print-options.php:
|
101 |
-
#: wp-print.php:
|
102 |
#, php-format
|
103 |
msgid "Copyright © %s %s. All rights reserved."
|
104 |
msgstr ""
|
@@ -119,120 +120,108 @@ msgstr ""
|
|
119 |
msgid "Print Icon"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: print-options.php:
|
123 |
msgid "Print Text Link Style"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: print-options.php:
|
127 |
msgid "Print Icon With Text Link"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: print-options.php:
|
131 |
msgid "Print Icon Only"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: print-options.php:
|
135 |
msgid "Print Text Link Only"
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: print-options.php:
|
139 |
msgid "Custom"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: print-options.php:
|
143 |
-
#: print-options.php:
|
144 |
msgid "HTML is allowed."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: print-options.php:
|
148 |
msgid "URL to the printable post/page."
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: print-options.php:
|
152 |
msgid "Print text link of the post/page that you have typed in above."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: print-options.php:
|
156 |
msgid "URL to the print icon you have chosen above."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: print-options.php:
|
160 |
-
#: print-options.php:
|
161 |
msgid "Restore Default Template"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: print-options.php:
|
165 |
msgid "Print Comments?"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: print-options.php:201
|
169 |
-
#: print-options.php:210
|
170 |
-
#: print-options.php:219
|
171 |
-
#: print-options.php:228
|
172 |
-
#: print-options.php:294
|
173 |
-
msgid "Yes"
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
#: print-options.php:202
|
177 |
#: print-options.php:211
|
178 |
#: print-options.php:220
|
179 |
#: print-options.php:229
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
msgid "No"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: print-options.php:
|
184 |
msgid "Print Links?"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: print-options.php:
|
188 |
msgid "Print Images?"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: print-options.php:
|
192 |
msgid "Print Videos?"
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: print-options.php:
|
196 |
-
msgid "Text Direction?"
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
#: print-options.php:237
|
200 |
-
msgid "Left To Right"
|
201 |
-
msgstr ""
|
202 |
-
|
203 |
-
#: print-options.php:238
|
204 |
-
msgid "Right To Left"
|
205 |
-
msgstr ""
|
206 |
-
|
207 |
-
#: print-options.php:244
|
208 |
msgid "Disclaimer/Copyright Text?"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: print-options.php:
|
212 |
msgid "Save Changes"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: print-options.php:
|
216 |
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."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: print-options.php:
|
220 |
msgid "WARNING:"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: print-options.php:
|
224 |
msgid "Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first."
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: print-options.php:
|
228 |
msgid "The following WordPress Options will be DELETED:"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: print-options.php:
|
232 |
msgid "WordPress Options"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: print-options.php:
|
236 |
msgid ""
|
237 |
"You Are About To Uninstall WP-Print From WordPress.\\n"
|
238 |
"This Action Is Not Reversible.\\n"
|
@@ -240,85 +229,88 @@ msgid ""
|
|
240 |
" Choose [Cancel] To Stop, [OK] To Uninstall."
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: print-posts.php:
|
244 |
msgid "Posted By"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: print-posts.php:
|
248 |
msgid "In"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: print-posts.php:
|
252 |
msgid "Article printed from"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: print-posts.php:
|
256 |
msgid "URL to article"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: print-posts.php:
|
260 |
msgid "Click"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: print-posts.php:
|
264 |
msgid "Click here to print."
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: print-posts.php:
|
268 |
msgid "here"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: print-posts.php:
|
272 |
msgid "to print."
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: print-posts.php:
|
276 |
msgid "No posts matched your criteria."
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: wp-print.php:
|
|
|
280 |
msgid "Print"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: wp-print.php:
|
284 |
msgid "Note: There is a print link embedded within this post, please visit this post to print it."
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: wp-print.php:
|
288 |
-
#: wp-print.php:
|
289 |
msgid "Image"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: wp-print.php:
|
293 |
-
msgid "
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: wp-print.php:
|
297 |
-
msgid "
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: wp-print.php:
|
301 |
#, php-format
|
302 |
-
msgid "%s
|
303 |
-
|
|
|
|
|
304 |
|
305 |
-
#: wp-print.php:
|
306 |
msgid "Comments Disabled"
|
307 |
msgstr ""
|
308 |
|
309 |
-
#: wp-print.php:
|
310 |
msgid "Comments Hidden"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: wp-print.php:
|
314 |
msgid "URLs in this post:"
|
315 |
msgstr ""
|
316 |
|
317 |
-
#: wp-print.php:
|
318 |
msgid "Print This Post"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#: wp-print.php:
|
322 |
msgid "Print This Page"
|
323 |
msgstr ""
|
324 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: WP-Print 2.40\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2008-12-10 00:35+0800\n"
|
6 |
+
"PO-Revision-Date: 2008-12-10 00:35+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"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"X-Poedit-Language: English\n"
|
13 |
"X-Poedit-Country: SINGAPORE\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext: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
|
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 ""
|
59 |
msgid "Your comment is awaiting moderation."
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: print-options.php:45
|
63 |
#: print-options.php:132
|
64 |
+
#: print-options.php:196
|
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:287
|
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:255
|
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:121
|
102 |
+
#: wp-print.php:446
|
103 |
#, php-format
|
104 |
msgid "Copyright © %s %s. All rights reserved."
|
105 |
msgstr ""
|
120 |
msgid "Print Icon"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: print-options.php:177
|
124 |
msgid "Print Text Link Style"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: print-options.php:180
|
128 |
msgid "Print Icon With Text Link"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: print-options.php:181
|
132 |
msgid "Print Icon Only"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: print-options.php:182
|
136 |
msgid "Print Text Link Only"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: print-options.php:183
|
140 |
msgid "Custom"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: print-options.php:187
|
144 |
+
#: print-options.php:241
|
145 |
msgid "HTML is allowed."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: print-options.php:188
|
149 |
msgid "URL to the printable post/page."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: print-options.php:189
|
153 |
msgid "Print text link of the post/page that you have typed in above."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: print-options.php:190
|
157 |
msgid "URL to the print icon you have chosen above."
|
158 |
msgstr ""
|
159 |
|
160 |
+
#: print-options.php:191
|
161 |
+
#: print-options.php:238
|
162 |
msgid "Restore Default Template"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: print-options.php:199
|
166 |
msgid "Print Comments?"
|
167 |
msgstr ""
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
#: print-options.php:202
|
170 |
#: print-options.php:211
|
171 |
#: print-options.php:220
|
172 |
#: print-options.php:229
|
173 |
+
#: print-options.php:286
|
174 |
+
msgid "Yes"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: print-options.php:203
|
178 |
+
#: print-options.php:212
|
179 |
+
#: print-options.php:221
|
180 |
+
#: print-options.php:230
|
181 |
msgid "No"
|
182 |
msgstr ""
|
183 |
|
184 |
+
#: print-options.php:208
|
185 |
msgid "Print Links?"
|
186 |
msgstr ""
|
187 |
|
188 |
+
#: print-options.php:217
|
189 |
msgid "Print Images?"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: print-options.php:226
|
193 |
msgid "Print Videos?"
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: print-options.php:236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
msgid "Disclaimer/Copyright Text?"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: print-options.php:246
|
201 |
msgid "Save Changes"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: print-options.php:257
|
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:260
|
209 |
msgid "WARNING:"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: print-options.php:261
|
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:264
|
217 |
msgid "The following WordPress Options will be DELETED:"
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: print-options.php:269
|
221 |
msgid "WordPress Options"
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: print-options.php:287
|
225 |
msgid ""
|
226 |
"You Are About To Uninstall WP-Print From WordPress.\\n"
|
227 |
"This Action Is Not Reversible.\\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:394
|
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:256
|
278 |
+
#: wp-print.php:321
|
279 |
msgid "Image"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: wp-print.php:276
|
283 |
+
msgid ","
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: wp-print.php:344
|
287 |
+
msgid "No Comments"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: wp-print.php:346
|
291 |
#, php-format
|
292 |
+
msgid "%s Comment"
|
293 |
+
msgid_plural "%s Comments"
|
294 |
+
msgstr[0] ""
|
295 |
+
msgstr[1] ""
|
296 |
|
297 |
+
#: wp-print.php:349
|
298 |
msgid "Comments Disabled"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: wp-print.php:352
|
302 |
msgid "Comments Hidden"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: wp-print.php:363
|
306 |
msgid "URLs in this post:"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: wp-print.php:437
|
310 |
msgid "Print This Post"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: wp-print.php:438
|
314 |
msgid "Print This Page"
|
315 |
msgstr ""
|
316 |
|