Skip to:

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#2942 closed defect (bug) (fixed)

bp-default enqueues script in global scope

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 1.5 Priority: normal
Severity: normal Version:
Component: Core Keywords:


The WP Codex says that wp_enqueue_script() should be hooked to init:

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

We should investigate whether bp-default can be brought into compliance.

Change History (4)

#1 @djpaul
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3527]) Load javascript in the init action. Fixes #2942

#2 @DJPaul
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.

#3 @DJPaul
14 years ago

Sorry, that link was meant to be #WP14729

#4 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 1.5
  • Severity set to normal

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.