]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/theme-compat/comments-popup.php
WordPress 4.1
[autoinstalls/wordpress.git] / wp-includes / theme-compat / comments-popup.php
1 <?php
2 /**
3  * @package WordPress
4  * @subpackage Theme_Compat
5  * @deprecated 3.0
6  *
7  * This file is here for Backwards compatibility with old themes and will be removed in a future version
8  *
9  */
10 _deprecated_file( sprintf( __( 'Theme without %1$s' ), basename(__FILE__) ), '3.0', null, sprintf( __('Please include a %1$s template in your theme.'), basename(__FILE__) ) );
11 ?><!DOCTYPE html>
12 <html xmlns="http://www.w3.org/1999/xhtml">
13 <head>
14      <title><?php printf(__('%1$s - Comments on %2$s'), get_option('blogname'), the_title('','',false)); ?></title>
15
16         <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
17         <style type="text/css" media="screen">
18                 @import url( <?php bloginfo('stylesheet_url'); ?> );
19                 body { margin: 3px; }
20         </style>
21
22 </head>
23 <body id="commentspopup">
24
25 <h1 id="header"><a href="" title="<?php echo get_option('blogname'); ?>"><?php echo get_option('blogname'); ?></a></h1>
26
27 <?php
28 /* Don't remove these lines. */
29 add_filter('comment_text', 'popuplinks');
30 if ( have_posts() ) :
31 while( have_posts()) : the_post();
32 ?>
33 <h2 id="comments"><?php _e('Comments'); ?></h2>
34
35 <p><a href="<?php echo esc_url( get_post_comments_feed_link($post->ID) ); ?>"><?php _e('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.'); ?></a></p>
36
37 <?php if ( pings_open() ) { ?>
38 <p><?php printf(__('The <abbr title="Universal Resource Locator">URL</abbr> to TrackBack this entry is: <em>%s</em>'), get_trackback_url()); ?></p>
39 <?php } ?>
40
41 <?php
42 // this line is WordPress' motor, do not delete it.
43 $commenter = wp_get_current_commenter();
44 $comments = get_approved_comments($id);
45 $post = get_post($id);
46 if ( post_password_required($post) ) {  // and it doesn't match the cookie
47         echo(get_the_password_form());
48 } else { ?>
49
50 <?php if ($comments) { ?>
51 <ol id="commentlist">
52 <?php foreach ($comments as $comment) { ?>
53         <li id="comment-<?php comment_ID() ?>">
54         <?php comment_text() ?>
55         <p><cite><?php comment_type(); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
56         </li>
57
58 <?php } // end for each comment ?>
59 </ol>
60 <?php } else { // this is displayed if there are no comments so far ?>
61         <p><?php _e('No comments yet.'); ?></p>
62 <?php } ?>
63
64 <?php if ( comments_open() ) { ?>
65 <h2><?php _e('Leave a comment'); ?></h2>
66 <p><?php printf(__('Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code>%s</code>'), allowed_tags()); ?></p>
67
68 <form action="<?php echo site_url(); ?>/wp-comments-post.php" method="post" id="commentform">
69 <?php if ( $user_ID ) : ?>
70         <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out &raquo;</a>'), get_edit_user_link(), $user_identity, wp_logout_url(get_permalink())); ?></p>
71 <?php else : ?>
72         <p>
73           <input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr( $commenter['comment_author'] ); ?>" size="28" tabindex="1" />
74            <label for="author"><?php _e('Name'); ?></label>
75         </p>
76
77         <p>
78           <input type="text" name="email" id="email" value="<?php echo esc_attr( $commenter['comment_author_email'] ); ?>" size="28" tabindex="2" />
79            <label for="email"><?php _e('E-mail'); ?></label>
80         </p>
81
82         <p>
83           <input type="text" name="url" id="url" value="<?php echo esc_attr( $commenter['comment_author_url'] ); ?>" size="28" tabindex="3" />
84            <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>'); ?></label>
85         </p>
86 <?php endif; ?>
87
88         <p>
89           <label for="comment"><?php _e('Your Comment'); ?></label>
90         <br />
91           <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
92         </p>
93
94         <p>
95           <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
96           <input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" />
97           <input name="submit" type="submit" tabindex="5" value="<?php esc_attr_e('Say It!' ); ?>" />
98         </p>
99         <?php
100         /** This filter is documented in wp-includes/comment-template.php */
101         do_action( 'comment_form', $post->ID );
102         ?>
103 </form>
104 <?php } else { // comments are closed ?>
105 <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
106 <?php }
107 } // end password check
108 ?>
109
110 <div><strong><a href="javascript:window.close()"><?php _e('Close this window.'); ?></a></strong></div>
111
112 <?php // if you delete this the sky will fall on your head
113 endwhile; // have_posts()
114 else: // have_posts()
115 ?>
116 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
117 <?php endif; ?>
118 <!-- // this is just the end of the motor - don't touch that line either :) -->
119 <?php //} ?>
120 <p class="credit"><?php timer_stop(1); ?> <cite><?php printf(__('Powered by <a href="%s" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>WordPress</strong></a>'), 'https://wordpress.org/'); ?></cite></p>
121 <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
122 <script type="text/javascript">
123 <!--
124 document.onkeypress = function esc(e) {
125         if(typeof(e) == "undefined") { e=event; }
126         if (e.keyCode == 27) { self.close(); }
127 }
128 // -->
129 </script>
130 </body>
131 </html>