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

git-svn-id: https://develop.svn.wordpress.org/trunk@5699 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-06-13 18:03:17 +00:00
parent 60794fc8e2
commit 0f4225621d
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() ?>" />