Changeset 1039904
- Timestamp:
- 12/07/2014 05:21:58 PM (11 years ago)
- Location:
- mqtranslate/trunk
- Files:
-
- 6 edited
-
mqtranslate.php (modified) (3 diffs)
-
mqtranslate_configuration.php (modified) (2 diffs)
-
mqtranslate_core.php (modified) (6 diffs)
-
mqtranslate_javascript.php (modified) (1 diff)
-
mqtranslate_wphacks.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mqtranslate/trunk/mqtranslate.php
r1039903 r1039904 4 4 Plugin URI: http://wordpress.org/plugins/mqtranslate/ 5 5 Description: Adds userfriendly multilingual content support into Wordpress. mqTranslate is a fork of the well-known <a href="http://www.qianqin.de/mqtranslate/">qTranslate</a> plugin by <a href="http://www.qianqin.de/">Qian Qin</a>, extending the original software with collaborative and team-oriented features. 6 Version: 2. 86 Version: 2.9 7 7 Author: xhaleera 8 8 Author URI: http://www.xhaleera.com … … 95 95 // Can be changed to use with other versions but might cause problems and/or data loss! 96 96 define('QT_MIN_SUPPORTED_WP_MINOR_VERSION', '3.9'); 97 define('QT_MAX_SUPPORTED_WP_MAJOR_VERSION', '4. 0');97 define('QT_MAX_SUPPORTED_WP_MAJOR_VERSION', '4.1'); 98 98 define('QT_STRING', 1); 99 99 define('QT_BOOLEAN', 2); … … 471 471 $q_config['disable_header_css'] = 0; 472 472 473 // Use secure cookie 474 $q_config['use_secure_cookie'] = 0; 475 473 476 // Load mqTranslate 474 477 require_once(dirname(__FILE__)."/mqtranslate_javascript.php"); -
mqtranslate/trunk/mqtranslate_configuration.php
r989059 r1039904 232 232 qtrans_checkSetting('hide_default_language', true, QT_BOOLEAN); 233 233 qtrans_checkSetting('disable_header_css', true, QT_BOOLEAN); 234 qtrans_checkSetting('use_secure_cookie', true, QT_BOOLEAN); 234 235 235 236 if (isset($_POST['allowed_custom_post_types'])) … … 541 542 <th scope="row"><?php _e('Remove plugin CSS from head', 'mqtranslate'); ?></th> 542 543 <td> 543 <label for="disable_header_css"><input type="checkbox" name="disable_header_css" id="disable_header_css" value="1"<?php echo empty($q_config['disable_header_css']) ? '' : ' checked="checked"' ?> "/> <?php _e('Remove inline CSS code added by plugin from the head', 'mqtranslate'); ?></label>544 <label for="disable_header_css"><input type="checkbox" name="disable_header_css" id="disable_header_css" value="1"<?php echo empty($q_config['disable_header_css']) ? '' : ' checked="checked"' ?> /> <?php _e('Remove inline CSS code added by plugin from the head', 'mqtranslate'); ?></label> 544 545 <br /> 545 546 <small><?php _e('This will remove default styles applyied to mqTranslate Language Chooser', 'mqtranslate') ?></small> 547 </td> 548 </tr> 549 <tr valign="top"> 550 <th scope="row"><?php _e('Use Secure Cookie', 'mqtranslate'); ?></th> 551 <td> 552 <label for="use_secure_cookie"><input type="checkbox" name="use_secure_cookie" id="use_secure_cookie" value="1"<?php echo empty($q_config['use_secure_cookie']) ? '' : ' checked="checked"' ?> /> <?php _e('Make mqTranslate cookie available only through HTTPS connections', 'mqtranslate'); ?> </label> 553 <br /> 554 <small><?php _e("Don't check this if you don't know what you're doing!", 'mqtranslate') ?></small> 546 555 </td> 547 556 </tr> -
mqtranslate/trunk/mqtranslate_core.php
r1014363 r1039904 49 49 delete_option('mqtranslate_allowed_custom_post_types'); 50 50 delete_option('mqtranslate_disable_header_css'); 51 delete_option('mqtranslate_use_secure_cookie'); 51 52 if(isset($_POST['mqtranslate_reset3'])) { 52 53 delete_option('mqtranslate_term_name'); … … 83 84 84 85 // set test cookie 85 setcookie('qtrans_cookie_test', 'mqTranslate Cookie Test', 0, $q_config['url_info']['home'], $q_config['url_info']['host'] );86 setcookie('qtrans_cookie_test', 'mqTranslate Cookie Test', 0, $q_config['url_info']['home'], $q_config['url_info']['host'], !empty($q_config['use_secure_cookie'])); 86 87 // check cookies for admin 87 88 if(defined('WP_ADMIN')) { 88 89 if(isset($_GET['lang']) && qtrans_isEnabled($_GET['lang'])) { 89 90 $q_config['language'] = $q_config['url_info']['language']; 90 setcookie('qtrans_admin_language', $q_config['language'], time()+60*60*24*30 );91 setcookie('qtrans_admin_language', $q_config['language'], time()+60*60*24*30, !empty($q_config['use_secure_cookie'])); 91 92 } elseif(isset($_COOKIE['qtrans_admin_language']) && qtrans_isEnabled($_COOKIE['qtrans_admin_language'])) { 92 93 $q_config['language'] = $_COOKIE['qtrans_admin_language']; … … 287 288 $allowed_custom_post_types = get_option('mqtranslate_allowed_custom_post_types'); 288 289 $disable_header_css = get_option('mqtranslate_disable_header_css'); 290 $use_secure_cookie = get_option('mqtranslate_use_secure_cookie'); 289 291 290 292 // default if not set … … 317 319 $hide_default_language = qtrans_validateBool($hide_default_language, $q_config['hide_default_language']); 318 320 $disable_header_css = qtrans_validateBool($disable_header_css, $q_config['disable_header_css']); 321 $use_secure_cookie = qtrans_validateBool($use_secure_cookie, $q_config['use_secure_cookie']); 319 322 320 323 // url fix for upgrading users … … 346 349 $q_config['allowed_custom_post_types'] = $allowed_custom_post_types; 347 350 $q_config['disable_header_css'] = $disable_header_css; 351 $q_config['use_secure_cookie'] = $use_secure_cookie; 348 352 349 353 do_action('mqtranslate_loadConfig'); … … 391 395 update_option('mqtranslate_allowed_custom_post_types', implode(',', $q_config['allowed_custom_post_types'])); 392 396 update_option('mqtranslate_disable_header_css', $q_config['disable_header_css'] ? '1' : '0'); 397 update_option('mqtranslate_use_secure_cookie', $q_config['use_secure_cookie'] ? '1' : '0'); 393 398 394 399 do_action('mqtranslate_saveConfig'); -
mqtranslate/trunk/mqtranslate_javascript.php
r1014364 r1039904 236 236 jQuery('.wp-editor-wrap').mousedown(function(e){ 237 237 wpActiveEditor = 'qtrans_textarea_'+this.id.slice(3, -5); 238 jQuery('#insert-media-button').data('editor', 'qtrans_textarea_' + this.id.slice(3, -5)); 238 239 }); 239 240 "; -
mqtranslate/trunk/mqtranslate_wphacks.php
r989060 r1039904 398 398 399 399 function qtrans_createEditorToolbarButton($language, $id, $js_function = 'switchEditors.go', $label = ''){ 400 global $q_config ;400 global $q_config, $wp_version; 401 401 402 402 $cu = wp_get_current_user(); … … 407 407 $title .= ' - ' . __('Read only', 'mqtranslate'); 408 408 409 $html = " 410 var bc = document.getElementById('wp-".$id."-editor-tools'); 411 var mb = document.getElementById('wp-".$id."-media-buttons'); 412 var ls = document.createElement('a'); 413 var l = document.createTextNode('{$title}'); 414 ls.id = 'qtrans_select_".$language."'; 415 ls.className = 'wp-switch-editor'; 416 ls.onclick = function() { ".$js_function."('".$id."','".$language."'); }; 417 ls.appendChild(l); 418 bc.insertBefore(ls,mb); 419 "; 409 if (version_compare($wp_version, '4.1-beta', '<')) 410 { 411 $html = " 412 var bc = document.getElementById('wp-".$id."-editor-tools'); 413 var mb = document.getElementById('wp-".$id."-media-buttons'); 414 var ls = document.createElement('a'); 415 var l = document.createTextNode('{$title}'); 416 ls.id = 'qtrans_select_".$language."'; 417 ls.className = 'wp-switch-editor'; 418 ls.onclick = function() { ".$js_function."('".$id."','".$language."'); }; 419 ls.appendChild(l); 420 bc.insertBefore(ls,mb); 421 "; 422 } 423 else { 424 $html = " 425 var before = jQuery('#{$id}-html'); 426 var html = '<button id=\"qtrans_select_{$language}\" class=\"wp-switch-editor\" onclick=\"{$js_function}(\'{$id}\', \'{$language}\');\" type=\"button\">{$title}</button>'; 427 jQuery(html).insertAfter(before); 428 "; 429 } 420 430 return $html; 421 431 } -
mqtranslate/trunk/readme.txt
r1039903 r1039904 3 3 Tags: multilingual, language, admin, tinymce, bilingual, widget, switcher, i18n, l10n, multilanguage, professional, translation, service, human 4 4 Requires at least: 3.9 5 Tested up to: 4. 06 Stable tag: 2. 85 Tested up to: 4.1 6 Stable tag: 2.9 7 7 Donate Link: http://www.xhaleera.com/ 8 8 License: GPLv2 … … 71 71 == Changelog == 72 72 73 2.9: 74 75 - Support for WordPress 4.1 76 - Fixed mislocation of inserted media in the wrong languages when using the text editor 77 - Added option for secure cookies 78 73 79 2.8: 74 80
Note: See TracChangeset
for help on using the changeset viewer.