Changeset 2009 for trunk/wp-includes/comment-functions.php
- Timestamp:
- 12/30/2004 10:58:06 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/comment-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r1992 r2009 3 3 // Template functions 4 4 5 function comments_template( ) {6 global $w ithcomments, $post, $wpdb, $id, $comment;5 function comments_template( $show ) { 6 global $wp_query, $withcomments, $post, $wpdb, $id, $comment; 7 7 8 8 if ( is_single() || is_page() || $withcomments ) : … … 13 13 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); 14 14 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'); 23 19 24 20 endif; … … 73 69 74 70 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'); 81 75 } else { 82 76 $wpcommentspopupfile = $file;
Note: See TracChangeset
for help on using the changeset viewer.