Title: Undefined function is_rtl()
Last modified: August 20, 2016

---

# Undefined function is_rtl()

 *  [cjsmall](https://wordpress.org/support/users/cjsmall/)
 * (@cjsmall)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/undefined-function-is_rtl/)
 * WordPress 3.2.1 is running fine.
 * I installed the **atg-styles-dropdown** plugin and regardless of whether the 
   plugin is activated or not, when I login to the dashboard, I get the message:
 * Fatal error: Call to undefined function is_rtl() in /usr/www/users/cjsmall/changemarketer/
   wp-includes/theme.php on line 1817
 * The first line in the **atg-styles-dropdown.php** file is making a call to the**
   add_editor_style()** function which resides in the theme.php file, and on line
   1817, there is indeed a call to **is_rtl()**.
 * The **is_rtl()** function appears to be defined near the end of the **wp-includes/
   locale.php** file, although there appear to be two definitions; one inside the
   WP_Locale class and another outside the class.
 * I’m guessing that there is a bug in the WordPress code where the theme.php file
   does not include the locale.php file. So I added the following line to the start
   of function add_editor_style():
 * **require_once( ABSPATH . ‘/wp-includes/locale.php’ );
 * This changes the error message to:
 * Fatal error: Call to a member function is_rtl() on a non-object in /usr/www/users/
   cjsmall/changemarketer/wp-includes/locale.php on line 348
 * It should be possible to successfully make a call to add_editor_style() without
   a fatal error! Does anyone have a clue what is wrong here? Thanks for any insights
   you can offer.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [seonag](https://wordpress.org/support/users/seonag/)
 * (@seonag)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/undefined-function-is_rtl/#post-2354922)
 * I had the same problem today with the **atg-styles-dropdown** plugin in WordPress
   3.2.1. I could not access my Dashboard – same error as above.
 * Not being too familiar with WordPress code, I just went into my cPanel and deleted
   the **atg-styles-dropdown** plugin PHP file and re-booted the Dashboard and everything
   worked fine.
 * Perhaps a problem with the plugin? The download website ([http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/](http://alisothegeek.com/2011/05/tinymce-styles-dropdown-wordpress-visual-editor/))
   says the file is dated November 06, 2011.
 *  [Marco Chiesi](https://wordpress.org/support/users/marcochiesi/)
 * (@marcochiesi)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/undefined-function-is_rtl/#post-2354947)
 * I had the same problem, I solved by wrapping the `add_editor_style();` inside
   a function attached to the `init` hook:
 *     ```
       add_action('init', 'add_style');
       function add_style() {
       	add_editor_style();
       }
       ```
   
 *  [Alison Barrett](https://wordpress.org/support/users/aliso/)
 * (@aliso)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/undefined-function-is_rtl/#post-2354962)
 * I’m sorry I didn’t get this fixed sooner. I updated my blog tonight with a fixed
   version of the plugin.
 * [http://alisothegeek.com/2012/07/updatedfixed-tinymce-custom-styles-dropdown-plugin/](http://alisothegeek.com/2012/07/updatedfixed-tinymce-custom-styles-dropdown-plugin/)
 * Thanks, Marco, for the tip on the init hook.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Undefined function is_rtl()’ is closed to new replies.

 * 3 replies
 * 4 participants
 * Last reply from: [Alison Barrett](https://wordpress.org/support/users/aliso/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/undefined-function-is_rtl/#post-2354962)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
