[wp-trac] Re: [WordPress Trac] #3450: wp_return() function for echo/return logic

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 9 21:57:18 GMT 2007


#3450: wp_return() function for echo/return logic
-------------------------------------+--------------------------------------
 Reporter:  markjaquith              |        Owner:  anonymous
     Type:  enhancement              |       Status:  new      
 Priority:  low                      |    Milestone:  2.5      
Component:  Administration           |      Version:  2.1      
 Severity:  minor                    |   Resolution:           
 Keywords:  needs-patch 2nd-opinion  |  
-------------------------------------+--------------------------------------
Comment (by Viper007Bond):

 Better code (I think this works):

 {{{
 function wp_return( $what, $echo = true ) {
         ( $echo ) ? echo $what : return $what;
 }
 }}}

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


More information about the wp-trac mailing list