Opened 9 months ago
Closed 5 months ago
#4479 closed defect (bug) (fixed)
bp_is_page(BP_GROUPS_SLUG) return true in group home page
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 1.7 |
| Component: | Core | Version: | 1.6 |
| Severity: | major | Keywords: | reporter-feedback |
| Cc: | megainfodz@… |
Description
Hi,
Tested in : buddypress 1.6.1 + default theme
I add this code in the content of members/single/home.php
if ( bp_is_page(BP_MEMBERS_SLUG) ) : echo [BP_MEMBERS_SLUG]" endif;
if ( bp_is_member() ) : ech o"[bp_is_member]" endif;
bp_is_page(BP_MEMBERS_SLUG) return false, bp_is_member() return true.
And in groups/single/home.php
if ( bp_is_page(BP_GROUPS_SLUG) ) : echo "BP_GROUPS_SLUG" endif;
if ( bp_is_group() ) : echo "bp_is_group" endif;
bp_is_page(BP_GROUPS_SLUG) return true and bp_is_group() return true.
I think bp_is_page(BP_GROUPS_SLUG) must return false in group home page ?
Change History (4)
comment:1
follow-up:
↓ 2
boonebgorges — 8 months ago
Replying to boonebgorges:
What is bp_is_page() *supposed* to do?
pre-1.5 version of bp_is_current_component().
comment:3
johnjamesjacoby — 5 months ago
- Milestone changed from Awaiting Review to 1.7
Should depend what your slugs are and what you're checking against. For what it's worth, the old constants aren't so great anymore.
bp_is_page() should be deprecated in 1.7, since it's not used anywhere in core.
comment:4
johnjamesjacoby — 5 months ago
- Resolution set to fixed
- Status changed from new to closed

What is bp_is_page() *supposed* to do? (We don't use it anywhere in BP.)