[wp-trac] [WordPress Trac] #18457: Parent Theme Editor styles should be included before Child Theme styles

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 17 05:56:00 UTC 2011


#18457: Parent Theme Editor styles should be included before Child Theme styles
--------------------------+-----------------------------
 Reporter:  dd32          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  3.2
 Severity:  normal        |   Keywords:  dev-feedback
--------------------------+-----------------------------
 Related: #14430 (and originally reported by somatic in #14430#comment:11 )

 #14430 fixed the order of inclusion for css styles of the same name so
 that child theme styles could override the parents.

 However, That only applied to stylesheers of the same name.

 Consider:
 {{{
 child theme:
 add_action( 'after_setup_theme', function() {
 add_editor_style( 'child-style.css');
 } );

 parent theme:
 add_action( 'after_setup_theme', function() {
 add_editor_style( 'editor-style.css');
 } );
 }}}

 Since they're not the same name, they'll be included in the order they
 were defined:
 {{{
 content_css:"
 http://mysite.com/wp-content/themes/my-child-theme/child-style.css,
 http://mysite.com/wp-content/themes/twentyeleven/editor-style.css"
 }}}

 Instead of looping over $editor_styles and adding the files as they're
 found, Perhaps the files should be sought after in the parent theme, and
 then a 2nd loop be run to find them all in the child themes folder.

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


More information about the wp-trac mailing list