Changeset 3638 for trunk/wp-includes/functions.php
- Timestamp:
- 03/12/2006 10:57:00 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r3634 r3638 2241 2241 function load_template($file) { 2242 2242 global $posts, $post, $wp_did_header, $wp_did_template_redirect, $wp_query, 2243 $wp_rewrite, $wpdb ;2243 $wp_rewrite, $wpdb, $wp_version, $wp; 2244 2244 2245 2245 extract($wp_query->query_vars); … … 2435 2435 return 0; 2436 2436 } 2437 2438 function do_feed() { 2439 $feed = get_query_var('feed'); 2440 2441 // Remove the pad, if present. 2442 $feed = preg_replace('/^_+/', '', $feed); 2443 2444 if ($feed == '' || $feed == 'feed') 2445 $feed = 'rss2'; 2446 2447 $for_comments = false; 2448 if ( is_single() || ($withcomments == 1) ) { 2449 $feed = 'rss2'; 2450 $for_comments = true; 2451 } 2452 2453 $hook = 'do_feed_' . $feed; 2454 do_action($hook, $for_comments); 2455 } 2456 2457 function do_feed_rdf() { 2458 load_template(ABSPATH . 'wp-rdf.php'); 2459 } 2460 2461 function do_feed_rss() { 2462 load_template(ABSPATH . 'wp-rss.php'); 2463 } 2464 2465 function do_feed_rss2($for_comments) { 2466 if ( $for_comments ) 2467 load_template(ABSPATH . 'wp-commentsrss2.php'); 2468 else 2469 load_template(ABSPATH . 'wp-rss2.php'); 2470 } 2471 2472 function do_feed_atom() { 2473 load_template(ABSPATH . 'wp-atom.php'); 2474 } 2437 2475 ?>
Note: See TracChangeset
for help on using the changeset viewer.