How can I customize the upload error message in WordPress?

After following the guide for How can I prevent uploading bmp image? to remove bmp (and in my case tiff images) from being uploaded, I tested and it is working, but noticed users are now getting the error message: Sorry, this file type is not permitted for security reasons. screenshot-with-shadow.png http://img813.imageshack.us/img813/4526/screenshotwithshadow.png That looks to be … Read more

WordPress multisite change language

I want to change site language through cookies. As I have multisite, so define(‘WPLANG’) is not working in wp-config.php. So I added hook to filter “locale”. But still not working… What to do ? p.s I have translated .po & .mo files in “wp-content/languages/” folder. The code in functions.php add_filter( ‘locale’, ‘set_my_locale’, 9999 ); function … Read more

TinyMCE – Add button that changes direction of selected text

Ok, I am going to create website in Urdu(rtl) & English(ltr) language that contain paragraphs like this: <p style=”direction:rtl”>کیا حال ہے buddy? سب خیریت ہے؟</p> You can see that sentence in not showing correctly. I want to change the direction of English words in sentense. like this: <p style=”direction:rtl”>کیا حال ہے <bdo dir=”ltr”>buddy?</bdo> سب خیریت … Read more

How to reload wordpress textdomains at runtime

I’m currently using this to reload my theme and plugin textdomain in order to send e-mails (admin move, in admin language) in the user language. add_filter(“theme_locale”, array($this, “theme_locale”), 9999, 2); add_filter(“plugin_locale”, array($this, “plugin_locale”), 9999, 2); $this->load_textdomains(); remove_filter(“theme_locale”, array($this, “theme_locale”), 9999, 2); remove_filter(“plugin_locale”, array($this, “plugin_locale”), 9999, 2); public function load_textdomains() { if (function_exists(“WC”)) { WC()->load_plugin_textdomain(); } … Read more

How to change the language of the ‘Reset Password’ page

I have a WooCommerce powered WordPress website. In this website a user can login to order products, basic WooCommerce functionality. The site is translated using qTranslate. I can translate everything, except the ‘Reset password’ page. The basic website is in English. When a customer visits the website in French, then requests a new password, he … Read more