[buddypress-trac] [BuddyPress Trac] #6388: Groups single item home : improve the way we deal with custom front and activity component
buddypress-trac
noreply at wordpress.org
Fri Oct 2 19:14:16 UTC 2015
#6388: Groups single item home : improve the way we deal with custom front and
activity component
-----------------------------------------+------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.4
Component: Component - Groups | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-docs commit |
-----------------------------------------+------------------
Comment (by boonebgorges):
Yeah, the approach seems much better. I'm not worried about what happens
if an admin has implemented a custom `front.php` or `front-id-123.php`
template but *not* updated the other templates - as you say, that's their
responsibility. I just want to make sure that sites without any
`front.php` (that is, all existing BP sites!) continue to work as before.
As for your question from Slack:
> . I can see another potential risk with plugins now :( if some (i think
it's many actually) are using bp_is_group_home() to check they are on the
group's activity page then we might break some of their features :( What
do you think if we deprecate bp_is_group_home() in favor of
bp_is_group_front() and make bp_is_group_home() act like
bp_is_group_activity() ?
The change you suggest would break plugins that expect
`bp_is_group_home()` to report whether you're looking at
`example.com/groups/foo/`, with no `bp_current_action()`. That is, after
all, what "group home" suggests. So I say no: if we're going to allow
custom group front pages, we should keep `bp_is_group_home()` just as it
is. Let's make a blog post about it for bpdevel.
One thing that would make things easier is if `example.com/groups/foo/`,
with 'activity' set to the home page, made it true that
`bp_is_group_activity()`. It doesn't do that, because it'd mean manually
setting the `current_action` during
`BP_Groups_Component::setup_globals()`. Is there any reason we can't do
this? Or maybe `bp_is_group_activity()` should be smarter: it checks for
`bp_is_current_action( 'activity' )` OR `bp_is_group_home() &&
activity_is_the_front_page_for_this_group()` (replace that with a real way
to check ;) ). This way, we can tell people that they ought to use
`bp_is_group_activity()` for, well, checking if you're looking at group
activity :)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6388#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list