[wp-trac] [WordPress Trac] #19510: wp_editor() causing wp_print_styles to bleed into admin

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 12 04:45:58 UTC 2011


#19510: wp_editor() causing wp_print_styles to bleed into admin
---------------------------+-----------------------------
 Reporter:  AdamBackstrom  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Editor         |    Version:  3.3
 Severity:  normal         |   Keywords:
---------------------------+-----------------------------
 I've been calling wp_enqueue_style() from the wp_print_styles action, as
 the wp_enqueue_style Codex page seemed to recommend. With the new
 wp_editor(), this causes styles intended for the template to bleed over
 into the admin. Example:

 {{{
 function trunktest_styles() {
         wp_enqueue_style( 'trunktest', site_url('?trunktest=1') );
 }
 add_action( 'wp_print_styles', 'trunktest_styles' );

 function trunktest_init() {
         if( isset( $_GET['trunktest'] ) ) {
                 header( 'Content-type: text/css' );
                 echo 'body { background-color: red !important; }';
                 die();
         }
 }
 add_action( 'init', 'trunktest_init' );
 }}}

 In WordPress 3.3 RC3, wp_editor() causes this style tag to be printed mid-
 way down the Dashboard page and various Comments pages. This behavior does
 not exist in WordPress 3.2.1, or on the majority of 3.3 RC3 pages.

 Apologies if this is just an error in my usage of wp_enqueue_style().

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


More information about the wp-trac mailing list