-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3.2.9.8.9 pre-release, option "Post Types" and Visual Composer compat…
…ibility
- Loading branch information
1 parent
5e56bfa
commit 0cfc3d8
Showing
11 changed files
with
664 additions
and
552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
/* | ||
Copyright 2014 qTranslate Team (email : [email protected] ) | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
/* | ||
// debugging tools, do not check in | ||
var cc=0; | ||
|
@@ -303,7 +320,8 @@ var qTranslateX=function(pg) | |
setLangCookie(qTranslateConfig.activeLanguage); | ||
} | ||
|
||
this.getActiveLanguage=function() { return qTranslateConfig.activeLanguage; } | ||
this.getActiveLanguage = function() { return qTranslateConfig.activeLanguage; } | ||
this.getActiveLanguageName = function() { return qTranslateConfig.language_name[qTranslateConfig.activeLanguage]; } | ||
|
||
var contentHooks={}; | ||
var contentHookId = 0; | ||
|
@@ -903,6 +921,26 @@ var qTranslateX=function(pg) | |
*/ | ||
this.addLanguageSwitchAfterListener=function(func){ qTranslateConfig.onTabSwitchFunctionsLoad.push(func); } | ||
|
||
/** | ||
* @since 3.2.9.8.9 | ||
* Designed as interface for other plugin integration. The documentation is available at | ||
* https://qtranslatexteam.wordpress.com/integration/ | ||
* | ||
*/ | ||
this.enableLanguageSwitchingButtons=function(on){ | ||
var display = on ? 'block' : 'none'; | ||
for(var lang in qTranslateConfig.tabSwitches){ | ||
var tabSwitches = qTranslateConfig.tabSwitches[lang]; | ||
for(var i=0; i < tabSwitches.length; ++i){ | ||
var tabSwitch = tabSwitches[i]; | ||
var tabSwitchParent = tabSwitches[i].parentElement; | ||
tabSwitchParent.style.display = display; | ||
break; | ||
} | ||
break; | ||
} | ||
} | ||
|
||
this.getWrapForm=function(){ | ||
var wraps = document.getElementsByClassName('wrap'); | ||
for(var i=0; i < wraps.length; ++i){ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.