Skip to content

Commit

Permalink
2.9.8.7 pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclause committed Feb 9, 2015
1 parent a460832 commit fb29592
Show file tree
Hide file tree
Showing 7 changed files with 396 additions and 424 deletions.
17 changes: 10 additions & 7 deletions admin/admin_utils.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
<?php

function qtranxf_detect_admin_language($language,$url_info) {
function qtranxf_detect_admin_language($url_info) {
global $q_config;
$cs;
$lang;
$cs=null;
$lang=null;
if(isset($_COOKIE[QTX_COOKIE_NAME_ADMIN])){
$lang=qtranxf_resolveLangCase($_COOKIE[QTX_COOKIE_NAME_ADMIN],$cs);
$url_info['lang_cookie_admin'] = $lang;
}
if(!$lang){
$locale = get_locale();
//qtranxf_dbg_log('qtranxf_detect_admin_language: locale='.$locale);
$url_info['locale'] = $locale;
$lang = qtranxf_resolveLangCase(substr($locale,0,2),$cs);
$url_info['lang_locale'] = $lang;
if(!$lang) $lang = $q_config['default_language'];
}
//qtranxf_dbg_log('qtranxf_detect_admin_language: lang='.$lang);
return $lang;
$url_info['doing_front_end'] = false;
$url_info['lang_admin'] = $lang;
return $url_info;
}
add_filter('qtranslate_detect_admin_language','qtranxf_detect_admin_language',10,2);
add_filter('qtranslate_detect_admin_language','qtranxf_detect_admin_language');

function qtranxf_mark_default($text) {
global $q_config;
Expand Down
7 changes: 2 additions & 5 deletions qtranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: qTranslate-X
Plugin URI: http://wordpress.org/plugins/qtranslate-x/
Description: Adds user-friendly and database-friendly multilingual content support into WordPress.
Version: 2.9.8.6
Version: 2.9.8.7
Author: John Clause based on original code by Qian Qin
Author URI: http://qtranslatexteam.wordpress.com/about
Tags: multilingual, multi, language, admin, tinymce, Polyglot, bilingual, widget, switcher, professional, human, translation, service, qTranslate, zTranslate, mqTranslate, qTranslate Plus, WPML
Expand Down Expand Up @@ -101,7 +101,7 @@
define( 'QTRANSLATE_FILE', __FILE__ );
}

define('QTX_VERSION','2.9.8.6');
define('QTX_VERSION','2.9.8.7');

/* DEFAULT CONFIGURATION PART BEGINS HERE */

Expand Down Expand Up @@ -253,9 +253,6 @@
$q_config['not_available']['gl'] = "Sentímolo moito, ista entrada atopase unicamente en %LANG;,: e %.";
$q_config['not_available']['tr'] = "Sorry, this entry is only available in %LANG:, : and %.";

// qTranslate Services
$q_config['qtranslate_services'] = false;

// strftime usage (backward compability)
$q_config['use_strftime'] = QTX_DATE;

Expand Down
4 changes: 2 additions & 2 deletions qtranslate_configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ function qtranxf_add_admin_footer_js ( $enqueue_script=false ) {
$config['domains']=$q_config['domains'];
}
$config['url_info_home']=$q_config['url_info']['home'];
//$config['WP_CONTENT_URL']=trailingslashit(WP_CONTENT_URL);
$config['flag_location']=qtranxf_flag_location();
$config['js']=array();
$config['flag']=array();
Expand Down Expand Up @@ -366,7 +365,8 @@ function qtranxf_add_admin_css () {
echo ".qtranxs_lang_div.active { background: #DFDFDF; border-left:1px solid #D0D0D0; border-right: 1px solid #F7F7F7; padding:6px 4px 8px 4px }";
*/
//echo "#qtranxs_debug { width:100%; height:200px }";
do_action('qtranslate_css');
do_action('qtranslate_admin_css');
do_action('qtranslate_css');//should not be used
echo '</style>'.PHP_EOL;
}

Expand Down
Loading

0 comments on commit fb29592

Please sign in to comment.