","#".obt_translate("comments")."",$text); IF (obt_translate("comment") != "comment"){ global $feed; $self = basename($_SERVER["PHP_SELF"]); IF ($self == "wp-rss2.php" || $self == "wp-commentsrss2.php" || $feed == "feed" || $feed == "rss2"){ $text = preg_replace("'#comment-([0-9]+)'","#".obt_translate("comment")."-\\1",$text); $text = preg_replace("'#comment-([0-9]+)'","#".obt_translate("comment")."-\\1",$text); }ELSEIF ($self == "wp-atom.php" || $feed == "atom"){ $text = preg_replace("'#comment-([0-9]+)'","#".obt_translate("comment")."-\\1",$text); $text = preg_replace("'#comment-([0-9]+)\" type=\"text/html\" />'","#".obt_translate("comment")."-\\1\" type=\"text/html\" />",$text); $text = preg_replace("'#comment-([0-9]+)\">'","#".obt_translate("comment")."-\\1\">",$text); }; }; RETURN $text; }; add_action("template_redirect","obt_fix_comment_links"); FUNCTION obt_the_content_rss($text){ IF (is_feed() && !is_404()){ global $post; IF (strlen($post->post_password)){ $text = "
\n"; $text .= "

".obt_translate("This post is password-protected").":

\n"; $text .= "

\n"; $text .= " "; $text .= "\n"; $text .= "

\n"; $text .= "
\n"; }; IF (obt_get_themeoption("feed-content-related-posts")){ $related_posts = obt_related_posts($post->post_date_gmt); IF (count($related_posts)){ $text .= "

\n"; $text .= "".obt_translate("Related posts").":\n"; FOREACH ($related_posts as $related_post){ $related_post_title = apply_filters("the_title",$related_post->post_title); IF (!strlen($related_post_title)) $related_post_title = translate("Untitled"); $related_post_title = wp_specialchars($related_post_title,true); $text .= "
ID)."\" title=\"".obt_translate("Permanent link to this post")."\">{$related_post_title}\n"; }; $text .= "

\n"; }; }; IF (obt_get_themeoption("feed-content-categories") || (obt_get_themeoption("feed-content-tags") && (function_exists("the_tags") || function_exists("UTW_ShowTagsForCurrentPost") || function_exists("STP_GetPostTags")))){ $text .= "

\n"; IF (obt_get_themeoption("feed-content-categories")){ $text .= "".obt_translate("Categories").": "; IF ($categories = get_the_category($post->ID)){ usort($categories,"obt_sort_categories"); $comma = false; FOREACH ($categories as $category){ IF ($comma) $text .= ", "; $comma = true; $category_link = get_category_link($category->cat_ID); $category_feed = get_category_rss_link(false,$category->cat_ID,$category->category_nicename); $category_link = obt_fix_link($category_link); $category_feed = obt_fix_feed_link($category_feed,$category_link); $text .= "cat_name,true)."»")."\">".wp_specialchars($category->cat_name,true).""; }; unset($categories); }ELSE $text .= obt_translate("No categories"); $text .= "."; }; IF (obt_get_themeoption("feed-content-tags")){ IF (function_exists("get_the_tags")){ IF ($tags = get_the_tags($post->ID)){ IF (obt_get_themeoption("feed-content-categories")) $text .= "\n
"; $text .= "".obt_translate("Tags").": "; usort($tags,"obt_sort_tags"); $comma = false; FOREACH ($tags as $tag){ IF ($comma) $text .= ", "; $comma = true; $tag_name = wp_specialchars($tag->name,true); $tag_link = get_tag_link($tag->term_id); $tag_feed = obt_tag_feed($tag_link); $tag_link = obt_fix_link($tag_link); $tag_feed = obt_fix_feed_link($tag_feed,$tag_link); $text .= "{$tag_name}"; }; unset($tags); $text .= "."; }; }ELSEIF (function_exists("UTW_ShowTagsForCurrentPost")){ global $utw, $baseurl, $home, $siteurl, $prettyurls; flush(); $tags = $utw->GetTagsForPost($post->ID); IF (count($tags)){ IF (obt_get_themeoption("feed-content-categories")) $text .= "\n
"; $text .= "".obt_translate("Tags").": "; $comma = false; FOREACH ($tags as $tag){ IF ($comma) $text .= ", "; $comma = true; $tag_name = str_replace("_"," ",$tag->tag); $tag_name = str_replace("-"," ",$tag_name); $tag_name = stripslashes($tag_name); $tag_name = wp_specialchars($tag_name); $tag_name_url = urlencode(stripslashes(strtolower($tag->tag))); IF ($prettyurls == "yes"){ $tag_link = "{$home}{$baseurl}{$tag_name_url}/"; $tag_feed = "{$tag_link}feed/"; }ELSE{ $tag_link = "$home/index.php?tag={$tag_name_url}"; $tag_feed = "{$tag_link}&feed=rss"; }; $text .= "{$tag_name}"; }; unset($tags); $text .= "."; }; }ELSEIF (function_exists("STP_GetPostTags")){ global $STagging; flush(); $tags = $STagging->getPostTags($post->ID); IF (count($tags)){ IF (obt_get_themeoption("feed-content-categories")) $text .= "\n
"; $text .= "".obt_translate("Tags").": "; $comma = false; FOREACH ($tags as $tag){ IF ($comma) $text .= ", "; $comma = true; $tag_link = $STagging->getTagPermalink($tag); $tag_feed = obt_tag_feed($tag_link); $tag_link = obt_fix_link($tag_link); $tag_feed = obt_fix_feed_link($tag_feed,$tag_link); $tag_name = wp_specialchars($tag); $text .= "{$tag_name}"; }; unset($tags); $text .= "."; }; }; }; $text .= "\n

\n"; }; IF (obt_get_themeoption("feed-content-share")){ $text .= "

\n"; $text .= "".obt_translate("Share this post").":"; IF (obt_get_themeoption("share-barrapunto")) $text .= "
\n\"".obt_translate("Submit ".get_bloginfo("name")."","{$post->post_title}")."...")."&subj=".urlencode($post->post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Barrapunto")."\">Barrapunto"; IF (obt_get_themeoption("share-blinklist")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","BlinkList")."\">BlinkList"; IF (obt_get_themeoption("share-blogmemes")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","BlogMemes")."\">BlogMemes"; IF (obt_get_themeoption("share-corank")) $text .= "
\n\"".obt_translate("Submit post_title)."&source=w\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","CoRank")."\">CoRank"; IF (obt_get_themeoption("share-corank-es")) $text .= "
\n\"".obt_translate("Submit post_title)."&source=w\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","CoRank Español")."\">CoRank Español"; IF (obt_get_themeoption("share-delicious")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Delicious")."\">Delicious"; IF (obt_get_themeoption("share-digg")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Digg")."\">Digg"; IF (obt_get_themeoption("share-enchilame")) $text .= "
\n\"".obt_translate("Submit Enchílame"; IF (obt_get_themeoption("share-fark")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Fark")."\">Fark"; IF (obt_get_themeoption("share-facebook")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Facebook")."\" target=\"_blank\">Facebook\n"; IF (obt_get_themeoption("share-fresqui-act")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Fresqui Actualidad")."\">Fresqui Actualidad"; IF (obt_get_themeoption("share-fresqui-ocio")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Fresqui Ocio")."\">Fresqui Ocio"; IF (obt_get_themeoption("share-fresqui-tec")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Fresqui Tecnología")."\">Fresqui Tecnología"; IF (obt_get_themeoption("share-furl")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Furl")."\">Furl"; IF (obt_get_themeoption("share-google")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Google Bookmarks")."\">Google Bookmarks"; IF (obt_get_themeoption("share-live")) $text .= "
\n\"".obt_translate("Add post_title)."&top=1\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Live Favorites")."\">Live Favorites"; IF (obt_get_themeoption("share-magnolia")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Magnolia")."\">Magnolia"; IF (obt_get_themeoption("share-meneame")) $text .= "
\n\"".obt_translate("Submit Menéame"; IF (obt_get_themeoption("share-neodiario")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Neodiario")."\">Neodiario"; IF (obt_get_themeoption("share-netscape")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Netscape")."\">Netscape"; IF (obt_get_themeoption("share-newsvine")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Newsvine")."\">Newsvine"; IF (obt_get_themeoption("share-reddit")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Reddit")."\">Reddit"; IF (obt_get_themeoption("share-rojo")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Rojo")."\">Rojo"; IF (obt_get_themeoption("share-slashdot")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Slashdot")."\">Slashdot"; IF (obt_get_themeoption("share-spurl")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Spurl")."\">Spurl"; IF (obt_get_themeoption("share-stumbleupon")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Stumbleupon")."\">Stumbleupon"; IF (obt_get_themeoption("share-technorati")) $text .= "
\n\"".obt_translate("Add Technorati Favorites"; IF (obt_get_themeoption("share-twitter")) $text .= "
\n\"".obt_translate("Add Twitter\n"; IF (obt_get_themeoption("share-buzz")) $text .= "
\n\"".obt_translate("Submit post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Submit this post to %1","Yahoo! Buzz")."\" target=\"_blank\">Yahoo! Buzz\n"; IF (obt_get_themeoption("share-yahoo")) $text .= "
\n\"".obt_translate("Add post_title)."\" rel=\"nofollow\" title=\"".obt_translate("Add this post to %1","Yahoo MyWeb")."\">Yahoo MyWeb"; $text .= "\n

\n"; }; IF (obt_get_themeoption("feed-content-attribution")){ $post_title = apply_filters("the_title",$post->post_title); IF (!strlen($post_title)) $post_title = translate("Untitled"); $post_title = wp_specialchars($post_title,true); $text .= "

".obt_translate("Permanent link").": {$post_title}"; IF ($post->comment_status == "open") $text .= " (".obt_translate("Write a comment").")"; $text .= ".
\n"; $text .= "".obt_translate("Read more").": ".get_bloginfo("name").".

\n"; }; }; RETURN $text; }; add_filter("the_content","obt_the_content_rss"); add_filter("the_content_rss","obt_the_content_rss"); FUNCTION obt_the_title_rss($text){ IF (is_feed() && !is_404()){ $text = trim(str_replace(trim(sprintf(__("Protected: %s"),"")),"",$text)); IF (!strlen($text)) $text = ent2ncr(obt_translate("Untitled")); IF (strlen($post->post_password)) $text = ent2ncr(obt_translate("%1 (protected)",$text)); }; RETURN $text; }; add_filter("the_title","obt_the_title_rss"); add_filter("the_title_rss","obt_the_title_rss"); ?>