PluginProbe
WP-Print / 2.30
WP-Print v2.30
3.0.0 trunk 1.00 2.00 2.01 2.02 2.03 2.04 2.05 2.06 2.10 2.11 2.20 2.30 2.31 2.40 2.50 2.52 2.53 2.54 2.55 2.56 2.57 2.57.1 2.57.2 All 29 releases
wp-print / print-posts.php

print-posts.php in WP-Print 2.30, at print-posts.php

92 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 +----------------------------------------------------------------+
4 | |
5 | WordPress 2.5 Plugin: WP-Print 2.30 |
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 Page |
14 | - wp-content/plugins/wp-print/print-posts.php |
15 | |
16 +----------------------------------------------------------------+
17 */
18
19
20 ### Variables
21 $links_text = '';
22
23 ### Actions
24 add_action('init', 'print_content');
25
26 ### Filters
27 add_filter('wp_title', 'print_pagetitle');
28 add_filter('comments_template', 'print_template_comments');
29
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 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
44 <html xmlns="http://www.w3.org/1999/xhtml">
45 <head>
46 <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
47 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
48 <meta name="Robots" content="noindex, nofollow" />
49 <style type="text/css" media="screen, print">
50 BODY {
51 direction: <?php echo $text_direction; ?>;
52 text-align: <?php echo $text_align; ?>;
53 }
54 #Outline {
55 direction: <?php echo $text_direction; ?>;
56 text-align: <?php echo $text_align; ?>;
57 }
58 </style>
59 <?php if(@file_exists(TEMPLATEPATH.'/print-css.css')): ?>
60 <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
61 <?php else: ?>
62 <link rel="stylesheet" href="<?php bloginfo('wpurl'); ?>/wp-content/plugins/wp-print/print-css.css" type="text/css" media="screen, print" />
63 <?php endif; ?>
64 </head>
65 <body>
66 <p style="text-align: center;"><strong>- <?php bloginfo('name'); ?> - <?php bloginfo('url')?> -</strong></p>
67 <center>
68 <div id="Outline">
69 <?php if (have_posts()): ?>
70 <?php while (have_posts()): the_post(); ?>
71 <p id="BlogTitle"><?php the_title(); ?></p>
72 <p id="BlogDate"><?php _e('Posted By', 'wp-print'); ?> <u><?php the_author(); ?></u> <?php _e('On', 'wp-print'); ?> <?php the_time(sprintf(__('%s @ %s', 'wp-print'), get_option('date_format'), get_option('time_format'))); ?> <?php _e('In', 'wp-print'); ?> <?php print_categories('<u>', '</u>'); ?> | <u><a href='#comments_controls'><?php print_comments_number(); ?></a></u></p>
73 <div id="BlogContent"><?php print_content(); ?></div>
74 <?php endwhile; ?>
75 <hr class="Divider" style="text-align: center;" />
76 <?php if(print_can('comments')): ?>
77 <?php comments_template(); ?>
78 <?php endif; ?>
79 <p style="text-align: <?php echo $text_direction; ?>;"><?php _e('Article printed from', 'wp-print'); ?> <?php bloginfo('name'); ?>: <strong><?php bloginfo('url'); ?></strong></p>
80 <p style="text-align: <?php echo $text_direction; ?>;"><?php _e('URL to article', 'wp-print'); ?>: <strong><?php the_permalink(); ?></strong></p>
81 <?php if(print_can('links')): ?>
82 <p style="text-align: <?php echo $text_direction; ?>;"><?php print_links(); ?></p>
83 <?php endif; ?>
84 <p style="text-align: <?php echo $text_align_opposite; ?>;" 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>
85 <?php else: ?>
86 <p style="text-align: <?php echo $text_direction; ?>;"><?php _e('No posts matched your criteria.', 'wp-print'); ?></p>
87 <?php endif; ?>
88 </div>
89 </center>
90 <p style="text-align: center;"><?php echo stripslashes($print_options['disclaimer']); ?></p>
91 </body>
92 </html>