some cleanups, and a quick undefined variable fix

git-svn-id: http://svn.automattic.com/wordpress/trunk@1358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2004-05-24 18:24:12 +00:00
parent 75a827bcb2
commit 14baf17732
4 changed files with 17 additions and 18 deletions

View File

@ -1,5 +1,6 @@
<?php
if (! $feed) {
<?php
if (!isset($feed) || !$feed) {
$blog = 1;
$doing_rss = 1;
require('wp-blog-header.php');

View File

@ -1,12 +1,13 @@
<?php /* RDF 1.0 generator, original version by garym@teledyn.com */
if (! $feed) {
if (!isset($feed) || !$feed) {
$blog = 1; // enter your blog's ID
$doing_rss = 1;
require('wp-blog-header.php');
}
$more = 1;
header('Content-type: application/rdf+xml', true);
$more = 1;
add_filter('the_content', 'trim');
?>

View File

@ -1,12 +1,13 @@
<?php /* These first lines are the first part of a CafeLog template.
In every template you do, you got to copy them before the CafeLog 'loop' */
if (! $feed) {
$blog = 1; // enter your blog's ID
<?php
if (!isset($feed) || !$feed) {
$blog = 1;
$doing_rss = 1;
require('wp-blog-header.php');
}
header('Content-type: text/xml', true);
$more = 1;
?>
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
@ -23,10 +24,6 @@ header('Content-type: text/xml', true);
<item>
<title><?php the_title_rss() ?></title>
<?php
// we might use this in the future, but not now, that's why it's commented in PHP
// so that it doesn't appear at all in the RSS
// echo "<category>"; the_category_unicode(); echo "</category>";
$more = 1;
if (get_settings('rss_use_excerpt')) {
?>
<description><?php the_excerpt_rss(get_settings('rss_excerpt_length'), 2) ?></description>

View File

@ -1,16 +1,16 @@
<?php
if (!isset($feed)) {
<?php
if (!isset($feed) || !$feed) {
$blog = 1;
$doing_rss = 1;
require('wp-blog-header.php');
}
$more = 1;
$charset = get_settings('blog_charset');
if (!$charset) $charset = 'UTF-8';
header('Content-type: text/xml', true);
$more = 1;
?>
<?php echo '<?xml version="1.0" encoding="' . $charset . '"?'.'>'; ?>
<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
<rss version="2.0"