#2942 closed defect (bug) (fixed)
bp-default enqueues script in global scope
Reported by: | boonebgorges | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | |
Cc: |
Description
The WP Codex says that wp_enqueue_script() should be hooked to init: http://codex.wordpress.org/Function_Reference/wp_enqueue_script
bp-default does not do it this way - it's not hooked to anything. That means it gets loaded way early in the head. That might be intentional, but it also means that it's nigh impossible for plugins to interact with that js in any non-hackish way. See http://buddypress.org/community/groups/bp-tinymce/forum/topic/bp-tinymce/#post-81996
We should investigate whether bp-default can be brought into compliance.
Change History (4)
#2
@
14 years ago
I've updated the theme to do this; however, BuddyPress still uses wp_enqueue_script in a bunch of other places. On the plus side once the is_page() problem [WP14729]is fixed, I believe any of our remaining wp_enqueue_script calls should be, too.
(In [3527]) Load javascript in the init action. Fixes #2942