Skip to content

Commit

Permalink
3.2.8 pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
johnclause committed Mar 17, 2015
1 parent d87d6d4 commit 94d69cd
Show file tree
Hide file tree
Showing 10 changed files with 786 additions and 337 deletions.
26 changes: 20 additions & 6 deletions admin/import_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,35 @@ function qtranxf_migrate_plugins()
//add_action('qtranslate_init_begin','qtranxf_migrate_plugins',11);

function qtranxf_add_row_migrate($nm,$plugin) {
if(!file_exists(WP_CONTENT_DIR.'/plugins/'.$plugin)) return;
$plugin_file = WP_CONTENT_DIR.'/plugins/'.$plugin;
if(!file_exists($plugin_file)) return;
//$pd = get_plugin_data( $plugin_file.'/mqtranslate.php', false, true );
//qtranxf_dbg_log('qtranxf_add_row_migrate: $pd:',$pd);
switch($plugin){
case 'sitepress-multilingual-cms': $href='https://wpml.org'; break;
default: $href='https://wordpress.org/plugins/'.$plugin; break;
}
?>
<tr valign="top" id="qtranslate-<?php echo $plugin; ?>">
<th scope="row"><?php _e('Plugin');?> <a href="https://wordpress.org/plugins/<?php echo $plugin; ?>/" target="_blank"><?php echo $nm; ?></a></th>
<th scope="row"><?php _e('Plugin');?> <a href="<?php echo $href; ?>/" target="_blank"><?php echo $nm; ?></a></th>
<td>
<?php
if($plugin=='qtranslate' || $plugin=='ztranslate'){
_e('There is no need to migrate any setting, the database schema is compatible with this plugin.', 'qtranslate');
}else{
switch($plugin){
case 'qtranslate':
case 'ztranslate':
_e('There is no need to migrate any setting, the database schema is compatible with this plugin.', 'qtranslate');
break;
case 'sitepress-multilingual-cms':
printf(__('Use plugin "%s%s%s" to import data.', 'qtranslate'),'<a href="https://wordpress.org/plugins/w2q-wpml-to-qtranslate/" target="_blank">','W2Q: WPML to qTranslate','</a>');
break;
default:
?>
<label for="<?php echo $plugin; ?>_no_migration"><input type="radio" name="<?php echo $plugin; ?>-migration" id="<?php echo $plugin; ?>_no_migration" value="none" checked /> <?php _e('Do not migrate any setting', 'qtranslate'); ?></label>
<br/>
<label for="<?php echo $plugin; ?>_import_migration"><input type="radio" name="<?php echo $plugin; ?>-migration" id="<?php echo $plugin; ?>_import_migration" value="import" /> <?php echo __('Import settings from ', 'qtranslate').$nm; ?></label>
<br/>
<label for="<?php echo $plugin; ?>_export_migration"><input type="radio" name="<?php echo $plugin; ?>-migration" id="<?php echo $plugin; ?>_export_migration" value="export" /> <?php echo __('Export settings to ', 'qtranslate').$nm; ?></label>
<?php } ?>
<?php break; } ?>
</td>
</tr>
<?php
Expand Down Expand Up @@ -156,6 +169,7 @@ function qtranxf_admin_section_import_export($request_uri)
<?php qtranxf_add_row_migrate('mqTranslate','mqtranslate'); ?>
<?php qtranxf_add_row_migrate('qTranslate Plus','qtranslate-xp'); ?>
<?php qtranxf_add_row_migrate('zTranslate','ztranslate'); ?>
<?php qtranxf_add_row_migrate('WPML Multilingual CMS','sitepress-multilingual-cms'); ?>
<tr valign="top">
<th scope="row"><?php _e('Reset qTranslate', 'qtranslate');?></th>
<td>
Expand Down
20 changes: 10 additions & 10 deletions admin/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ var qTranslateX=function(pg)

/**
* Highlighting the translatable fields
* Since 3.2-b3
* @since 3.2-b3
*/
inpField.className += ' qtranxs-translatable';

Expand Down Expand Up @@ -407,7 +407,7 @@ var qTranslateX=function(pg)
};

/**
* Since 3.2.7
* @since 3.2.7
*/
var displayHookNodes=[];
addDisplayHookNode=function(nd)
Expand All @@ -427,7 +427,7 @@ var qTranslateX=function(pg)
}

/**
* Since 3.2.7 switched to use of nodeValue instead of innerHTML.
* @since 3.2.7 switched to use of nodeValue instead of innerHTML.
*/
addDisplayHook=function(elem)
{
Expand Down Expand Up @@ -600,7 +600,7 @@ var qTranslateX=function(pg)
}

/**
* Since 3.1-b2
* @since 3.1-b2
*/
addContentFieldHooks=function(fields,form,sep)
{
Expand Down Expand Up @@ -631,8 +631,8 @@ var qTranslateX=function(pg)

/**
* adds custom hooks from configuration
* Since 3.1-b2 - renamed to addCustomContentHooks, since addContentHooks used in qTranslateConfig.js
* Since 3.0 - addContentHooks
* @since 3.1-b2 - renamed to addCustomContentHooks, since addContentHooks used in qTranslateConfig.js
* @since 3.0 - addContentHooks
*/
this.addCustomContentHooks=function(form)
{
Expand All @@ -649,7 +649,7 @@ var qTranslateX=function(pg)

/**
* Parses custom page configuration, loaded in qtranxf_load_admin_page_config.
* Since 3.1-b2
* @since 3.1-b2
*/
this.addPageHooks=function(page_config_forms)
{
Expand Down Expand Up @@ -769,7 +769,7 @@ var qTranslateX=function(pg)

/**
* Highlighting the translatable fields
* Since 3.2-b3
* @since 3.2-b3
*/
ed.getContainer().className += ' qtranxs-translatable';
ed.getElement().className += ' qtranxs-translatable';
Expand Down Expand Up @@ -883,7 +883,7 @@ var qTranslateX=function(pg)
// languageSwitch.onSwitch(onTabSwitchCustom);
}
/**
* Since 3.2.4 Synchronization of multiple sets of Language Switching Buttons
* @since 3.2.4 Synchronization of multiple sets of Language Switching Buttons
*/
qTranslateConfig.onTabSwitchFunctions=[];
qTranslateConfig.onTabSwitchFunctions.push(onTabSwitch);
Expand All @@ -893,7 +893,7 @@ var qTranslateX=function(pg)
}

/**
* Since 3.2.4 Multiple sets of Language Switching Buttons
* @since 3.2.4 Multiple sets of Language Switching Buttons
*/
function qtranxj_LanguageSwitch(langSwitchWrap)
{
Expand Down
2 changes: 1 addition & 1 deletion admin/js/edit-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ qTranslateConfig.js={
qtx.addContentHooksTinyMCE();

/**
* Since 3.2.4 Multiple sets of Language Switching Buttons
* @since 3.2.4 Multiple sets of Language Switching Buttons
*/
if( !qTranslateConfig.page_config ) qTranslateConfig.page_config={};
if( !qTranslateConfig.page_config.anchors)
Expand Down
4 changes: 2 additions & 2 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: 3.2.7
Version: 3.2.8
Author: qTranslate Team
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 @@ -105,7 +105,7 @@
define( 'QTRANSLATE_FILE', __FILE__ );
}

define('QTX_VERSION','3.2.7');
define('QTX_VERSION','3.2.8');

/* DEFAULT CONFIGURATION PART BEGINS HERE */

Expand Down
8 changes: 4 additions & 4 deletions qtranslate_configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function qtranxf_add_admin_footer_js ( $enqueue_script=false ) {
if($script_file) $deps[] = 'qtranslate-admin-edit';
if(isset($page_config['scripts'])){
foreach($page_config['scripts'] as $js){
}
}
}
wp_register_script( 'qtranslate-admin-common', plugins_url( '/admin/js/common.min.js', __FILE__ ), $deps, QTX_VERSION );
wp_enqueue_script( 'qtranslate-admin-common' );
Expand All @@ -317,7 +317,7 @@ function qtranxf_add_admin_footer_js ( $enqueue_script=false ) {
if($q_config['url_mode']==QTX_URL_DOMAINS){
$config['domains']=$q_config['domains'];
}
$config['url_info_home']=$q_config['url_info']['home'];
$config['url_info_home']=trailingslashit(qtranxf_get_home_info()['path']);//$q_config['url_info']['home'];
$config['flag_location']=qtranxf_flag_location();
$config['js']=array();
$config['flag']=array();
Expand Down Expand Up @@ -450,10 +450,10 @@ function qtranxf_add_admin_css () {
}

function qtranxf_admin_head() {
//qtranxf_add_css();// Since 3.2.5 no longer needed
//qtranxf_add_css();//Since 3.2.5 no longer needed
qtranxf_add_admin_css();
qtranxf_add_admin_head_js();
//since 3.2.7 qtranxf_optionFilter('disable');//why this is here?
//Since 3.2.7 qtranxf_optionFilter('disable');//why this is here?
}
add_action('admin_head', 'qtranxf_admin_head');

Expand Down
Loading

0 comments on commit 94d69cd

Please sign in to comment.