[buddypress-trac] [BuddyPress Trac] #7218: Only load component action and screen code when we're on the component's page
buddypress-trac
noreply at wordpress.org
Fri Feb 16 21:22:09 UTC 2018
#7218: Only load component action and screen code when we're on the component's
page
-----------------------------+-----------------------
Reporter: r-a-y | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.0
Component: Core | Version:
Severity: normal | Resolution:
Keywords: has-patch early |
-----------------------------+-----------------------
Comment (by boonebgorges):
> As I mentioned in my reply to Boone in point 2, I prefer my earlier idea
to load all action and screen code when we're on the component page rather
than the class-autoloading in the current patches. To me, that is the
cleanest way of doing this within our current APIs instead of introducing
all these new classes and files.
Yes. After the back-and-forth on this ticket, I'm coming around to this.
Basically, the trade-off is that late-loading of screen/action functions
will introduce a small chance of backward compatibility breakage, for
anyone who is manually calling (or hooking) a screen function in a non-
standard place. However, in all my years doing weird things with
BuddyPress, I have never even been tempted to do such a thing, so I think
it's a reasonable risk.
I see that the old patches have been removed from this ticket. So I've
reconstructed what I think the `late_includes()` strategy looked like, and
applied it to the Activity component. @r-a-y does this capture it more or
less correctly? What do others think about returning to @r-a-y's original,
simpler idea? (I feel like I brought on this whole debacle by making
[comment:16 this comment], so mea culpa :( ) See attached patch.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7218#comment:55>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list