After using wp_enqueue_style the rtl.css files are not loaded any longer
-
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="https://www.w3.org/1999/xhtml" class="wp-toolbar" dir="rtl" lang="fa-IR"> ... <link rel='stylesheet' href='https://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='https://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="https://www.w3.org/1999/xhtml" class="wp-toolbar" dir="rtl" lang="fa-IR"> ... <link rel='stylesheet' href='https://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='https://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='https://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 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘After using wp_enqueue_style the rtl.css files are not loaded any longer’ is closed to new replies.