Make WordPress Core


Ignore:
Timestamp:
12/30/2004 10:58:06 AM (21 years ago)
Author:
saxmatt
Message:

Moving default template stuff into wp-includes, uncluttering root

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment-functions.php

    r1992 r2009  
    33// Template functions
    44
    5 function comments_template() {
    6     global $withcomments, $post, $wpdb, $id, $comment;
     5function comments_template( $show ) {
     6    global $wp_query, $withcomments, $post, $wpdb, $id, $comment;
    77
    88    if ( is_single() || is_page() || $withcomments ) :
     
    1313        $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
    1414
    15         $template = get_template_directory();
    16         $template .= "/comments.php";
    17 
    18         if (file_exists($template)) {
    19             include($template);
    20         }   else {
    21             include(ABSPATH . 'wp-comments.php');
    22         }
     15    if ( file_exists( TEMPLATEPATH . '/comments.php') )
     16        require( TEMPLATEPATH . '/comments.php');
     17    else
     18        require( ABSPATH . 'wp-includes/wp-comments.php');
    2319
    2420    endif;
     
    7369
    7470        if (empty ($file)) {
    75             $template = TEMPLATEPATH . '/comments-popup.php';
    76             if (file_exists($template)) {
    77                 $wpcommentspopupfile = str_replace(ABSPATH, '', $template);
    78             } else {
    79                 $wpcommentspopupfile = 'wp-comments-popup.php';
    80             }
     71            if ( file_exists( TEMPLATEPATH . '/comments-popup.php') )
     72                require( TEMPLATEPATH . '/comments-popup.php');
     73            else
     74                require( ABSPATH . 'wp-includes/wp-comments-popup.php');
    8175        } else {
    8276            $wpcommentspopupfile = $file;
Note: See TracChangeset for help on using the changeset viewer.