Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#2942 closed defect (bug) (fixed)

bp-default enqueues script in global scope

Reported by: boonebgorges Owned by:
Priority: normal Milestone: 1.5
Component: Core Version:
Severity: normal 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)

#1 @djpaul
16 years ago

  • Resolutionfixed
  • Status newclosed

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

#2 @DJPaul
16 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
16 years ago

Sorry, that link was meant to be #WP14729

#4 @johnjamesjacoby
15 years ago

  • Milestone Awaiting Review1.5
  • Severitynormal

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.