[wp-trac] [WordPress Trac] #14838: get_theme_root/s refactoring

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 14 22:47:42 UTC 2010


#14838: get_theme_root/s refactoring
-----------------------------+----------------------------------------------
 Reporter:  hakre            |        Owner:         
     Type:  enhancement      |       Status:  closed 
 Priority:  normal           |    Milestone:         
Component:  General          |      Version:  3.0    
 Severity:  normal           |   Resolution:  wontfix
 Keywords:  has-patch close  |  
-----------------------------+----------------------------------------------

Comment(by hakre):

 Replying to [comment:6 filosofo]:
 > {{{
 >       472             while ( false === ( $theme_roots =
 get_site_transient( 'theme_roots' ) ) )
 >       473                     get_themes(); // update transient
 > }}}
 >
 > Isn't this kinda risky?  If something causes the transient getter or
 setter to fail, then you're stuck in an infinite loop.

 True, which would result in same: a failt of get_theme_roots() (as w/o the
 patch).

 ---

 Replying to [comment:7 scribu]:
 > I agree that this makes the code less readable. Cleverer code is not
 always better code.

 Code is never clever.

 Less code is better code.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14838#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list