Make WordPress Core

Ticket #28617: 28617.2.diff

File 28617.2.diff, 22.0 KB (added by peterwilsoncc, 9 years ago)
  • src/wp-admin/css/common.css

    diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
    index 9d9d2cf..6afce72 100644
    a b div.error p, 
    13141314}
    13151315
    13161316.notice-alt {
     1317        -webkit-box-shadow: none;
    13171318        box-shadow: none;
    13181319}
    13191320
  • src/wp-admin/includes/file.php

    diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
    index 62b644b..ef31957 100644
    a b $wp_file_descriptions = array( 
    1616        'editor-style-rtl.css' => __( 'Visual Editor RTL Stylesheet' ),
    1717        'rtl.css' => __( 'RTL Stylesheet' ),
    1818        'comments.php' => __( 'Comments' ),
    19         'comments-popup.php' => __( 'Popup Comments' ),
    2019        'footer.php' => __( 'Theme Footer' ),
    2120        'header.php' => __( 'Theme Header' ),
    2221        'sidebar.php' => __( 'Sidebar' ),
    $wp_file_descriptions = array( 
    4140        'wp-layout.css' => __( 'Stylesheet' ),
    4241        'wp-comments.php' => __( 'Comments Template' ),
    4342        'wp-comments-popup.php' => __( 'Popup Comments Template' ),
     43        'comments-popup.php' => __( 'Popup Comments' ),
    4444);
    4545
    4646/**
  • src/wp-admin/includes/update-core.php

    diff --git a/src/wp-admin/includes/update-core.php b/src/wp-admin/includes/update-core.php
    index 0de0ab3..83a462d 100644
    a b $_old_files = array( 
    699699'wp-admin/js/wp-fullscreen.min.js',
    700700'wp-includes/js/tinymce/wp-mce-help.php',
    701701'wp-includes/js/tinymce/plugins/wpfullscreen',
     702// 4.4
     703'wp-includes/theme-compat/comments-popup.php',
    702704);
    703705
    704706/**
  • src/wp-includes/canonical.php

    diff --git a/src/wp-includes/canonical.php b/src/wp-includes/canonical.php
    index a88b3a8..b3b8a2b 100644
    a b  
    1717 * prevents penalty for duplicate content by redirecting all incoming links to
    1818 * one or the other.
    1919 *
    20  * Prevents redirection for feeds, trackbacks, searches, comment popup, and
     20 * Prevents redirection for feeds, trackbacks, searches, and
    2121 * admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7+,
    2222 * page/post previews, WP admin, Trackbacks, robots.txt, searches, or on POST
    2323 * requests.
    function redirect_canonical( $requested_url = null, $do_redirect = true ) { 
    5555                }
    5656        }
    5757
    58         if ( is_trackback() || is_search() || is_comments_popup() || is_admin() || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) ) {
     58        if ( is_trackback() || is_search() || is_admin() || is_preview() || is_robots() || ( $is_IIS && !iis7_supports_permalinks() ) ) {
    5959                return;
    6060        }
    6161
  • src/wp-includes/class-wp.php

    diff --git a/src/wp-includes/class-wp.php b/src/wp-includes/class-wp.php
    index 47f97d4..8ab27a7 100644
    a b class WP { 
    1515         * @access public
    1616         * @var array
    1717         */
    18         public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'title');
     18        public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type', 'title');
    1919
    2020        /**
    2121         * Private query variables.
  • src/wp-includes/comment-template.php

    diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
    index d8c16a9..26c560d 100644
    a b function comments_template( $file = '/comments.php', $separate_comments = false 
    12751275}
    12761276
    12771277/**
    1278  * Display the JS popup script to show a comment.
    1279  *
    1280  * If the $file parameter is empty, then the home page is assumed. The defaults
    1281  * for the window are 400px by 400px.
    1282  *
    1283  * For the comment link popup to work, this function has to be called or the
    1284  * normal comment link will be assumed.
    1285  *
    1286  * @global string $wpcommentspopupfile  The URL to use for the popup window.
    1287  * @global int    $wpcommentsjavascript Whether to use JavaScript. Set when function is called.
    1288  *
    1289  * @since 0.71
    1290  *
    1291  * @param int $width  Optional. The width of the popup window. Default 400.
    1292  * @param int $height Optional. The height of the popup window. Default 400.
    1293  * @param string $file Optional. Sets the location of the popup window.
    1294  */
    1295 function comments_popup_script( $width = 400, $height = 400, $file = '' ) {
    1296         global $wpcommentspopupfile, $wpcommentsjavascript;
    1297 
    1298         if (empty ($file)) {
    1299                 $wpcommentspopupfile = '';  // Use the index.
    1300         } else {
    1301                 $wpcommentspopupfile = $file;
    1302         }
    1303 
    1304         $wpcommentsjavascript = 1;
    1305         $javascript = "<script type='text/javascript'>\nfunction wpopen (macagna) {\n    window.open(macagna, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";
    1306         echo $javascript;
    1307 }
    1308 
    1309 /**
    1310  * Displays the link to the comments popup window for the current post ID.
    1311  *
    1312  * Is not meant to be displayed on single posts and pages. Should be used
    1313  * on the lists of posts
    1314  *
    1315  * @global string $wpcommentspopupfile  The URL to use for the popup window.
    1316  * @global int    $wpcommentsjavascript Whether to use JavaScript. Set when function is called.
     1278 * Displays the link to the comments for the current post ID.
    13171279 *
    13181280 * @since 0.71
    13191281 *
    function comments_popup_script( $width = 400, $height = 400, $file = '' ) { 
    13271289 *                          Default false.
    13281290 */
    13291291function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) {
    1330         global $wpcommentspopupfile, $wpcommentsjavascript;
    1331 
    13321292        $id = get_the_ID();
    13331293        $title = get_the_title();
    13341294        $number = get_comments_number( $id );
    function comments_popup_link( $zero = false, $one = false, $more = false, $css_c 
    13651325        }
    13661326
    13671327        echo '<a href="';
    1368         if ( $wpcommentsjavascript ) {
    1369                 if ( empty( $wpcommentspopupfile ) )
    1370                         $home = home_url();
    1371                 else
    1372                         $home = get_option('siteurl');
    1373                 echo $home . '/' . $wpcommentspopupfile . '?comments_popup=' . $id;
    1374                 echo '" onclick="wpopen(this.href); return false"';
     1328        if ( 0 == $number ) {
     1329                $respond_link = get_permalink() . '#respond';
     1330                /**
     1331                 * Filter the respond link when a post has no comments.
     1332                 *
     1333                 * @since 4.4.0
     1334                 *
     1335                 * @param string $respond_link The default response link.
     1336                 * @param integer $id The post ID.
     1337                 */
     1338                echo apply_filters( 'respond_link', $respond_link, $id );
    13751339        } else {
    1376                 // if comments_popup_script() is not in the template, display simple comment link
    1377                 if ( 0 == $number ) {
    1378                         $respond_link = get_permalink() . '#respond';
    1379                         /**
    1380                          * Filter the respond link when a post has no comments.
    1381                          *
    1382                          * @since 4.4.0
    1383                          *
    1384                          * @param string $respond_link The default response link.
    1385                          * @param integer $id The post ID.
    1386                          */
    1387                         echo apply_filters( 'respond_link', $respond_link, $id );
    1388                 } else {
    1389                         comments_link();
    1390                 }
    1391                 echo '"';
     1340                comments_link();
    13921341        }
     1342        echo '"';
    13931343
    13941344        if ( !empty( $css_class ) ) {
    13951345                echo ' class="'.$css_class.'" ';
    function comments_popup_link( $zero = false, $one = false, $more = false, $css_c 
    13971347
    13981348        $attributes = '';
    13991349        /**
    1400          * Filter the comments popup link attributes for display.
     1350         * Filter the comments link attributes for display.
    14011351         *
    14021352         * @since 2.5.0
    14031353         *
    1404          * @param string $attributes The comments popup link attributes. Default empty.
     1354         * @param string $attributes The comments link attributes. Default empty.
    14051355         */
    14061356        echo apply_filters( 'comments_popup_link_attributes', $attributes );
    14071357
  • src/wp-includes/deprecated.php

    diff --git a/src/wp-includes/deprecated.php b/src/wp-includes/deprecated.php
    index 914d137..d9e3b33 100644
    a b function wp_get_http( $url, $file_path = false, $red = 1 ) { 
    36193619        clearstatcache();
    36203620
    36213621        return $headers;
     3622
     3623}
     3624
     3625/**
     3626 * Retrieve path of comment popup template in current or parent template.
     3627 *
     3628 * @since 1.5.0
     3629 * @deprecated 4.4.0
     3630 *
     3631 * @return string Full path to comments popup template file.
     3632 */
     3633function get_comments_popup_template() {
     3634        _deprecated_function( __FUNCTION__, '4.4' );
     3635
     3636        return '';
     3637}
     3638
     3639/**
     3640 * Whether the current URL is within the comments popup window.
     3641 *
     3642 * @since 1.5.0
     3643 * @deprecated 4.4.0
     3644 *
     3645 * @return bool
     3646 */
     3647function is_comments_popup() {
     3648        _deprecated_function( __FUNCTION__, '4.4' );
     3649
     3650        return false;
     3651}
     3652
     3653/**
     3654 * Display the JS popup script to show a comment.
     3655 *
     3656 * @since 0.71
     3657 * @deprecated 4.4.0
     3658 */
     3659function comments_popup_script() {
     3660        _deprecated_function( __FUNCTION__, '4.4' );
     3661}
     3662
     3663/**
     3664 * Adds element attributes to open links in new windows.
     3665 *
     3666 * @since 0.71
     3667 * @deprecated 4.4.0
     3668 *
     3669 * @param string $text Content to replace links to open in a new window.
     3670 * @return string Content that has filtered links.
     3671 */
     3672function popuplinks( $text ) {
     3673        _deprecated_function( __FUNCTION__, '4.4' );
     3674        $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
     3675        return $text;
    36223676}
  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index 7140dc2..83a4a37 100644
    a b function iso8601_to_datetime( $date_string, $timezone = 'user' ) { 
    26152615}
    26162616
    26172617/**
    2618  * Adds a element attributes to open links in new windows.
    2619  *
    2620  * Comment text in popup windows should be filtered through this. Right now it's
    2621  * a moderately dumb function, ideally it would detect whether a target or rel
    2622  * attribute was already there and adjust its actions accordingly.
    2623  *
    2624  * @since 0.71
    2625  *
    2626  * @param string $text Content to replace links to open in a new window.
    2627  * @return string Content that has filtered links.
    2628  */
    2629 function popuplinks( $text ) {
    2630         $text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
    2631         return $text;
    2632 }
    2633 
    2634 /**
    26352618 * Strips out all characters that are not allowable in an email.
    26362619 *
    26372620 * @since 1.5.0
  • src/wp-includes/query.php

    diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php
    index 7abd4d4..b33544b 100644
    a b function is_tax( $taxonomy = '', $term = '' ) { 
    297297}
    298298
    299299/**
    300  * Whether the current URL is within the comments popup window.
    301  *
    302  * @since 1.5.0
    303  *
    304  * @global WP_Query $wp_query Global WP_Query instance.
    305  *
    306  * @return bool
    307  */
    308 function is_comments_popup() {
    309         global $wp_query;
    310 
    311         if ( ! isset( $wp_query ) ) {
    312                 _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
    313                 return false;
    314         }
    315 
    316         return $wp_query->is_comments_popup();
    317 }
    318 
    319 /**
    320300 * Is the query for an existing date archive?
    321301 *
    322302 * @since 1.5.0
    function the_comment() { 
    842822 * @link https://codex.wordpress.org/Function_Reference/WP_Query Codex page.
    843823 *
    844824 * @since 1.5.0
     825 * @since 4.4.0 Removed the `$comments_popup` property.
    845826 */
    846827class WP_Query {
    847828
    class WP_Query { 
    12011182        public $is_404 = false;
    12021183
    12031184        /**
    1204          * Set if query is within comments popup window.
    1205          *
    1206          * @since 1.5.0
    1207          * @access public
    1208          * @var bool
    1209          */
    1210         public $is_comments_popup = false;
    1211 
    1212         /**
    12131185         * Set if query is paged
    12141186         *
    12151187         * @since 1.5.0
    class WP_Query { 
    13421314                $this->is_trackback = false;
    13431315                $this->is_home = false;
    13441316                $this->is_404 = false;
    1345                 $this->is_comments_popup = false;
    13461317                $this->is_paged = false;
    13471318                $this->is_admin = false;
    13481319                $this->is_attachment = false;
    class WP_Query { 
    13941365         * Fills in the query variables, which do not exist within the parameter.
    13951366         *
    13961367         * @since 2.1.0
     1368         * @since 4.4.0 Removed the `comments_popup` public query variable.
    13971369         * @access public
    13981370         *
    13991371         * @param array $array Defined query variables.
    class WP_Query { 
    14291401                        , 'feed'
    14301402                        , 'tb'
    14311403                        , 'paged'
    1432                         , 'comments_popup'
    14331404                        , 'meta_key'
    14341405                        , 'meta_value'
    14351406                        , 'preview'
    class WP_Query { 
    14631434         * @since 4.2.0 Introduced the ability to order by specific clauses of a `$meta_query`, by passing the clause's
    14641435         *              array key to `$orderby`.
    14651436         * @since 4.4.0 Introduced `$post_name__in` and `$title` parameters.
     1437         * @since 4.4.0 Removed the `$comments_popup` parameter.
    14661438         * @access public
    14671439         *
    14681440         * @param string|array $query {
    class WP_Query { 
    14811453         *     @type string       $category_name           Use category slug (not name, this or any children).
    14821454         *     @type int          $comments_per_page       The number of comments to return per page.
    14831455         *                                                 Default 'comments_per_page' option.
    1484          *     @type int|string   $comments_popup          Whether the query is within the comments popup. Default empty.
    14851456         *     @type array        $date_query              An associative array of WP_Date_Query arguments.
    14861457         *                                                 {@see WP_Date_Query::__construct()}
    14871458         *     @type int          $day                     Day of the month. Default empty. Accepts numbers 1-31.
    class WP_Query { 
    17421713                if ( '' != $qv['paged'] && ( intval($qv['paged']) > 1 ) )
    17431714                        $this->is_paged = true;
    17441715
    1745                 if ( '' != $qv['comments_popup'] )
    1746                         $this->is_comments_popup = true;
    1747 
    17481716                // if we're previewing inside the write screen
    17491717                if ( '' != $qv['preview'] )
    17501718                        $this->is_preview = true;
    class WP_Query { 
    17621730                if ( $this->is_feed && ( !empty($qv['withcomments']) || ( empty($qv['withoutcomments']) && $this->is_singular ) ) )
    17631731                        $this->is_comment_feed = true;
    17641732
    1765                 if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $this->is_robots ) )
     1733                if ( !( $this->is_singular || $this->is_archive || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_robots ) )
    17661734                        $this->is_home = true;
    17671735
    17681736                // Correct is_* for page_on_front and page_for_posts
    class WP_Query { 
    26842652                        $where .= " AND $wpdb->posts.post_name IN ('" . implode( "' ,'", $q['post_name__in'] ) . "')";
    26852653                }
    26862654
    2687                 if ( intval($q['comments_popup']) )
    2688                         $q['p'] = absint($q['comments_popup']);
    2689 
    26902655                // If an attachment is requested by number, let it supersede any post number.
    26912656                if ( $q['attachment_id'] )
    26922657                        $q['p'] = absint($q['attachment_id']);
    class WP_Query { 
    42814246         * Whether the current URL is within the comments popup window.
    42824247         *
    42834248         * @since 3.1.0
     4249         * @deprecated 4.4.0
    42844250         *
    42854251         * @return bool
    42864252         */
    42874253        public function is_comments_popup() {
    4288                 return (bool) $this->is_comments_popup;
     4254                _deprecated_function( __FUNCTION__, '4.4' );
     4255
     4256                return false;
    42894257        }
    42904258
    42914259        /**
  • src/wp-includes/template-loader.php

    diff --git a/src/wp-includes/template-loader.php b/src/wp-includes/template-loader.php
    index 95216fe..b576a63 100644
    a b if ( defined('WP_USE_THEMES') && WP_USE_THEMES ) : 
    5959        elseif ( is_author()         && $template = get_author_template()         ) :
    6060        elseif ( is_date()           && $template = get_date_template()           ) :
    6161        elseif ( is_archive()        && $template = get_archive_template()        ) :
    62         elseif ( is_comments_popup() && $template = get_comments_popup_template() ) :
    6362        elseif ( is_paged()          && $template = get_paged_template()          ) :
    6463        else :
    6564                $template = get_index_template();
  • src/wp-includes/template.php

    diff --git a/src/wp-includes/template.php b/src/wp-includes/template.php
    index 3e4e9a4..a75876b 100644
    a b function get_attachment_template() { 
    459459}
    460460
    461461/**
    462  * Retrieve path of comment popup template in current or parent template.
    463  *
    464  * Checks for comment popup template in current template, if it exists or in the
    465  * parent template.
    466  *
    467  * The template path is filterable via the dynamic {@see '$type_template'} hook,
    468  * e.g. 'commentspopup_template'.
    469  *
    470  * @since 1.5.0
    471  *
    472  * @see get_query_template()
    473  *
    474  * @return string Full path to comments popup template file.
    475  */
    476 function get_comments_popup_template() {
    477         $template = get_query_template( 'comments_popup', array( 'comments-popup.php' ) );
    478 
    479         // Backward compat code will be removed in a future release.
    480         if ('' == $template)
    481                 $template = ABSPATH . WPINC . '/theme-compat/comments-popup.php';
    482 
    483         return $template;
    484 }
    485 
    486 /**
    487462 * Retrieve the name of the highest priority template file that exists.
    488463 *
    489464 * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
  • deleted file src/wp-includes/theme-compat/comments-popup.php

    diff --git a/src/wp-includes/theme-compat/comments-popup.php b/src/wp-includes/theme-compat/comments-popup.php
    deleted file mode 100644
    index 5483eba..0000000
    + -  
    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
    38 // this line is WordPress' motor, do not delete it.
    39 $commenter = wp_get_current_commenter();
    40 $comments = get_approved_comments($id);
    41 $post = get_post($id);
    42 if ( post_password_required($post) ) {  // and it doesn't match the cookie
    43         echo(get_the_password_form());
    44 } else { ?>
    45 
    46 <?php if ($comments) { ?>
    47 <ol id="commentlist">
    48 <?php foreach ($comments as $comment) { ?>
    49         <li id="comment-<?php comment_ID() ?>">
    50         <?php comment_text() ?>
    51         <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( $comment ), get_comment_date( '', $comment ), get_comment_ID(), get_comment_time()); ?></cite></p>
    52         </li>
    53 
    54 <?php } // end for each comment ?>
    55 </ol>
    56 <?php } else { // this is displayed if there are no comments so far ?>
    57         <p><?php _e('No comments yet.'); ?></p>
    58 <?php } ?>
    59 
    60 <?php if ( comments_open() ) { ?>
    61 <h2><?php _e('Leave a comment'); ?></h2>
    62 
    63 <form action="<?php echo site_url(); ?>/wp-comments-post.php" method="post" id="commentform">
    64 <?php if ( $user_ID ) : ?>
    65         <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>
    66 <?php else : ?>
    67         <p>
    68           <input type="text" name="author" id="author" class="textarea" value="<?php echo esc_attr( $commenter['comment_author'] ); ?>" size="28" tabindex="1" />
    69            <label for="author"><?php _e('Name'); ?></label>
    70         </p>
    71 
    72         <p>
    73           <input type="text" name="email" id="email" value="<?php echo esc_attr( $commenter['comment_author_email'] ); ?>" size="28" tabindex="2" />
    74            <label for="email"><?php _e('Email'); ?></label>
    75         </p>
    76 
    77         <p>
    78           <input type="text" name="url" id="url" value="<?php echo esc_attr( $commenter['comment_author_url'] ); ?>" size="28" tabindex="3" />
    79            <label for="url"><?php _e('<abbr title="Universal Resource Locator">URL</abbr>'); ?></label>
    80         </p>
    81 <?php endif; ?>
    82 
    83         <p>
    84           <label for="comment"><?php _e('Your Comment'); ?></label>
    85         <br />
    86           <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
    87         </p>
    88 
    89         <p>
    90           <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    91           <input type="hidden" name="redirect_to" value="<?php echo esc_attr($_SERVER["REQUEST_URI"]); ?>" />
    92           <input name="submit" type="submit" tabindex="5" value="<?php esc_attr_e('Say It!' ); ?>" />
    93         </p>
    94         <?php
    95         /** This filter is documented in wp-includes/comment-template.php */
    96         do_action( 'comment_form', $post->ID );
    97         ?>
    98 </form>
    99 <?php } else { // comments are closed ?>
    100 <p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
    101 <?php }
    102 } // end password check
    103 ?>
    104 
    105 <div><strong><a href="javascript:window.close()"><?php _e('Close this window.'); ?></a></strong></div>
    106 
    107 <?php // if you delete this the sky will fall on your head
    108 endwhile; // have_posts()
    109 else: // have_posts()
    110 ?>
    111 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    112 <?php endif; ?>
    113 <!-- // this is just the end of the motor - don't touch that line either :) -->
    114 <?php //} ?>
    115 <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>
    116 <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
    117 <script type="text/javascript">
    118 <!--
    119 document.onkeypress = function esc(e) {
    120         if(typeof(e) == "undefined") { e=event; }
    121         if (e.keyCode == 27) { self.close(); }
    122 }
    123 // -->
    124 </script>
    125 </body>
    126 </html>