[wp-trac] [WordPress Trac] #3902: wp_title shouldn't use category_name if cat is also specified,

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 4 03:03:05 GMT 2007


#3902: wp_title shouldn't use category_name if cat is also specified,
--------------------------+-------------------------------------------------
 Reporter:  majelbstoat   |       Owner:  anonymous                                     
     Type:  defect        |      Status:  new                                           
 Priority:  normal        |   Milestone:  2.2                                           
Component:  Optimization  |     Version:  2.1.2                                         
 Severity:  trivial       |    Keywords:  category wp_title duplicate query optimisation
--------------------------+-------------------------------------------------
 A very simple patch.  In wp_title(), we test to see if a 'cat' is
 supplied, generating a title based on that.  The next block of code adds
 an unnecessary database call if 'category_name' is supplied, even if 'cat'
 was also supplied.  We should just ignore the second block of code if
 we've already determined the cat title from the 'cat' var.

 The patch simply adds 'else' to the second block.  I can't think of any
 circumstances where this would be a problem.  If the category_name and cat
 vars didn't map to the same title anyway, there would be bigger problems.

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


More information about the wp-trac mailing list