WordPress.org

Making WordPress.org

Changeset 3684


Ignore:
Timestamp:
07/15/2016 07:00:48 PM (5 years ago)
Author:
coffee2code
Message:

W.org P2 child theme: Discontinue display of comments for handbook pages.

Fixes #79.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/entry-handbook.php

    r550 r3684  
    4444    </div>
    4545
    46     <?php
    47     /*
    48      * Comments
    49      */
    50 
    51     $comment_field = '<div class="form"><textarea id="comment" class="expand50-100" name="comment" cols="45" rows="3"></textarea></div> <label class="post-error" for="comment" id="commenttext_error"></label>';
    52 
    53     $comment_notes_before = '<p class="comment-notes">' . ( get_option( 'require_name_email' ) ? sprintf( ' ' . __( 'Required fields are marked %s', 'p2' ), '<span class="required">*</span>' ) : '' ) . '</p>';
    54 
    55     $p2_comment_args = array(
    56         'title_reply'           => __( 'Reply', 'p2' ),
    57         'comment_field'         => $comment_field,
    58         'comment_notes_before'  => $comment_notes_before,
    59         'comment_notes_after'   => '<span class="progress spinner-comment-new"></span>',
    60         'label_submit'          => __( 'Reply', 'p2' ),
    61         'id_submit'             => 'comment-submit',
    62     );
    63 
    64     ?>
    65 
    66     <?php if ( get_comments_number() > 0 && ! post_password_required() ) : ?>
    67         <div class="discussion" style="display: none">
    68             <p>
    69                 <?php p2_discussion_links(); ?>
    70                 <a href="#" class="show-comments"><?php _e( 'Toggle Comments', 'p2' ); ?></a>
    71             </p>
    72         </div>
    73     <?php endif;
    74 
    75     wp_link_pages( array( 'before' => '<p class="page-nav">' . __( 'Pages:', 'p2' ) ) ); ?>
    76 
    7746    <div class="bottom-of-entry">&nbsp;</div>
    7847
    79     <?php if ( p2_is_ajax_request() ) : ?>
    80         <ul id="comments-<?php the_ID(); ?>" class="commentlist inlinecomments"></ul>
    81     <?php else :
    82         comments_template();
    83         $pc = 0;
    84         if ( p2_show_comment_form() && $pc == 0 && ! post_password_required() ) :
    85             $pc++; ?>
    86             <div class="respond-wrap">
    87                 <?php comment_form( $p2_comment_args ); ?>
    88             </div><?php
    89         endif;
    90     endif; ?>
    9148</li>
Note: See TracChangeset for help on using the changeset viewer.