[buddypress-trac] [BuddyPress Trac] #5827: bp_is_user_profile() and bp_is_profile_component() return false on profile subpages

buddypress-trac noreply at wordpress.org
Wed Aug 20 18:20:10 UTC 2014


#5827: bp_is_user_profile() and bp_is_profile_component() return false on profile
subpages
--------------------------+-----------------------------
 Reporter:  jreeve        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The docs for `bp_is_profile_component()` and `bp_is_user_profile()` say
 that they "Check whether the current page is part of the Profile
 component," and ask "Is the current page part of a user's extended
 profile?", respectively, yet if you run either of those functions on, say,
 `/members/[username]/groups`, it returns false, since it uses
 `bp_is_current_component()`, which returns `groups` and not `profile` or
 `xprofile`. The `bp_is_user_profile()` docs even give the example
 "/members/joe/profile/ (or a subpage thereof)," so it seems like its
 purpose would be to detect the root or parent component here.

 Maybe the problem is one of consistency--when you run
 `bp_current_component` on a profile subpage, it returns the name of the
 subpage, but when you run it on a groups subpage, e.g.
 /groups/testgroup/members, it returns the root component, i.e. "groups."

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


More information about the buddypress-trac mailing list