Changeset 3644
- Timestamp:
- 03/17/2006 01:16:22 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-commentsrss2.php
r3543 r3644 32 32 comment_author_url, comment_date, comment_date_gmt, comment_content, comment_post_ID, 33 33 $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments 34 LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = ' $id'34 LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = '" . get_the_ID() . "' 35 35 AND $wpdb->comments.comment_approved = '1' AND $wpdb->posts.post_status = 'publish' 36 36 AND post_date_gmt < '" . gmdate("Y-m-d H:i:59") . "' … … 47 47 if ($comments) { 48 48 foreach ($comments as $comment) { 49 $GLOBALS['comment'] =& $comment; 49 50 // Some plugins may need to know the metadata 50 51 // associated with this comment's post: … … 78 79 </item> 79 80 <?php 80 } 81 } 81 82 } 82 83 } -
trunk/wp-includes/functions.php
r3639 r3644 2016 2016 function load_template($file) { 2017 2017 global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, 2018 $wp_rewrite, $wpdb, $wp_version, $wp ;2018 $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment; 2019 2019 2020 2020 extract($wp_query->query_vars); … … 2221 2221 2222 2222 $for_comments = false; 2223 if ( is_single() || ( $withcomments== 1) ) {2223 if ( is_single() || (get_query_var('withcomments') == 1) ) { 2224 2224 $feed = 'rss2'; 2225 2225 $for_comments = true; … … 2239 2239 2240 2240 function do_feed_rss2($for_comments) { 2241 if ( $for_comments ) 2241 if ( $for_comments ) { 2242 2242 load_template(ABSPATH . 'wp-commentsrss2.php'); 2243 else2243 } else { 2244 2244 load_template(ABSPATH . 'wp-rss2.php'); 2245 } 2245 2246 } 2246 2247 -
trunk/wp-includes/template-functions-post.php
r3595 r3644 16 16 } 17 17 18 function get_the_ID() { 19 global $id; 20 return $id; 21 } 18 22 19 23 function the_title($before = '', $after = '', $echo = true) {
Note: See TracChangeset
for help on using the changeset viewer.