Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 8 years ago

#3844 closed enhancement (wontfix)

Dynamically generate bp-default's global.js with PHP

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Templates Keywords:
Cc:

Description

There are many instances where I wanted to modify or add a few items to global.js, but had to resort to deregistering global.js and making a copy of global.js.

In a future release, I'd like to see global.js dynamically generated with hooks so plugin authors can manipulate the contents of it.

There are some issues to work around (namely browser caching and backpat), but the pros outweigh the cons.

Change History (5)

#1 @DJPaul
13 years ago

I think this will be mostly mitigated when we split "core" javascript (whatever that's decided to be) out of the default theme, into its own file. We'll end up with something like small nuggets of functionality, which will avoid the "one size fits all" approach to the current javascript and its markup dependencies.

#2 @boonebgorges
13 years ago

If we were consistent about how we bind events to elements, you could just use $.unbind() in your own scripts. But your point is well taken. Would like to see a patch for how this might look.

#3 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to Future Release

Moved to future release for further discussion / review, and to see what happens in 1.7.

#4 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates

#5 @r-a-y
8 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This was a zany idea. Since I reported this, I have the right to close it :)

Note: See TracTickets for help on using tickets.