Opened 11 years ago
Closed 11 years ago
#5209 closed defect (bug) (fixed)
enqueue bp_core_confirmation_js
Reported by: | bassjobsen | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 2.0 | Priority: | normal |
Severity: | normal | Version: | 1.8.1 |
Component: | Core | Keywords: | |
Cc: |
Description
./buddypress/bp-core/bp-core-cssjs.php sets add_action( 'wp_head', bp_core_confirmation_js', 100 ); where bp_core_confirmation_js add javascript to the head which depends on jquery. This code should be enqueued with wp_enqueue_script() to set the jquery dependency. Localization can be add with: wp_localize_script().
Thanks for your attention. I will need this fixes to get WP Defer Loading work with BuddyPress, see: https://github.com/bassjobsen/wp-defer-loading/issues/4
Change History (4)
Note: See
TracTickets for help on using
tickets.
I'm not totally sure why we do it this way (rather than proper enqueuing). I guess the idea is that there are places where we would want the .confirm JS but we don't want to load our entire script library. That makes sense, but in that case why not just have a separate .js file for confirm links? It'll get cached pretty heavily, so I can't imagine a huge performance issue.
Would like an opinion from another dev before moving forward with it.