Opened 6 years ago
Closed 6 years ago
#8146 closed defect (bug) (fixed)
bp_get_group_is_public() always returns NULL
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.0.0 | Priority: | normal |
| Severity: | normal | Version: | 1.0 |
| Component: | Groups | Keywords: | has-patch commit |
| Cc: |
Description
It seems that the bp_get_group_is_public() function checks for $group->is_public property, but this does not exist in the BP_Groups_Group class.
Either this should be handled internally in the BP_Groups_Group class, or these functions should be checking the value of the $group->status property?
Also affected:
bp_group_is_public()
bp_get_group_public_status()
bp_group_public_status()
Attachments (2)
Change History (9)
#1
@
6 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.0.0
- Version changed from 5.0.0 to 1.0
#2
@
6 years ago
- Keywords has-patch added; needs-patch removed
8146.patch is deprecating the functions.
#3
@
6 years ago
Thanks @imath! I did stumble across the bp_get_group_status() function in the end :)
#5
@
6 years ago
- Keywords needs-refresh added
Sure but now I've created a deprecated/6.0.php file for #8156 The patch needs a refresh.
Hi @mattjones2207
Thanks for your feedback. There's a comment inside some of these functions saying there are not used anymore. But I agree we should deprecate them asap.
To get the group status from within a groups loop, you can use
bp_get_group_status( $group )to know if it's a public one you should be able to do'public' === bp_get_group_status( $group )