[buddypress-trac] [BuddyPress] #4869: BP Theme Compat & BuddyPress Widgets styles
buddypress-trac
noreply at wordpress.org
Thu Apr 4 18:49:52 UTC 2013
#4869: BP Theme Compat & BuddyPress Widgets styles
------------------------------------+-----------------------
Reporter: imath | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 1.7
Component: Theme | Version: 1.7
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+-----------------------
Comment (by boonebgorges):
> With BP 1.7, I was planning not to declare
add_theme_support('buddypress') so that the legacy javascript was auto-
loaded - and then I would dequeue the legacy CSS file. Now, however, my
theme is assumed to support BuddyPress even though I have opted not to
declare that it does.
This seems a bit overcomplicated. If your theme comes with BP templates,
then I assume that you want them to be used. The purpose of
`add_theme_support( 'buddypress' );` is to tell BP not to do theme compat
- that is, to use your bundled templates. So, like r-a-y says, I'd suggest
that you declare it.
> Could BuddyPress at least register the legacy CSS and javascript with
wp_register_style() and wp_register_script() so that theme developers have
the option to easily add them if they detect version 1.7?
The problem with that is that the bulk of the bp-legacy stuff is not
loaded at all if your theme declares `current_theme_supports( 'buddypress'
)`. So, assuming you follow the advice laid out here by me and r-a-y,
doing a separate `wp_register_script()` (rather than relying on
`wp_enqueue_script()` to do the work, as we do now) wouldn't help much.
That said, if you want to use bp-legacy's JS, you should just
register/enqueue it directly. The following should work:
`wp_enqueue_script( 'bp-legacy-js', BP_PLUGIN_URL . '/bp-templates/bp-
legacy/js/buddypress.js' );`
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4869#comment:19>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list