[buddypress-trac] [BuddyPress] #4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php
buddypress-trac
noreply at wordpress.org
Wed Oct 2 16:11:27 UTC 2013
#4879: add_theme_support( 'buddypress' ) should not load buddypress-functions.php
-------------------------------------+------------------
Reporter: modemlooper | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.9
Component: Backwards Compatability | Version: 1.7
Severity: major | Resolution:
Keywords: needs-testing has-patch |
-------------------------------------+------------------
Comment (by boonebgorges):
I played with this a bit more, and I think that even my proposed function
names are not clear enough. The issue is that we already have functions
called `is_theme_compat_active()`; the difference between that and
`_enabled()` is far from clear. What the new functions do is to detect
whether the *current theme needs theme compat*. So I've renamed them
accordingly. Let me know what you think about this.
> I believe I remember reading in another ticket that it might be
advantageous for bp-legacy templates to "leak" through. If you remove the
bp_deregister_template_stack() line, bp-legacy templates will indeed be
used as a fallback if the templates don't exist in the parent / child
theme. I think we should deregister it as it makes logistical sense. Just
wanted a second opinion!
Deregistering the template pack seems like a bit of a roundabout way to
achieve this end - it's not very transparent, and would be pretty tricky
to debug if you didn't already know what was up. A simple procedural check
seems better to me, so we need a single point where we can check to see
whether theme compat is required for the given theme, and bail if
necessary. I've chosen the beginning of `bp_theme_compat_reset_post()`,
because it's a single point that is called throughout the
`BP_Theme_Compat` children in the individual components; if the dummy post
doesn't get reset in this function, theme compat will fail. This seems a
bit more elegant to me, but I'm open to feedback.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4879#comment:16>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list