Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Chasil on "After using wp_enqueue_style the rtl.css files are not loaded any longer"

$
0
0

Hi there,

I am searching for a solution with this problem. I've got a plugin which causes problems for user who use a rtl language pack. I found out that when I use wp_enqueue_style() to load my stylesheet wordpress behaves like it is not rtl.

Heres a part of the generated html without using wp_enqueue_style():

<html xmlns="http://www.w3.org/1999/xhtml" class="wp-toolbar"  dir="rtl" lang="fa-IR">
...
<link rel='stylesheet' href='http://www.cizero.de/wp-admin/load-styles.php?c=1&dir=rtl&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=3.8' type='text/css' media='all' />
...
<!--[if lte IE 7]>
<link rel='stylesheet' id='ie-rtl-css'  href='http://www.cizero.de/wp-admin/css/ie-rtl.min.css?ver=3.8' type='text/css' media='all' />
<![endif]-->
...

And here is a snippet when I use wp_enqueue_style():

...
<html xmlns="http://www.w3.org/1999/xhtml" class="wp-toolbar"  dir="rtl" lang="fa-IR">
...
<link rel='stylesheet' href='http://www.cizero.de/wp-admin/load-styles.php?c=1&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=3.8' type='text/css' media='all' />
...
<link rel='stylesheet' id='usr-style-css'  href='http://www.cizero.de/wp-content/plugins/universal-star-rating/includes/usr_style.php?px=12&ver=3.8' type='text/css' media='all' />
...
<!--[if lte IE 7]>
<link rel='stylesheet' id='ie-css'  href='http://www.cizero.de/wp-admin/css/ie.min.css?ver=3.8' type='text/css' media='all' />
<![endif]-->
...

You can see that (for example) the IE7 part changes. And load-styles.php gets dir=ltr which is incorrect.

Something happens what causes WordPress not load the rtl files.

I google'd and testet for hours but I am not able to find my misstake.

Thanks for your help!


Viewing all articles
Browse latest Browse all 8245

Trending Articles