WordPress.org

Make WordPress Core

Changeset 13130


Ignore:
Timestamp:
02/14/2010 01:16:58 AM (8 years ago)
Author:
dd32
Message:

Comments.php PHP cleanup. See #9015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/comments.php

    r13129 r13130  
    1             <div id="comments">
    21<?php
    32    // Do not delete these lines
    4     $req = get_option( 'require_name_email' ); // Checks if fields are required.
    5     if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) )
     3    if ( ! defined('ABSPATH') )
    64        die ( __( 'Please do not load this page directly. Thanks!', 'twentyten' ) );
    7     if ( post_password_required() ) :
    85?>
     6            <div id="comments">
     7<?php if ( post_password_required() ) : ?>
    98                <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div>
    109            </div><!-- .comments -->
     
    2120            <h3 id="comments-title"><?php comments_number( __('No Responses to', 'twentyten'), __('One Response to', 'twentyten'), __('% Responses to', 'twentyten') );?>  <em><?php the_title(); ?></em></h3>
    2221
    23 <?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : // are there comments to navigate through ?>
     22<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
    2423            <div class="navigation">
    2524                <div class="nav-previous"><?php previous_comments_link( __('&larr; Older Comments', 'twentyten') ); ?></div>
     
    3231            </ol>
    3332
    34 <?php $total_pages = get_comment_pages_count(); if ( $total_pages > 1 ) : // are there comments to navigate through ?>
     33<?php if ( get_comment_pages_count() > 1 ) : // are there comments to navigate through ?>
    3534            <div class="navigation">
    3635                <div class="nav-previous"><?php previous_comments_link( __('&larr; Older Comments', 'twentyten') ); ?></div>
Note: See TracChangeset for help on using the changeset viewer.