[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:50:38 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 DD32):

 This is correct php: (With the addition of a isset to avoid PHP warnings
 when the field doesnt exist)
 {{{
 function the_author_meta($field) {
         global $authordata;
         return isset($aurhordata->$$field) ? $aurhordata->$$field : '';
 }
 }}}

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


More information about the wp-trac mailing list