[buddypress-trac] [BuddyPress] #5247: bp_admin_enqueue_scripts hook could transport $hook_suffix

buddypress-trac noreply at wordpress.org
Sat Nov 16 21:34:44 UTC 2013

#5247: bp_admin_enqueue_scripts hook could transport $hook_suffix
 Reporter:  imath           |      Owner:
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  1.8.1
 Severity:  normal          |   Keywords:  has-patch 2nd-opinion

 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

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5247>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list