[wp-trac] [WordPress Trac] #9370: PHP in get_bloginfo() - $wp_locale not setup early enough for script-loader

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 5 14:51:02 UTC 2009


#9370: PHP in get_bloginfo() - $wp_locale not setup early enough for script-loader
------------------------------+---------------------------------------------
 Reporter:  Viper007Bond      |        Owner:  westi   
     Type:  defect (bug)      |       Status:  reopened
 Priority:  normal            |    Milestone:  2.9     
Component:  Warnings/Notices  |      Version:  2.8     
 Severity:  normal            |   Resolution:          
 Keywords:  needs-patch       |  
------------------------------+---------------------------------------------
Changes (by Code_M3):

  * severity:  minor => normal


Comment:

 I observed the same issue, it's causing any RTL blog that has plugins
 which use the function '''wp_enqueue_style''' to switch it's style
 direction to LTR in the admin panel as soon as the plugin is activated.

 I found that if any plugin uses this function it'll cause get_bloginfo(
 'text_direction' ) in wp-includes/script-loader.php to return the current
 WordPress version instead of either 'rtl' or 'ltr'. Which doesn't make
 sense!

 After some more debugging I found that the global variable
 'text_direction' is not setup up early enough for script-loader.php to
 load the correct data which is either 'rtl' or 'ltr' depends on the
 locale.

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


More information about the wp-trac mailing list