[wp-trac] [WordPress Trac] #17279: No need to run twentyeleven_url_grabber twice

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 29 17:53:02 UTC 2011


#17279: No need to run twentyeleven_url_grabber twice
--------------------------+------------------
 Reporter:  duck_         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.2
Component:  Themes        |     Version:  3.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by Otto42):

 Always best to be explicit about it. I'd suggest this style instead:

 {{{
 if ( false == ( $link_url = twentyeleven_url_grabber() ) ) {
   $link_url = get_permalink();
 }
 }}}

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


More information about the wp-trac mailing list