Skip to content

Instantly share code, notes, and snippets.

@akirk
Last active August 29, 2015 13:59
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akirk/10979790 to your computer and use it in GitHub Desktop.
Save akirk/10979790 to your computer and use it in GitHub Desktop.
Proper fix for qTranslate plugin for Wordpress 3.9
diff --git i/public/wp-content/plugins/qtranslate/qtranslate_core.php w/public/wp-content/plugins/qtranslate/qtranslate_core.php
index 17b4669..b4c49cf 100644
--- i/public/wp-content/plugins/qtranslate/qtranslate_core.php
+++ w/public/wp-content/plugins/qtranslate/qtranslate_core.php
@@ -455,9 +455,9 @@ function qtrans_strftime($format, $date, $default = '', $before = '', $after = '
return $before.strftime($format, $date).$after;
}
-function qtrans_dateFromPostForCurrentLanguage($old_date, $format ='', $before = '', $after = '') {
+function qtrans_dateFromPostForCurrentLanguage($old_date, $format ='') {
global $post;
- return qtrans_strftime(qtrans_convertDateFormat($format), mysql2date('U',$post->post_date), $old_date, $before, $after);
+ return qtrans_strftime(qtrans_convertDateFormat($format), mysql2date('U',$post->post_date), $old_date);
}
function qtrans_dateModifiedFromPostForCurrentLanguage($old_date, $format ='') {
@Wayniii
Copy link

Wayniii commented Aug 21, 2015

Hey thanks for this files !!

It's work fine on WP3.9, but we have a new problem with the new update of wordpress WP4.3
It's an update with the new Visual Editor and qTranslate freeze the tabs for switch with another language
and Visual Editor not working. Someone find solution for fix that ?

Thanks for help !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment