Use get_the_author_meta(). Props sivel. see #9393
git-svn-id: https://develop.svn.wordpress.org/trunk@11416 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
47556a2dad
commit
15539caf5e
@ -1189,8 +1189,8 @@ EOD;
|
|||||||
</app:control>
|
</app:control>
|
||||||
<author>
|
<author>
|
||||||
<name><?php the_author()?></name>
|
<name><?php the_author()?></name>
|
||||||
<?php if (get_the_author_url() && get_the_author_url() != 'http://') { ?>
|
<?php if ( get_the_author_meta('url') && get_the_author_meta('url') != 'http://' ) { ?>
|
||||||
<uri><?php the_author_url()?></uri>
|
<uri><?php the_author_meta('url') ?></uri>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</author>
|
</author>
|
||||||
<?php if($GLOBALS['post']->post_type == 'attachment') { ?>
|
<?php if($GLOBALS['post']->post_type == 'attachment') { ?>
|
||||||
|
@ -127,12 +127,12 @@ function the_author_meta($field = '', $user_id = false) {
|
|||||||
*
|
*
|
||||||
* @link http://codex.wordpress.org/Template_Tags/the_author_link
|
* @link http://codex.wordpress.org/Template_Tags/the_author_link
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @uses get_the_author_url()
|
* @uses get_the_author_meta()
|
||||||
* @uses the_author()
|
* @uses the_author()
|
||||||
*/
|
*/
|
||||||
function the_author_link() {
|
function the_author_link() {
|
||||||
if (get_the_author_url()) {
|
if ( get_the_author_meta('url') ) {
|
||||||
echo '<a href="' . get_the_author_url() . '" title="' . sprintf(__("Visit %s’s website"), get_the_author()) . '" rel="external">' . get_the_author() . '</a>';
|
echo '<a href="' . get_the_author_meta('url') . '" title="' . sprintf(__("Visit %s’s website"), get_the_author()) . '" rel="external">' . get_the_author() . '</a>';
|
||||||
} else {
|
} else {
|
||||||
the_author();
|
the_author();
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,8 @@ echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; ?>
|
|||||||
<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) ) : ?>
|
<?php $author_url = get_the_author_meta('url'); if ( !empty($author_url) ) : ?>
|
||||||
<uri><?php the_author_url()?></uri>
|
<uri><?php the_author_meta('url')?></uri>
|
||||||
<?php endif; ?>
|
<?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>
|
||||||
|
Loading…
Reference in New Issue
Block a user