Don't output author uri tag if uri is empty.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-06-13 18:03:17 +00:00
parent cbdc90759c
commit 72c169c2f1
2 changed files with 6 additions and 0 deletions

View File

@ -164,6 +164,10 @@ function the_author_email() {
*/
function get_the_author_url() {
global $authordata;
if ( 'http://' == $authordata>user_url )
return '';
return $authordata->user_url;
}

View File

@ -26,7 +26,9 @@ $more = 1;
<entry>
<author>
<name><?php the_author() ?></name>
<?php $author_url = get_the_author_url(); if ( !empty($author_url) ) : ?>
<uri><?php the_author_url()?></uri>
<?php endif; ?>
</author>
<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />