[wp-trac] [WordPress Trac] #36839: Locale stylesheet loaded early for embeds

WordPress Trac noreply at wordpress.org
Sun Jun 12 16:20:55 UTC 2016


#36839: Locale stylesheet loaded early for embeds
------------------------------------------------------+------------------
 Reporter:  greenshady                                |       Owner:
     Type:  defect (bug)                              |      Status:  new
 Priority:  normal                                    |   Milestone:  4.6
Component:  Embeds                                    |     Version:  4.4
 Severity:  normal                                    |  Resolution:
 Keywords:  needs-patch needs-testing good-first-bug  |     Focuses:
------------------------------------------------------+------------------

Comment (by swissspidy):

 @sjmur That'd be great! You can ping me on Slack if you have any
 questions.

 Basically, when you're running WordPress in another locale (e.g. de_DE)
 and a theme has a locale stylesheet (`de_DE.css`) or an `rtl.css`
 stylesheet, WordPress will enqueue this file.

 As you can see from the `add_action()` snippets above, the regular
 stylesheets get printed earlier (priority 8) than the locale stylesheet
 (default priority of 10). However, when embedding a post, regular
 stylesheets get printed ''after'' the locale CSS.

 This of course is inconsistent and can lead to all sorts of bugs, like not
 being able to override some theme styles in the locale CSS.

 We should change `add_action( 'embed_head', 'locale_stylesheet' );` to
 something like `add_action( 'embed_head', 'locale_stylesheet', 30 );` and
 test if it works correctly.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36839#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list