[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 21:12:42 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:  1.7
Component:  Theme                   |     Version:  1.7
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------

Comment (by modemlooper):

 imath, my issue is not 100% the same as what r-a-y brought up but they are
 relevant. Figuring out if it's bp-default or legacy is easy as you've
 shown. My issue is a plugin calling plugins.php and you want to remove the
 from using that file and your plugin use that file instead. Yes, there has
 been suggestion to dehook every call to bp_template_content. But that is
 crazy when you want to add markup to the page with code. It just doesn't
 work. This is why I suggest a sub template that a theme or plugin can
 override.

 If I want to support every WP theme available I need to be able to put
 content inside plugins.php that a theme supplies, not replace it with a
 file that most likely will not match the theme markup. That would be like
 replacing sidebar.php with so I can add a widget. The theme would break if
 the custom template file doesn't match the markup.

 Another example: I want to block access to content being displayed in
 bp_template_content based on a certain criteria, removing every call to
 bp_template_content doesn't work because I have no idea what is hooking to
 this action. What to do? Replace plugins.php with a different template
 file, which has been suggested? You just broke every theme out there if
 they are not using the exact markup of the default legacy plugins.php.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4855#comment:26>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list