Opened 12 years ago
Closed 12 years ago
#5247 closed enhancement (fixed)
bp_admin_enqueue_scripts hook could transport $hook_suffix
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 1.9 | Priority: | normal |
| Severity: | normal | Version: | 1.8.1 |
| Component: | Administration | Keywords: | has-patch 2nd-opinion |
| Cc: |
Description
Hi,
In /bp-core/admin/bp-core-actions.php, bp_admin_enqueue_scripts hooks admin_enqueue_scripts without getting the variable $hook_suffix that is available. I think it would be interesting for plugins author to test this variable to eventually load scripts.
I'm actually writing a codex article about enqueueing scripts only when plugins needs it, and in my example i'm only hooking "bp" actions except for admin_enqueue_scripts because getting $hook_suffix is a nice way to be sure plugins administration screen is being loaded without playing with get_current_screen()->id
So i suggest the attached diff
In 7587: