PluginProbe
WP-Print / 2.56
WP-Print v2.56
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.56, at print-posts.php

147 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 global $text_direction;
16 ?>
17 <!DOCTYPE html>
18 <html lang="en">
19 <head>
20 <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
21 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
22 <meta name="Robots" content="noindex, nofollow" />
23 <?php if(@file_exists(get_stylesheet_directory().'/print-css.css')): ?>
24 <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css.css" type="text/css" media="screen, print" />
25 <?php else: ?>
26 <link rel="stylesheet" href="<?php echo plugins_url('wp-print/print-css.css'); ?>" type="text/css" media="screen, print" />
27 <?php endif; ?>
28 <?php if('rtl' == $text_direction): ?>
29 <?php if(@file_exists(get_stylesheet_directory().'/print-css-rtl.css')): ?>
30 <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/print-css-rtl.css" type="text/css" media="screen, print" />
31 <?php else: ?>
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
39 <main role="main" class="center">
40
41 <?php if (have_posts()): ?>
42
43 <header class="entry-header">
44
45 <span class="hat">
46 <strong>
47 - <?php bloginfo('name'); ?>
48 -
49 <span dir="ltr"><?php bloginfo('url')?></span>
50 -
51 </strong>
52 </span>
53
54 <?php while (have_posts()): the_post(); ?>
55
56 <h1 class="entry-title">
57 <?php the_title(); ?>
58 </h1>
59
60 <span class="entry-date">
61
62 <?php _e('Posted By', 'wp-print'); ?>
63
64 <cite><?php the_author(); ?></cite>
65
66 <?php _e('On', 'wp-print'); ?>
67
68 <time>
69 <?php the_time(sprintf(__('%s @ %s', 'wp-print'),
70 get_option('date_format'),
71 get_option('time_format')));
72 ?>
73 </time>
74
75 <span>
76 <?php _e('In', 'wp-print'); ?>
77 <?php print_categories(); ?> |
78 </span>
79
80 <a href='#comments_controls'>
81 <?php print_comments_number(); ?>
82 </a>
83
84 </span>
85
86 </header>
87
88 <div class="entry-content">
89
90 <?php print_content(); ?>
91
92 </div>
93
94 <?php endwhile; ?>
95
96 <div class="comments">
97 <?php if(print_can('comments')): ?>
98 <?php comments_template(); ?>
99 <?php endif; ?>
100 </div>
101
102 <footer class="footer">
103 <p>
104 <?php _e('Article printed from', 'wp-print'); ?>
105 <?php bloginfo('name'); ?>:
106
107 <strong dir="ltr">
108 <?php bloginfo('url'); ?>
109 </strong>
110 </p>
111
112 <p>
113 <?php _e('URL to article', 'wp-print'); ?>:
114 <strong dir="ltr">
115 <?php the_permalink(); ?>
116 </strong>
117 </p>
118
119 <?php if(print_can('links')): ?>
120 <p><?php print_links(); ?></p>
121 <?php endif; ?>
122
123 <p style="text-align: <?php echo ('rtl' == $text_direction) ? 'left' : 'right'; ?>;" id="print-link">
124 <a href="#Print" onclick="window.print(); return false;" title="<?php _e('Click here to print.', 'wp-print'); ?>">
125 <?php _e('Click', 'wp-print'); ?>
126 <?php _e('here', 'wp-print'); ?>
127 <?php _e('to print.', 'wp-print'); ?>
128 </a>
129 </p>
130
131 <?php else: ?>
132 <p>
133 <?php _e('No posts matched your criteria.', 'wp-print'); ?>
134 </p>
135 <?php endif; ?>
136
137 <p style="text-align: center;">
138 <?php echo stripslashes($print_options['disclaimer']); ?>
139 </p>
140 </footer>
141
142 </main>
143
144
145 </body>
146 </html>
147