Make WordPress Core

Changeset 1660


Ignore:
Timestamp:
09/15/2004 02:50:29 AM (21 years ago)
Author:
rboren
Message:

Make comments_template() theme aware.

File:
1 edited

Legend:

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

    r1491 r1660  
    2626        $comment_author_url = isset($_COOKIE['comment_author_url_'.$cookiehash]) ? trim(stripslashes($_COOKIE['comment_author_url_'.$cookiehash])) : '';
    2727        $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
    28         include(ABSPATH . 'wp-comments.php');
     28
     29        $wp_template = get_settings('template');
     30        if ($wp_template == 'default') {
     31            $wp_template = '';
     32        } else {
     33            $wp_template = ABSPATH . "wp-content/themes/$wp_template/comments.php";
     34        }
     35
     36        if(! empty($wp_template) && file_exists($wp_template)) {
     37            include($wp_template);
     38        }   else {
     39            include(ABSPATH . 'wp-comments.php');
     40        }
     41
    2942    endif;
    3043}
Note: See TracChangeset for help on using the changeset viewer.