[wp-trac] [WordPress Trac] #19510: wp_print_styles() causing mid-page scripts/styles to bleed into admin (was: wp_editor() causing wp_print_styles to bleed into admin)

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 12 05:34:05 UTC 2011


#19510: wp_print_styles() causing mid-page scripts/styles to bleed into admin
---------------------------+------------------
 Reporter:  AdamBackstrom  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.3
Component:  Editor         |     Version:  3.3
 Severity:  blocker        |  Resolution:
 Keywords:  dev-feedback   |
---------------------------+------------------
Changes (by nacin):

 * keywords:   => dev-feedback
 * severity:  normal => blocker
 * milestone:  Awaiting Review => 3.3


Comment:

 The issue here is that we use wp_print_styles( $handle ) in wp_editor()
 and elsewhere to print scripts/styles directly.

 This fires the wp_print_styles hook, which is incorrectly listed on the
 Codex as the best hook (that'd be wp_enqueue_scripts) and is referenced
 965 times in the plugins directory.

 Combine this with mid-page styles/scripts, and you have frontend styles
 leaking.

 Possible solution: Re-tool print_admin_styles() to accept (and print) a
 handle, and change our wp_print_styles( $handle ) calls to
 print_admin_styles( $handle ).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19510#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list