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:
parent
60794fc8e2
commit
0f4225621d
|
@ -164,6 +164,10 @@ function the_author_email() {
|
||||||
*/
|
*/
|
||||||
function get_the_author_url() {
|
function get_the_author_url() {
|
||||||
global $authordata;
|
global $authordata;
|
||||||
|
|
||||||
|
if ( 'http://' == $authordata>user_url )
|
||||||
|
return '';
|
||||||
|
|
||||||
return $authordata->user_url;
|
return $authordata->user_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@ $more = 1;
|
||||||
<entry>
|
<entry>
|
||||||
<author>
|
<author>
|
||||||
<name><?php the_author() ?></name>
|
<name><?php the_author() ?></name>
|
||||||
|
<?php $author_url = get_the_author_url(); if ( !empty($author_url) ) : ?>
|
||||||
<uri><?php the_author_url()?></uri>
|
<uri><?php the_author_url()?></uri>
|
||||||
|
<?php endif; ?>
|
||||||
</author>
|
</author>
|
||||||
<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
|
<title type="<?php html_type_rss(); ?>"><![CDATA[<?php the_title_rss() ?>]]></title>
|
||||||
<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
|
<link rel="alternate" type="text/html" href="<?php permalink_single_rss() ?>" />
|
||||||
|
|
Loading…
Reference in New Issue