[buddypress-trac] [BuddyPress Trac] #6286: Directories filtered by member roles

buddypress-trac noreply at wordpress.org
Thu Apr 2 11:47:52 UTC 2015


#6286: Directories filtered by member roles
--------------------------+------------------
 Reporter:  sooskriszta   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  2.3
Component:  API           |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by boonebgorges):

 > Patch looks good. What is the purpose of line 311?
 > } elseif ( empty( $bp->current_member_type ) ) {

 Oh, maybe I don't need that. Lemme play with it.

 > i guess if it's still hooked to 'bp_init' then only the url feature will
 not be available ?

 Exactly.

 >  the quickdraft.patch allowed me to display the members directory as
 soon as a registered member type was in the url.

 Thanks for checking this out. I still would prefer to do this in
 `bp_core_set_uri_globals()`. Waiting until 'bp_actions' means that there's
 a decent portion of BP's bootstrap where the current member type is unset.
 More generally, doing URL routing in 'bp_actions' or 'bp_screens' seems
 wrong to me - it's always bothered me that this is how `bp_is_directory()`
 gets set. URL routing ought to take place early, and in a centralized
 place. The fact that `bp_core_set_uri_globals()` is scary and fragile is
 not really an argument against this :)

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


More information about the buddypress-trac mailing list