[buddypress-trac] [BuddyPress] #4869: BP Theme Compat & BuddyPress Widgets styles
buddypress-trac
noreply at wordpress.org
Thu Mar 21 19:53:22 UTC 2013
#4869: BP Theme Compat & BuddyPress Widgets styles
-------------------------+------------------
Reporter: imath | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.7
Component: Theme | Version: 1.7
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by r-a-y):
> I worry about running this kind of locate_template() call on every
single page load (which is what will happen in cases where theme compat
actually ends up running).
Yeah, I understand that it's an unnecessary check, but the performance
should be miniscule as `is_file()` / `file_exists()` calls are cached in
the stat cache.
We could add this temporarily and look to remove the `locate_template()`
check in 1.8 when hopefully all theme devs are aware of
`add_theme_support( 'buddypress' )`.
If you think that's inefficient, check out `BP_Component::includes()` and
BP's own `bp_locate_template()`, which both use a ton of `is_file()` and
`file_exists()` checks when a file doesn't exist! :)
> styles need to be loaded where the members/groups widgets are loaded -
which is possible on non-root blogs.
We could add a separate method - `enqueue_sitewide_styles()` - above the
multiblog check and add a sitewide stylesheet that would include the
widget styles? Or BP core could handle this much like it does the widget
JS.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4869#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list