[buddypress-trac] [BuddyPress Trac] #5413: Don't query for item counts in profile nav when not needed

buddypress-trac noreply at wordpress.org
Wed Feb 19 20:25:15 UTC 2014


#5413: Don't query for item counts in profile nav when not needed
--------------------------+-----------------------
 Reporter:  r-a-y         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.0
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------
 When a component's `setup_nav()` method is fired, we currently do no
 checks for when an item count is fired.

 This causes unnecessary queries to be fired when a user isn't logged in or
 when not on an appropriate BP page.

 Attached is a quick patch before I forget to add one!

 The only caveat with the patch is if a dev is manually calling the profile
 nav somewhere else that is not a profile page.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5413>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list