[wp-trac] [WordPress Trac] #9622: widget class optimization suggestion

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 22 15:48:32 GMT 2009


#9622: widget class optimization suggestion
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous              
     Type:  defect (bug)       |      Status:  new                    
 Priority:  normal             |   Milestone:  2.8                    
Component:  Optimization       |     Version:  2.8                    
 Severity:  normal             |    Keywords:  needs-patch 2nd-opinion
-------------------------------+--------------------------------------------
 one optimization I do in all of my plugins, is this:

 {{{
 if ( is_admin() ) {
   echo $before_title . $title . $after_title;
   return;
 }
 }}}

 this might be worth doing directly in the WP_Widget class, no?

 alternatively, there could be some kind of admin() callback. the point is,
 it makes no sense to process the entire widget (which can be slow for rss
 widgets) when only the title is needed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9622>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list