Skip to:
Content

BuddyPress.org

Opened 11 years ago

Closed 11 years ago

#5247 closed enhancement (fixed)

bp_admin_enqueue_scripts hook could transport $hook_suffix

Reported by: imath's profile imath Owned by: boonebgorges's profile boonebgorges
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

Attachments (1)

5247.diff (1.7 KB) - added by imath 11 years ago.

Download all attachments as: .zip

Change History (3)

@imath
11 years ago

#1 @boonebgorges
11 years ago

  • Milestone changed from Awaiting Review to 1.9

#2 @boonebgorges
11 years ago

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

In 7587:

Pass $hook_suffix through bp_admin_enqueue_scripts wrapper filter.

Fixes #5247

Props imath

Note: See TracTickets for help on using tickets.