[wp-trac] Re: [WordPress Trac] #8776: Deprecate all get_the_author_ and the_author_

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 2 00:47:34 GMT 2009


#8776: Deprecate all get_the_author_ and the_author_
--------------------------------------+-------------------------------------
 Reporter:  thee17                    |        Owner:  anonymous
     Type:  enhancement               |       Status:  new      
 Priority:  normal                    |    Milestone:  2.8      
Component:  Template                  |      Version:  2.8      
 Severity:  normal                    |   Resolution:           
 Keywords:  needs-patch dev-feedback  |  
--------------------------------------+-------------------------------------
Comment (by thee17):

 This is what I'm trying:

 {{{
 function the_author_meta($field) {
         global $authordata;
         $output = '$authordata->' . $field;
         return $output;
 }
 }}}

 with theme code
 {{{
 <?php the_author_meta('last_name'); ?>
 }}}

 And it is not working and I'm not sure why?

 the current code to get this is

 {{{
 function get_the_author_lastname() {
         global $authordata;
         return $authordata->last_name;
 }
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8776#comment:5>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list