Version Description
- (Builders/Gutenberg) Language switcher CSS tweaks to prevent showing oversize flag images in some themes.
- (Core/Post Types) Added post types of the
Gutenberg
plugin to the hidden types array.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.5.14 |
Comparing to | |
See all releases |
Code changes from version 2.5.13 to 2.5.14
data/wpglobus-product-info.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}WPGlobus Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.4.0"},"wpglobus-
|
1 |
+
{"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"1.2.0","_api_tested_up_to":"4.9.6"},"wpglobus-multi-currency":{"title":"{:en}WPGlobus Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.4.0"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.4"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"3.5.13","_api_tested_up_to":"5.4.1"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.4.4","_api_tested_up_to":"5.5.1"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5.1"}}
|
includes/builders/gutenberg/assets/js/wpglobus-gutenberg.js
CHANGED
@@ -274,9 +274,9 @@ jQuery(document).ready(function ($) {
|
|
274 |
var pluginStarButton = $('.components-panel__header.edit-post-sidebar-header button.components-icon-button').eq(0);
|
275 |
|
276 |
var switcherButtonHTML = {
|
277 |
-
flagOnly: '<img height="
|
278 |
-
flagLanguage: '<img height="
|
279 |
-
flagCode: '<img height="
|
280 |
languageOnly: ' ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],
|
281 |
languageCode: ' ' + WPGlobusGutenberg.language,
|
282 |
};
|
@@ -439,7 +439,7 @@ jQuery(document).ready(function ($) {
|
|
439 |
enabledLanguages.map(
|
440 |
function(lang){
|
441 |
return el( 'li', {key:lang, className:'language-item'},
|
442 |
-
el('img', {style:{marginRight:'7px'},className:'wpglobus-switcher-panel__flag', height:'
|
443 |
el(Button, {href:refs[lang], isSmall:true, isPrimary:true}, languageNames[lang])
|
444 |
);
|
445 |
}
|
274 |
var pluginStarButton = $('.components-panel__header.edit-post-sidebar-header button.components-icon-button').eq(0);
|
275 |
|
276 |
var switcherButtonHTML = {
|
277 |
+
flagOnly: '<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" />',
|
278 |
+
flagLanguage: '<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],
|
279 |
+
flagCode: '<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> ' + WPGlobusGutenberg.language,
|
280 |
languageOnly: ' ' + WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],
|
281 |
languageCode: ' ' + WPGlobusGutenberg.language,
|
282 |
};
|
439 |
enabledLanguages.map(
|
440 |
function(lang){
|
441 |
return el( 'li', {key:lang, className:'language-item'},
|
442 |
+
el('img', {style:{marginRight:'7px',width:'20px'},className:'wpglobus-switcher-panel__flag', height:'20', width:'20', src:flagsUrl[lang]}),
|
443 |
el(Button, {href:refs[lang], isSmall:true, isPrimary:true}, languageNames[lang])
|
444 |
);
|
445 |
}
|
includes/builders/gutenberg/assets/js/wpglobus-gutenberg.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";jQuery(document).ready(function(E){var C={counter:0,noticeOn:!1,initDone:!1,languageSelectorBoxDelta:0,oldLanguageSelector:!1,languageSelectorEnabled:!0,parseBool:function(e){return!/^(false|0)$/i.test(e)&&!!e},getCounter:function(){return C.counter},getOptionKey:function(e){return e=e||"",WPGlobusGutenberg.keyOption[e]},getOptions:function(){return WPGlobusGutenberg.options},isOldLanguageSelector:function(){return C.oldLanguageSelector},isPostDisabled:function(){return WPGlobusGutenberg.__post.disabled},isEnabledTab:function(e){void 0===e&&(e="options");var t=!1;return"options"==e&&C.parseBool(WPGlobusGutenberg.enabledOptionsTab)&&(t=!0),t},init:function(){WPGlobusGutenberg.yoastSeo=C.parseBool(WPGlobusGutenberg.yoastSeo),WPGlobusGutenberg.elementor=C.parseBool(WPGlobusGutenberg.elementor),C.isPostDisabled()||(C.initListeners(),C.initNotifications(),C.setTabs(),C.formHandler(),C.attachListeners())},initListeners:function(){WPGlobusGutenberg.yoastSeo&&1==E(".yoast.wpseo-metabox").length&&E(window).on("beforeunload",function(e){e.stopImmediatePropagation()})},formHandler:function(){var e=E(".metabox-base-form #referredby").attr("value");void 0!==e&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),E(".metabox-base-form #referredby").attr("value",e)),void 0!==(e=E('input[name="_wp_original_http_referer"]').attr("value"))&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),E('input[name="_wp_original_http_referer"]').attr("value",e))},initNotifications:function(){void 0!==wp.editPost&&void 0!==wp.plugins&&WPGlobusGutenberg.elementor&&"internal"==WPGlobusGutenberg.data.elementorCssPrintMethod&&wp.data.dispatch("core/notices").createNotice("error",WPGlobusGutenberg.i18n.elementorWarning,{id:"elementorcssprintmethodnotice",isDismissible:!0,actions:[{url:WPGlobusGutenberg.i18n.elementorActionLink,label:WPGlobusGutenberg.i18n.elementorActionLabel}]})},setTabs:function(){var t;0!=WPGlobusGutenberg.tabs.length?(C.oldLanguageSelector=!0,t=setInterval(function(){var e=E(".edit-post-header__settings");1==e.length&&(e.before(WPGlobusGutenberg.tabs),clearInterval(t))},200)):C.WPGlobusSwitcherPlugin()},setSelectorStatus:function(){var e;C.isOldLanguageSelector()&&(E(".wpglobus-gutenberg-selector-box").css({opacity:"0.2"}).attr("onclick","return false;"),C.languageSelectorEnabled=!1,e=setInterval(function(){if(0==E(".is-saving").length){if(clearInterval(e),WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage&&-1!=location.pathname.indexOf(WPGlobusGutenberg.postEditPage))return WPGlobusGutenberg.pagenow=WPGlobusGutenberg.postEditPage,E(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick",""),void C.reloadPage();C.languageSelectorEnabled=!0,E(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick","")}},400))},reloadPage:function(){E(".wpglobus-selector-grid").css({"grid-template-columns":"10% 90%"}),E(".wpglobus-gutenberg-selector-text").text(WPGlobusGutenberg.i18n.reload),function e(){E(".wpglobus-gutenberg-selector").fadeOut(500).fadeIn(500,e)}(),setTimeout(function(){location.reload()},500)},attachListeners:function(){C.isOldLanguageSelector()&&(E(document).on("mouseenter",".wpglobus-gutenberg-selector",function(e){C.languageSelectorEnabled&&(E(".wpglobus-gutenberg-selector-dropdown").css({display:"block"}),C.languageSelectorBoxDelta=e.screenY,E(".edit-post-header").css({"z-index":"100000"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"100001"}))}),E(document).on("mouseleave",".wpglobus-gutenberg-selector",function(e){0!=C.languageSelectorBoxDelta&&e.screenY-C.languageSelectorBoxDelta<=0&&(E(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),E(".edit-post-header").css({"z-index":"9989"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"100"}))}),E(document).on("mouseleave",".wpglobus-gutenberg-selector-dropdown",function(e){E(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),E(".edit-post-header").css({"z-index":"9989"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"10000"})}),E(document).on("click",".editor-post-save-draft",function(){C.setSelectorStatus()}),E(document).on("click",".editor-post-publish-button",function(){C.setSelectorStatus()}))},WPGlobusSwitcherPlugin:function(){if(void 0!==wp.editPost&&void 0!==wp.plugins){var e,t=WPGlobusGutenberg.language,n=WPGlobusCoreData.enabled_languages,o=WPGlobusCoreData.en_language_name,s=WPGlobusGutenberg.flags_url,a="WPGlobus Switcher",l=location.href,u={};for(e in n)-1==l.indexOf("language="+t)?u[n[e]]=l+"&language="+n[e]:u[n[e]]=l.replace("language="+t,"language="+n[e]);var i=wp.i18n.__,r=wp.element.createElement,g=wp.element.Fragment,c=wp.components.TabPanel,b=wp.compose.withState,p=wp.components.RadioControl,d=wp.components.Notice,w=wp.components.Button,m=wp.editPost.PluginSidebarMoreMenuItem,G=wp.components.PanelBody,f=wp.editPost.PluginSidebar,h=wp.plugins.registerPlugin,P=E(".components-panel__header.edit-post-sidebar-header button.components-icon-button").eq(0),v={flagOnly:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" />',flagLanguage:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],flagCode:'<img height="20px" width="20px" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusGutenberg.language,languageOnly:" "+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],languageCode:" "+WPGlobusGutenberg.language},W="",_="",x=C.getOptionKey("switcherButtonType");S(WPGlobusGutenberg.options[x]),_=W,E(document).on("click",P,function(){T()});var y=b({value:_})(function(e){e.value;var t=e.setState;return r(p,{label:"",help:"Select type of switcher language button.",selected:_,className:"wpglobus-switcher-components-radio-control",options:[{label:"Flag only",value:"flagOnly"},{label:"Flag with language",value:"flagLanguage"},{label:"Flag with language code",value:"flagCode"},{label:"Language only",value:"languageOnly"},{label:"Language code",value:"languageCode"}],onChange:function(e){t({value:_=e}),O(x,e)}})});h("wpglobus-switcher",{icon:"",render:function(){return T(),r(g,{},r(m,{target:"wpglobus-switcher-sidebar",icon:"admin-site"},i("WPGlobus")),r(f,{name:"wpglobus-switcher-sidebar",title:a,className:"wpglobus-switcher-components-panel"},r("div",{className:"wpglobus-switcher-message wpglobus-switcher-error-message hidden",style:{}},""),r(G,{className:"wpglobus-switcher-panel__body"},(e=[{name:"switcher",title:"Languages",className:"wpglobus-panel-tab wpglobus-panel-tab-selector edit-post-sidebar__panel-tab"}],WPGlobusGutenberg.isEnabledTab("options")&&e.push({name:"options",title:"Options",className:"wpglobus-panel-tab wpglobus-panel-tab-options edit-post-sidebar__panel-tab"}),r(c,{name:"WPGlobusSwitcherTabPanel",className:"wpglobus-tab-panel",activeClass:"is-active",tabs:e},B)))));var e}})}function S(e){W=e=e||"flagLanguage"}function L(e){void 0===e&&(e=!0);var t,n=document.querySelectorAll(".wpglobus-switcher-components-radio-control .components-radio-control__input");0!=n.length&&(e?(n.forEach(function(e){e.classList.add(e.value),e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.add("wpglobus-switcher-pulsate-radio-off")}),(t=document.querySelector(".wpglobus-switcher-components-radio-control ."+_)).classList.remove("wpglobus-switcher-pulsate-radio-off"),t.classList.add("wpglobus-switcher-pulsate-radio")):n.forEach(function(e){e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.remove("wpglobus-switcher-pulsate-radio-off"),e.classList.add("wpglobus-switcher-pulsate-radio-on")}))}function N(e,t){void 0===e||C.noticeOn||(C.noticeOn=!0,e.innerText=t,e.classList.remove("hidden"),setTimeout(function(){e.classList.add("hidden"),C.noticeOn=!1},3e3))}function O(e,t){t=t||"",x==(e=e||"")&&(L(!0),function(e,t){if(""==(e=e||""))return;var n={sender:"WPGlobusGutenberg",_action:"saveOption",is_admin:1};return n.counter=C.counter++,n.options={},n.options[e]=t,wp.ajax.post(WPGlobusGutenberg.wpglobusAjax,{data:n})}(e,t).then(function(e){"success"==e.result&&(S(t),T(WPGlobusGutenberg.options[x]=t))}).fail(function(e){var t=document.getElementsByClassName("wpglobus-switcher-error-message");void 0!==t[0]&&("error"==e.result?N(t[0],e.message):400==e.status&&N(t[0],"Error: "+e.status+" ("+e.statusText+")"),_=W);var n=document.getElementsByClassName("wpglobus-panel-tab-options");void 0!==n[0]&&-1!=n[0].classList.value.indexOf("is-active")&&n[0].click()}).always(function(){L(!1)}))}function k(e){return void 0===v[e]&&(e=W),v[e]}function T(n){void 0!==n&&void 0!==v[n]||(n=W),setTimeout(function(){var e,t=document.querySelector('[aria-label="'+a+'"]');null!=t&&(void 0===t.dataset.status?(e=t.innerHTML,t.innerHTML=e+k(n),t.dataset.status="init"):(t.innerHTML=k(n),t.dataset.status="changed"))},300)}function B(e){return"switcher"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-selector-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select language")),r("div",{className:"wpglobus-switcher-panel__switcher-box"},WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage?r("div",{style:{marginBottom:"20px"},className:"wpglobus-switcher-panel__switcher-notice"},WPGlobusGutenberg.i18n.save_post):r("ul",{className:"language-list"},n.map(function(e){return r("li",{key:e,className:"language-item"},r("img",{style:{marginRight:"7px"},className:"wpglobus-switcher-panel__flag",height:"20px",width:"20px",src:s[e]}),r(w,{href:u[e],isSmall:!0,isPrimary:!0},o[e]))}))),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__info",href:WPGlobusGutenberg.store_link,isLink:!0,target:"_blank"},i("WPGlobus Premium")),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__settings-link",href:WPGlobusGutenberg.options_page_url,isLink:!0},i("WPGlobus Options"))):"options"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-options-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select type")),r(y,null)):void 0}}};WPGlobusGutenberg=E.extend({},WPGlobusGutenberg,C),WPGlobusGutenberg.init()});
|
1 |
+
"use strict";jQuery(document).ready(function(E){var C={counter:0,noticeOn:!1,initDone:!1,languageSelectorBoxDelta:0,oldLanguageSelector:!1,languageSelectorEnabled:!0,parseBool:function(e){return!/^(false|0)$/i.test(e)&&!!e},getCounter:function(){return C.counter},getOptionKey:function(e){return e=e||"",WPGlobusGutenberg.keyOption[e]},getOptions:function(){return WPGlobusGutenberg.options},isOldLanguageSelector:function(){return C.oldLanguageSelector},isPostDisabled:function(){return WPGlobusGutenberg.__post.disabled},isEnabledTab:function(e){void 0===e&&(e="options");var t=!1;return"options"==e&&C.parseBool(WPGlobusGutenberg.enabledOptionsTab)&&(t=!0),t},init:function(){WPGlobusGutenberg.yoastSeo=C.parseBool(WPGlobusGutenberg.yoastSeo),WPGlobusGutenberg.elementor=C.parseBool(WPGlobusGutenberg.elementor),C.isPostDisabled()||(C.initListeners(),C.initNotifications(),C.setTabs(),C.formHandler(),C.attachListeners())},initListeners:function(){WPGlobusGutenberg.yoastSeo&&1==E(".yoast.wpseo-metabox").length&&E(window).on("beforeunload",function(e){e.stopImmediatePropagation()})},formHandler:function(){var e=E(".metabox-base-form #referredby").attr("value");void 0!==e&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),E(".metabox-base-form #referredby").attr("value",e)),void 0!==(e=E('input[name="_wp_original_http_referer"]').attr("value"))&&(e=-1==e.indexOf("language=en")?e+"&language="+WPGlobusGutenberg.language:e.replace("language=en","language="+WPGlobusGutenberg.language),E('input[name="_wp_original_http_referer"]').attr("value",e))},initNotifications:function(){void 0!==wp.editPost&&void 0!==wp.plugins&&WPGlobusGutenberg.elementor&&"internal"==WPGlobusGutenberg.data.elementorCssPrintMethod&&wp.data.dispatch("core/notices").createNotice("error",WPGlobusGutenberg.i18n.elementorWarning,{id:"elementorcssprintmethodnotice",isDismissible:!0,actions:[{url:WPGlobusGutenberg.i18n.elementorActionLink,label:WPGlobusGutenberg.i18n.elementorActionLabel}]})},setTabs:function(){var t;0!=WPGlobusGutenberg.tabs.length?(C.oldLanguageSelector=!0,t=setInterval(function(){var e=E(".edit-post-header__settings");1==e.length&&(e.before(WPGlobusGutenberg.tabs),clearInterval(t))},200)):C.WPGlobusSwitcherPlugin()},setSelectorStatus:function(){var e;C.isOldLanguageSelector()&&(E(".wpglobus-gutenberg-selector-box").css({opacity:"0.2"}).attr("onclick","return false;"),C.languageSelectorEnabled=!1,e=setInterval(function(){if(0==E(".is-saving").length){if(clearInterval(e),WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage&&-1!=location.pathname.indexOf(WPGlobusGutenberg.postEditPage))return WPGlobusGutenberg.pagenow=WPGlobusGutenberg.postEditPage,E(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick",""),void C.reloadPage();C.languageSelectorEnabled=!0,E(".wpglobus-gutenberg-selector-box").css({opacity:"1"}).attr("onclick","")}},400))},reloadPage:function(){E(".wpglobus-selector-grid").css({"grid-template-columns":"10% 90%"}),E(".wpglobus-gutenberg-selector-text").text(WPGlobusGutenberg.i18n.reload),function e(){E(".wpglobus-gutenberg-selector").fadeOut(500).fadeIn(500,e)}(),setTimeout(function(){location.reload()},500)},attachListeners:function(){C.isOldLanguageSelector()&&(E(document).on("mouseenter",".wpglobus-gutenberg-selector",function(e){C.languageSelectorEnabled&&(E(".wpglobus-gutenberg-selector-dropdown").css({display:"block"}),C.languageSelectorBoxDelta=e.screenY,E(".edit-post-header").css({"z-index":"100000"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"100001"}))}),E(document).on("mouseleave",".wpglobus-gutenberg-selector",function(e){0!=C.languageSelectorBoxDelta&&e.screenY-C.languageSelectorBoxDelta<=0&&(E(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),E(".edit-post-header").css({"z-index":"9989"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"100"}))}),E(document).on("mouseleave",".wpglobus-gutenberg-selector-dropdown",function(e){E(".wpglobus-gutenberg-selector-dropdown").css({display:"none"}),E(".edit-post-header").css({"z-index":"9989"}),E(".wpglobus-gutenberg-selector-box").css({"z-index":"10000"})}),E(document).on("click",".editor-post-save-draft",function(){C.setSelectorStatus()}),E(document).on("click",".editor-post-publish-button",function(){C.setSelectorStatus()}))},WPGlobusSwitcherPlugin:function(){if(void 0!==wp.editPost&&void 0!==wp.plugins){var e,t=WPGlobusGutenberg.language,n=WPGlobusCoreData.enabled_languages,o=WPGlobusCoreData.en_language_name,s=WPGlobusGutenberg.flags_url,a="WPGlobus Switcher",l=location.href,u={};for(e in n)-1==l.indexOf("language="+t)?u[n[e]]=l+"&language="+n[e]:u[n[e]]=l.replace("language="+t,"language="+n[e]);var i=wp.i18n.__,r=wp.element.createElement,g=wp.element.Fragment,c=wp.components.TabPanel,b=wp.compose.withState,p=wp.components.RadioControl,d=wp.components.Notice,w=wp.components.Button,m=wp.editPost.PluginSidebarMoreMenuItem,G=wp.components.PanelBody,f=wp.editPost.PluginSidebar,h=wp.plugins.registerPlugin,P=E(".components-panel__header.edit-post-sidebar-header button.components-icon-button").eq(0),v={flagOnly:'<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" />',flagLanguage:'<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],flagCode:'<img height="20" width="20" style="width:20px;" src="'+WPGlobusGutenberg.flags_url[WPGlobusGutenberg.language]+'" /> '+WPGlobusGutenberg.language,languageOnly:" "+WPGlobusAdmin.data.en_language_name[WPGlobusGutenberg.language],languageCode:" "+WPGlobusGutenberg.language},W="",_="",y=C.getOptionKey("switcherButtonType");S(WPGlobusGutenberg.options[y]),_=W,E(document).on("click",P,function(){T()});var x=b({value:_})(function(e){e.value;var t=e.setState;return r(p,{label:"",help:"Select type of switcher language button.",selected:_,className:"wpglobus-switcher-components-radio-control",options:[{label:"Flag only",value:"flagOnly"},{label:"Flag with language",value:"flagLanguage"},{label:"Flag with language code",value:"flagCode"},{label:"Language only",value:"languageOnly"},{label:"Language code",value:"languageCode"}],onChange:function(e){t({value:_=e}),O(y,e)}})});h("wpglobus-switcher",{icon:"",render:function(){return T(),r(g,{},r(m,{target:"wpglobus-switcher-sidebar",icon:"admin-site"},i("WPGlobus")),r(f,{name:"wpglobus-switcher-sidebar",title:a,className:"wpglobus-switcher-components-panel"},r("div",{className:"wpglobus-switcher-message wpglobus-switcher-error-message hidden",style:{}},""),r(G,{className:"wpglobus-switcher-panel__body"},(e=[{name:"switcher",title:"Languages",className:"wpglobus-panel-tab wpglobus-panel-tab-selector edit-post-sidebar__panel-tab"}],WPGlobusGutenberg.isEnabledTab("options")&&e.push({name:"options",title:"Options",className:"wpglobus-panel-tab wpglobus-panel-tab-options edit-post-sidebar__panel-tab"}),r(c,{name:"WPGlobusSwitcherTabPanel",className:"wpglobus-tab-panel",activeClass:"is-active",tabs:e},B)))));var e}})}function S(e){W=e=e||"flagLanguage"}function L(e){void 0===e&&(e=!0);var t,n=document.querySelectorAll(".wpglobus-switcher-components-radio-control .components-radio-control__input");0!=n.length&&(e?(n.forEach(function(e){e.classList.add(e.value),e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.add("wpglobus-switcher-pulsate-radio-off")}),(t=document.querySelector(".wpglobus-switcher-components-radio-control ."+_)).classList.remove("wpglobus-switcher-pulsate-radio-off"),t.classList.add("wpglobus-switcher-pulsate-radio")):n.forEach(function(e){e.classList.remove("wpglobus-switcher-pulsate-radio"),e.classList.remove("wpglobus-switcher-pulsate-radio-off"),e.classList.add("wpglobus-switcher-pulsate-radio-on")}))}function N(e,t){void 0===e||C.noticeOn||(C.noticeOn=!0,e.innerText=t,e.classList.remove("hidden"),setTimeout(function(){e.classList.add("hidden"),C.noticeOn=!1},3e3))}function O(e,t){t=t||"",y==(e=e||"")&&(L(!0),function(e,t){if(""==(e=e||""))return;var n={sender:"WPGlobusGutenberg",_action:"saveOption",is_admin:1};return n.counter=C.counter++,n.options={},n.options[e]=t,wp.ajax.post(WPGlobusGutenberg.wpglobusAjax,{data:n})}(e,t).then(function(e){"success"==e.result&&(S(t),T(WPGlobusGutenberg.options[y]=t))}).fail(function(e){var t=document.getElementsByClassName("wpglobus-switcher-error-message");void 0!==t[0]&&("error"==e.result?N(t[0],e.message):400==e.status&&N(t[0],"Error: "+e.status+" ("+e.statusText+")"),_=W);var n=document.getElementsByClassName("wpglobus-panel-tab-options");void 0!==n[0]&&-1!=n[0].classList.value.indexOf("is-active")&&n[0].click()}).always(function(){L(!1)}))}function k(e){return void 0===v[e]&&(e=W),v[e]}function T(n){void 0!==n&&void 0!==v[n]||(n=W),setTimeout(function(){var e,t=document.querySelector('[aria-label="'+a+'"]');null!=t&&(void 0===t.dataset.status?(e=t.innerHTML,t.innerHTML=e+k(n),t.dataset.status="init"):(t.innerHTML=k(n),t.dataset.status="changed"))},300)}function B(e){return"switcher"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-selector-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select language")),r("div",{className:"wpglobus-switcher-panel__switcher-box"},WPGlobusGutenberg.pagenow==WPGlobusGutenberg.postNewPage?r("div",{style:{marginBottom:"20px"},className:"wpglobus-switcher-panel__switcher-notice"},WPGlobusGutenberg.i18n.save_post):r("ul",{className:"language-list"},n.map(function(e){return r("li",{key:e,className:"language-item"},r("img",{style:{marginRight:"7px",width:"20px"},className:"wpglobus-switcher-panel__flag",height:"20",width:"20",src:s[e]}),r(w,{href:u[e],isSmall:!0,isPrimary:!0},o[e]))}))),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__info",href:WPGlobusGutenberg.store_link,isLink:!0,target:"_blank"},i("WPGlobus Premium")),r(w,{className:"wpglobus-switcher-panel__button-link wpglobus-switcher-panel__settings-link",href:WPGlobusGutenberg.options_page_url,isLink:!0},i("WPGlobus Options"))):"options"==e.name?r("div",{className:"wpglobus-tab-content wpglobus-options-tab-content"},r(d,{className:"wpglobus-switcher-panel__notice",status:"informational",isDismissible:!1},i("Select type")),r(x,null)):void 0}}};WPGlobusGutenberg=E.extend({},WPGlobusGutenberg,C),WPGlobusGutenberg.init()});
|
includes/class-wpglobus-post-types.php
CHANGED
@@ -44,6 +44,9 @@ class WPGlobus_Post_Types {
|
|
44 |
// Gutenberg: @since 2.2.20
|
45 |
'wp_template',
|
46 |
'wp_area',
|
|
|
|
|
|
|
47 |
// WPBakery PB: @since 1.9.17
|
48 |
'vc4_templates',
|
49 |
'vc_grid_item',
|
44 |
// Gutenberg: @since 2.2.20
|
45 |
'wp_template',
|
46 |
'wp_area',
|
47 |
+
// Gutenberg: @since 2.5.14
|
48 |
+
'wp_template_part',
|
49 |
+
'wp_global_styles',
|
50 |
// WPBakery PB: @since 1.9.17
|
51 |
'vc4_templates',
|
52 |
'vc_grid_item',
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2020 WPGlobus 2.5.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.5.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.5.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
1 |
+
# Copyright (C) 2020 WPGlobus 2.5.14
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.5.14 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.5.14\n"
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
@@ -217,6 +217,11 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
217 |
|
218 |
== Changelog ==
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
= 2.5.13 =
|
221 |
|
222 |
* (Core/Post Types) Added post types of the `Schema & Structured Data for WP & AMP` plugin to the hidden types array.
|
@@ -227,11 +232,6 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
227 |
|
228 |
* (Core/Options) Minor code tweaks.
|
229 |
|
230 |
-
= 2.5.11 =
|
231 |
-
|
232 |
-
* (Core/Post Types) Added post types of the `FooGallery`, `Modula Image Gallery`, and `Kali Forms` plugins to the hidden types array.
|
233 |
-
* (Vendor/Yoast) Filtering the `rel` `prev` and `next` URLs generated by `Yoast SEO`.
|
234 |
-
|
235 |
= Earlier versions and Add-ons =
|
236 |
|
237 |
* [See the complete changelog here](https://github.com/WPGlobus/WPGlobus/blob/master/CHANGELOG.md)
|
217 |
|
218 |
== Changelog ==
|
219 |
|
220 |
+
= 2.5.14 =
|
221 |
+
|
222 |
+
* (Builders/Gutenberg) Language switcher CSS tweaks to prevent showing oversize flag images in some themes.
|
223 |
+
* (Core/Post Types) Added post types of the `Gutenberg` plugin to the hidden types array.
|
224 |
+
|
225 |
= 2.5.13 =
|
226 |
|
227 |
* (Core/Post Types) Added post types of the `Schema & Structured Data for WP & AMP` plugin to the hidden types array.
|
232 |
|
233 |
* (Core/Options) Minor code tweaks.
|
234 |
|
|
|
|
|
|
|
|
|
|
|
235 |
= Earlier versions and Add-ons =
|
236 |
|
237 |
* [See the complete changelog here](https://github.com/WPGlobus/WPGlobus/blob/master/CHANGELOG.md)
|
wpglobus.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
|
16 |
* Text Domain: wpglobus
|
17 |
* Domain Path: /languages/
|
18 |
-
* Version: 2.5.
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
42 |
exit;
|
43 |
}
|
44 |
|
45 |
-
define( 'WPGLOBUS_VERSION', '2.5.
|
46 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
47 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
48 |
|
15 |
* Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
|
16 |
* Text Domain: wpglobus
|
17 |
* Domain Path: /languages/
|
18 |
+
* Version: 2.5.14
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
42 |
exit;
|
43 |
}
|
44 |
|
45 |
+
define( 'WPGLOBUS_VERSION', '2.5.14' );
|
46 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
47 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
48 |
|