[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 01:27:22 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):

 > I'm trying it with last_name and nickname and id and it doesn't work.

 To be honest.. I didnt test it in place either, I tested with a standalone
 script:
 {{{
 <?php

 $a = (object) array('test' => 'fish');
 $b = 'test';
 var_dump($a->$b);

 ?>
 string 'fish' (length=4)
 }}}

 You need to get the case right, $b = 'TEST' wouldn't work.. etc

 As for ID, returning an int is best, it might be used elsewhere and
 assumed to be an int (eg, If string, query for username, else grab user
 with that id).. but i'm not sure.

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


More information about the wp-trac mailing list