[buddypress-trac] [BuddyPress] #4855: Method to override a plugins use of plugins.php or add filters to bp_template_title and bp_template_content
buddypress-trac
noreply at wordpress.org
Wed Mar 6 22:55:18 UTC 2013
#4855: Method to override a plugins use of plugins.php or add filters to
bp_template_title and bp_template_content
------------------------------------+-----------------------------
Reporter: modemlooper | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: Theme | Version: 1.7
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+-----------------------------
Changes (by boonebgorges):
* milestone: 1.7 => Future Release
Comment:
Thanks for spelling out these solutions, r-a-y.
I think that your strategies are fine for the moment, and are really the
only way we can maintain backward compatibility with existing themes.
However, I've been thinking more about it, and I think that in the medium-
to-long-term, we should go with another layer of template, like
modemlooper suggests. Basically, in place of having `do_action(
'bp_template_content' )` (or, more likely, in addition to it), we would
have `bp_get_template_part( 'plugin-content', 'group' )`. Then,
internally, we would have a template hierarchy, so that 'plugin-content-
bp-docs.php' or 'plugin-content-bbpress.php' or whatever, would be
preferred if found.
I think this is a better way forward than using a `do_action()` callback,
like we do now with `bp_template_content`. As we've seen, this callback
method is problematic if only because it's often difficult to unhook (see
r-a-y's output buffer trick).
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4855#comment:28>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list