[buddypress-trac] [BuddyPress Trac] #5170: bp_has_members() in widgets stomps $members_template global

buddypress-trac noreply at wordpress.org
Mon Feb 8 04:15:00 UTC 2016


#5170: bp_has_members() in widgets stomps $members_template global
---------------------------------+---------------------------
 Reporter:  johnjamesjacoby      |       Owner:  boonebgorges
     Type:  defect (bug)         |      Status:  closed
 Priority:  high                 |   Milestone:  2.5
Component:  Component - Members  |     Version:  1.0
 Severity:  major                |  Resolution:  fixed
 Keywords:  dev-feedback         |
---------------------------------+---------------------------
Changes (by boonebgorges):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"10553"]:
 {{{
 #!CommitTicketReference repository="" revision="10553"
 Restore template globals after widget loops.

 BP template loop functions, like `bp_has_members()`, are responsible for
 populating corresponding template globals. When this happens inside of a
 "secondary" loop - such as a sidebar widget - the loop should clean up
 after
 itself by resetting the relevant template global to whatever it previously
 was
 before the secondary loop had run. (This is a rough approximation of WP's
 `wp_reset_postdata()` for BP loops.)

 Fixes #5170.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5170#comment:17>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list