Version Description
- Added: (Core/Post Types) post types of
Elementor Pro
to the hidden types array. - Added: (Core/WPGlobusDialogApp)
afterOpen
callback.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3.0 to 2.3.1
- data/wpglobus-product-info.json +1 -1
- includes/class-wpglobus-post-types.php +3 -0
- includes/js/wpglobus-admin-51.js +7 -0
- includes/js/wpglobus-admin-51.min.js +1 -1
- languages/wpglobus.pot +3 -3
- readme.txt +5 -0
- wpglobus.php +2 -2
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":"4.9.8"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.0.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.2"},"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.0.0","_api_tested_up_to":"5.3"},"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.3","_api_tested_up_to":"5.3"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"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":"4.9.8"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.0.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.0.0","_api_tested_up_to":"5.2"},"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.0.0","_api_tested_up_to":"5.3"},"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.3","_api_tested_up_to":"5.3.2"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.3.1","_api_tested_up_to":"5.3.2"}}
|
includes/class-wpglobus-post-types.php
CHANGED
@@ -63,6 +63,9 @@ class WPGlobus_Post_Types {
|
|
63 |
'_pods_template',
|
64 |
'_pods_pod',
|
65 |
'_pods_field',
|
|
|
|
|
|
|
66 |
);
|
67 |
|
68 |
/**
|
63 |
'_pods_template',
|
64 |
'_pods_pod',
|
65 |
'_pods_field',
|
66 |
+
// Elementor Pro: @since 2.3.1
|
67 |
+
'elementor_font',
|
68 |
+
'elementor_icons',
|
69 |
);
|
70 |
|
71 |
/**
|
includes/js/wpglobus-admin-51.js
CHANGED
@@ -151,6 +151,7 @@ var WPGlobusDialogApp;
|
|
151 |
placeholder: '',
|
152 |
formFooter: '',
|
153 |
beforeOpen: function(){},
|
|
|
154 |
afterSave: function(){},
|
155 |
close: function(){},
|
156 |
},
|
@@ -583,6 +584,12 @@ var WPGlobusDialogApp;
|
|
583 |
api.runCallback( api.option.dialog.beforeOpen );
|
584 |
|
585 |
api.dialog.dialog('open');
|
|
|
|
|
|
|
|
|
|
|
|
|
586 |
},
|
587 |
runCallback: function(callback) {
|
588 |
|
151 |
placeholder: '',
|
152 |
formFooter: '',
|
153 |
beforeOpen: function(){},
|
154 |
+
afterOpen: function(){},
|
155 |
afterSave: function(){},
|
156 |
close: function(){},
|
157 |
},
|
584 |
api.runCallback( api.option.dialog.beforeOpen );
|
585 |
|
586 |
api.dialog.dialog('open');
|
587 |
+
|
588 |
+
/**
|
589 |
+
* After open callback.
|
590 |
+
* @since 2.3.1
|
591 |
+
*/
|
592 |
+
api.runCallback( api.option.dialog.afterOpen );
|
593 |
},
|
594 |
runCallback: function(callback) {
|
595 |
|
includes/js/wpglobus-admin-51.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var WPGlobusCore,WPGlobusDialogApp;!function(i){var d;d=WPGlobusCore={strpos:function(t,a,e){var o=(t=""+t).indexOf(a,e);return 0<=o&&o},TextFilter:function(t,a,e){if(void 0===t||""===t)return t;var o,n,i=[],l=!1;a=""==a?"en":a,e=void 0===e||""==e?"RETURN_IN_DEFAULT_LANGUAGE":e,i[0]=[],i[0].start=WPGlobusCoreData.locale_tag_start.replace("%s",a),i[0].end=WPGlobusCoreData.locale_tag_end,i[1]=[],i[1].start="\x3c!--:"+a+"--\x3e",i[1].end="\x3c!--:--\x3e",i[2]=[],i[2].start="[:"+a+"]",i[2].end="[:";for(var s=0;s<3;s++)if(!1!==(o=d.strpos(t,i[s].start))){o+=i[s].start.length,t=!1===(n=d.strpos(t,i[s].end,o))?t.substr(o):t.substr(o,n-o),l=!0;break}return l||("RETURN_EMPTY"==e?a==WPGlobusCoreData.default_language&&!/(\{:|\[:|<!--:)[a-z]{2}/.test(t)||(t=""):a==WPGlobusCoreData.default_language?/(\{:|\[:|<!--:)[a-z]{2}/.test(t)&&(t=""):t=d.TextFilter(t,WPGlobusCoreData.default_language)),t},addLocaleMarks:function(t,a){return WPGlobusCoreData.locale_tag_start.replace("%s",a)+t+WPGlobusCoreData.locale_tag_end},getTranslations:function(e){var o,n={};return i.each(WPGlobusCoreData.enabled_languages,function(t,a){o=a==WPGlobusCoreData.default_language?"RETURN_IN_DEFAULT_LANGUAGE":"RETURN_EMPTY",n[a]=d.TextFilter(e,a,o)}),n},getString:function(t,a,e){if(void 0===t)return t;void 0===a&&(a=""),void 0===e&&(e=WPGlobusCoreData.language),(t=d.getTranslations(t))[e]=a;var o="";return i.each(t,function(t,a){""!=a&&t!=WPGlobusCoreData.default_language&&(o+=d.addLocaleMarks(a,t))}),""!=t[WPGlobusCoreData.default_language]&&(o=""==o?t[WPGlobusCoreData.default_language]:d.addLocaleMarks(t[WPGlobusCoreData.default_language],WPGlobusCoreData.default_language)+o),o}}}(jQuery),function(m){var f;f=WPGlobusDialogApp={option:{listenClass:".wpglobus_dialog_start",settingsClass:".wpglobus_dialog_settings",dialogTabs:"#wpglobus-dialog-tabs",dialogTitle:"",customData:null,callback:function(){},dialogOptions:{title:"",placeholder:"",formFooter:"",beforeOpen:function(){},afterSave:function(){},close:function(){}},dialog:{}},form:void 0,element:void 0,element_by:"id",id:"",clone_id:"",wpglobus_id:"",type:"textarea",source:"",order:{},value:{},request:"core",attrs:{},dialogTitle:"",trClass:"wpglobus-translatable",startButton:['<span id="wpglobus-dialog-start-{{clone_id}}" ','style="{{style}}" ','data-type="control" data-dialog-title="{{title}}" ','data-source-type="" data-source-id="{{id}}" data-source-name="{{name}}" ','data-nodename="{{nodename}}"',"{{sbTitle}} ",'class="{{classes}}"></span>'].join(""),startButtonClass:"wpglobus_dialog_start wpglobus_dialog_icon",clicks:0,init:function(t){f.option.dialog=f.option.dialogOptions,f.option=m.extend(f.option,t),m(f.option.dialogTabs).tabs(),f.dialogTitle=f.option.dialogTitle,this.attachListener(),null!=f.option.customData&&void 0!==f.option.customData.addElements&&m.each(f.option.customData.addElements,function(t,a){f.addElement(a)})},convertToId:function(t){return t=(t=t.replace(/\]/g,"")).replace(/\[/g,"-")},addElement:function(t){var a={id:null,style:"",styleTextareaWrapper:"",sbTitle:"",onChangeClass:"",dialogTitle:"",dialog:f.option.dialogOptions};if("string"==typeof t)a.id=t;else{if("object"!=typeof t)return;a=m.extend(a,t)}var e,o,n,i=null,l=null,s=null,d=null,u=f.startButton,r="";if(f.element_by="name",0==(d=document.getElementsByName(a.id)).length&&(f.element_by="id",d=document.getElementById(a.id)),null!==d){if(l=a.id,s=void 0===(i="id"==f.element_by?m("#"+l):(r=(r=d[0].nodeName).toLowerCase(),m(r+'[name="'+l+'"]'))).attr("name")||""==i.attr("name")?l:i.attr("name"),f.clone_id=f.convertToId(l),-1!=s.indexOf("wpglobus")||-1!=f.clone_id.indexOf("wpglobus"))return!1;if(0<m("#wpglobus-"+f.clone_id).length)return!1;if(0<m(r+'[name="wpglobus-'+s+'"]').length)return!1;e=m(i.clone()),n=i.attr("style")||"",i.attr("style","display:none;"),e.attr("id","wpglobus-"+f.clone_id).attr("name","wpglobus-"+s),e.addClass(f.trClass),""!=a.onChangeClass&&e.addClass(a.onChangeClass),"id"==f.element_by?e.attr("data-source-id",l).attr("data-source-name","").attr("data-source-get-by",f.element_by):e.attr("data-source-id","").attr("data-source-name",s).attr("data-source-get-by",f.element_by),"textarea"==r?(o=WPGlobusCore.getTranslations(i.val())[WPGlobusCoreData.language],e.val(o),e.attr("data-nodename","textarea"),""==a.style?e.attr("style",n+";width:95%;float:left;"):e.attr("style",n+";"+a.style)):(o=WPGlobusCore.getTranslations(i.val())[WPGlobusCoreData.language],e.attr("value",o),e.attr("data-nodename","input"),""!=a.style&&e.attr("style",n+";"+a.style)),""!=a.dialog&&e.attr("data-dialog",JSON.stringify(a.dialog)),u=u.replace(/{{clone_id}}/g,f.clone_id),u="id"==f.element_by?(u=(u=u.replace(/{{id}}/g,f.clone_id)).replace(/{{name}}/g,"")).replace(/{{nodename}}/g,""):(u=(u=u.replace(/{{id}}/g,"")).replace(/{{name}}/g,s)).replace(/{{nodename}}/g,r),u="textarea"==r?u.replace("{{style}}","float:left;margin-top:0;"):u.replace("{{style}}","");var c="textarea"==r?f.startButtonClass+" wpglobus-textarea wpglobus-textarea-"+f.clone_id:f.startButtonClass;u=u.replace("{{classes}}",c),u=""==a.dialogTitle?u.replace("{{title}}",f.dialogTitle):u.replace("{{title}}",a.dialogTitle),u=""==a.sbTitle?u.replace("{{sbTitle}}",a.sbTitle):u.replace("{{sbTitle}}",'title="'+a.sbTitle+'"'),m(u).insertAfter(i),m(e).insertAfter(i),"textarea"==r&&(m("#wpglobus-"+f.clone_id).addClass("wpglobus-textarea-"+f.clone_id),m(".wpglobus-textarea-"+f.clone_id).wrapAll('<div class="wpglobus-textarea-wrapper" style="'+a.styleTextareaWrapper+'"></div>'));var g,p=!1;if(""==a.onChangeClass)g="#wpglobus-"+f.clone_id;else{g="."+a.onChangeClass;var b=m._data(m(document)[0],"events");void 0===b?p=!0:void 0!==b.change&&m.each(b.change,function(t,a){if(a.selector==g)return!(p=!0)})}return p?!0:(m(document).on("change",g,function(){var t=m(this),a=t.data("source-id");a=""==a?t.data("nodename")+'[name="'+t.data("source-name")+'"]':"#"+a,m(a).val(WPGlobusCore.getString(m(a).val(),t.val()))}),!0)}},saveDialog:function(){var e,o,n,i="",l="",s="";m(".wpglobus_dialog_textarea").each(function(t,a){e=m(a),o=e.val(),(n=e.data("language"))==WPGlobusAdmin.data.language&&(s=o),""!=o&&(i+=WPGlobusCore.addLocaleMarks(o,n),n==WPGlobusCoreData.default_language&&(l=o))}),i=i.length==l.length+8?l:i,m(f.id).val(i),i=""==s?l:s,m(f.wpglobus_id).val(i),f.runCallback(f.option.dialog.afterSave)},dialog:m("#wpglobus-dialog-wrapper").dialog({autoOpen:!1,width:650,modal:!0,dialogClass:"wpglobus-dialog",buttons:[{text:"Save",class:"wpglobus-button-save",click:function(){f.saveDialog(),f.dialog.dialog("close")}},{text:"Cancel",class:"wpglobus-button-cancel",click:function(){f.dialog.dialog("close")}}],open:function(t,a){var e=f.dialogTitle;void 0!==f.attrs.maxlength&&(m(".wpglobus_dialog_textarea").attr("maxlength",f.attrs.maxlength),e+=" | maxlength="+f.attrs.maxlength),m(".wpglobus-dialog .ui-dialog-title").text(e),m(this).removeClass("hidden")},close:function(){m(this).addClass("hidden"),f.runCallback(f.option.dialog.close),f.form[0].reset()}}),attachListener:function(){m(document).on("click",f.option.settingsClass,function(){m(".wpglobus_dialog_options_wrapper").hasClass("hidden")?m(".wpglobus_dialog_options_wrapper").removeClass("hidden"):m(".wpglobus_dialog_options_wrapper").addClass("hidden")}),m(document).on("click",".wpglobus_dialog_option",function(t){var a=m(this),e=a.data("object");f.order.action="save_post_meta_settings",f.order.post_type=WPGlobusAdmin.data.post_type,f.order.checked=a.prop("checked"),f.order.id=a.attr("id"),f.order.meta_key=a.data("meta-key"),f.ajax(f.order).done(function(t){"ok"==t.result&&("true"==t.checked?m(e).removeClass("wpglobus_dialog_start_hidden"):m(e).addClass("wpglobus_dialog_start_hidden"))}).fail(function(t){}).always(function(t,a){})}),m(document).on("click",f.option.listenClass,function(a){f.element=m(this),f.id=f.element.data("source-id"),""==f.id?(f.id=f.element.data("nodename")+'[name="'+f.element.data("source-name")+'"]',f.wpglobus_id="#wpglobus-"+f.convertToId(f.element.data("source-name"))):(f.wpglobus_id="#wpglobus-"+f.id,f.id="#"+f.id),f.clicks++,1==f.clicks&&setTimeout(function(){if(1==f.clicks)f.onClick(a);else{var t=m(f.id);t.hasClass("hidden")?t.removeClass("hidden").attr("style","display:block;"):t.addClass("hidden").attr("style","display:none;")}f.clicks=0},200)}),f.form=f.dialog.find("form#wpglobus-dialog-form").on("submit",function(t){t.preventDefault(),f.saveDialog()})},ajax:function(t){return m.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json",async:!1})},onClick:function(t){void 0===f.element.data("dialog-title")||""==f.element.data("dialog-title")?f.dialogTitle=f.option.dialogTitle:f.dialogTitle=f.element.data("dialog-title"),void 0!==f.id&&(f.attrs.maxlength=m(f.id).attr("maxlength")),f.source=f.element.data("source-value"),void 0===f.source&&(f.source=m(f.id).val(),"ajax"==f.request||(f.value=WPGlobusCore.getTranslations(f.source))),f.option.dialog=m.extend({},f.option.dialogOptions,m(f.wpglobus_id).data("dialog")),""!=f.option.dialog.title&&(f.dialogTitle=f.option.dialog.title),m.each(f.value,function(t,a){var e=m("#wpglobus-dialog-"+t);e.val(a),e.attr("placeholder",WPGlobusCore.TextFilter(f.option.dialog.placeholder,t,"RETURN_IN_DEFAULT_LANGUAGE"))}),m("#wpglobus-dialog-form-footer").html(f.option.dialog.formFooter),f.runCallback(f.option.dialog.beforeOpen),f.dialog.dialog("open")},runCallback:function(t){if("object"==typeof t){var a=Object.keys(t)[0],e=t[Object.keys(t)[0]];"window"===a?"function"==typeof window[e]&&window[e](t[Object.keys(t)[1]]):"function"==typeof window[a][e]&&window[a][e](t[Object.keys(t)[1]])}else"string"==typeof t?"function"==typeof window[t]&&window[t]():"function"==typeof t&&t()}}}(jQuery),jQuery(document).ready(function(){"use strict";var t,c;window.WPGlobusAdminApp=(t=window.WPGlobusAdminApp||{},c=jQuery,t.App=function(t){void 0===window.WPGlobusAdminApp&&(this.config={debug:!1,version:WPGlobusAdmin.version},this.status="ok","undefined"==typeof WPGlobusAdmin?(this.status="error",this.config.debug&&console.log("WPGlobus: error options loading")):this.config.debug&&console.dir(WPGlobusAdmin),this.config.disable_first_language=['<div id="disable_first_language" style="display:block;" class="redux-field-errors notice-red">',"<strong>","<span> </span>",WPGlobusAdmin.i18n.cannot_disable_language,"</strong>","</div>"].join(""),c.extend(this.config,t),"ok"===this.status&&this.init())},t.App.prototype={$document:c(document),init:function(){WPGlobusCoreData.multisite=this.parseBool(WPGlobusCoreData.multisite),this.adminInit(),c("#content").addClass("wpglobus-editor").attr("data-language",WPGlobusAdmin.data.default_language),c("textarea[id^=content_]").each(function(t,a){var e=c(a).attr("id").replace("content_","");c(a).attr("data-language",e)}),"post.php"===WPGlobusAdmin.page?(this.postEdit(),this.set_dialog(),"undefined"!=typeof WPGlobusAioseop&&WPGlobusAioseop.init()):"menu-edit"===WPGlobusAdmin.page?(WPGlobusDialogApp.init({dialogTitle:"Edit description"}),this.navMenus()):"taxonomy-edit"===WPGlobusAdmin.page?WPGlobusAdmin.data.tag_id&&this.taxonomyEdit():"taxonomy-quick-edit"===WPGlobusAdmin.page?this.quickEdit("taxonomy"):"edit.php"===WPGlobusAdmin.page?(this.quickEdit("post"),0<_.size(WPGlobusAdmin.$_get)&&WPGlobusDialogApp.init()):"options-general.php"==WPGlobusAdmin.page?(this.optionsGeneral(),WPGlobusDialogApp.init({customData:WPGlobusCoreData.page_custom_data})):"widgets.php"==WPGlobusAdmin.page?(WPGlobusWidgets.init(),WPGlobusDialogApp.init({dialogTitle:"Edit text"})):"wpglobus_options"==WPGlobusAdmin.page?this.start():"wpglobusAdminCentral"==WPGlobusAdmin.page?this.adminCentral():WPGlobusDialogApp.init({customData:WPGlobusCoreData.page_custom_data})},parseBool:function(t){return!/^(false|0)$/i.test(t)&&!!t},getCurrentTab:function(){return c(".wpglobus-post-body-tabs-list .ui-tabs-active").data("language")},adminInit:function(){var t=c(".wpglobus-addons-group a").data("key");if(void 0!==t)if(0<=window.location.search.indexOf("page=wpglobus_options&tab="+t))WPGlobusCoreData.multisite?window.location=WPGlobusCoreData.pluginInstallLocation.multisite:window.location=WPGlobusCoreData.pluginInstallLocation.single;else{var a=c("#toplevel_page_wpglobus_options li").eq(t+1);WPGlobusCoreData.multisite?c(a).find("a").attr("href",WPGlobusCoreData.pluginInstallLocation.multisite).attr("onclick","window.location=jQuery(this).attr('href');return false;"):c(a).find("a").attr("href",WPGlobusCoreData.pluginInstallLocation.single).attr("onclick","window.location=jQuery(this).attr('href');return false;")}},optionsGeneral:function(){var o=c("#blogname"),t=c("body");o.addClass("hidden"),c("#wpglobus-blogname").insertAfter(o).removeClass("hidden"),t.on("blur",".wpglobus-blogname",function(){c(".wpglobus-blogname").each(function(t,a){var e=c(a);o.val(WPGlobusCore.getString(o.val(),e.val(),e.data("language")))})});var n=c("#blogdescription");n.addClass("hidden"),c("#wpglobus-blogdescription").insertAfter(n).removeClass("hidden"),t.on("blur",".wpglobus-blogdesc",function(){c(".wpglobus-blogdesc").each(function(t,a){var e=c(a);n.val(WPGlobusCore.getString(n.val(),e.val(),e.data("language")))})})},quickEdit:function(n){if(void 0!==WPGlobusAdmin.data.has_items&&WPGlobusAdmin.data.has_items){var o="",l=0;c(document).ajaxComplete(function(t,a,e){void 0!==e.data&&""!=o&&0<=e.data.indexOf("action=inline-save-tax&")&&(c("#"+o+" a.row-title").text(WPGlobusAdmin.qedit_titles[l][WPGlobusAdmin.data.language].name),c("#"+o+" .description").text(WPGlobusAdmin.qedit_titles[l][WPGlobusAdmin.data.language].description))});var i={};c("#the-list tr").each(function(t,a){var e=c(a),o="post"===n?"post-":"tag-";l=e.attr("id").replace(o,""),i[l]={},"post"===n?i[l].source=e.find(".post_title").text():"taxonomy"===n&&(i[l].source=c("#inline_"+l+" .name").text())});var t={action:"get_titles"};t.type=n,t.taxonomy=void 0!==WPGlobusAdmin.data.taxonomy&&WPGlobusAdmin.data.taxonomy,t.title=i,c.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json"}).done(function(t){WPGlobusAdmin.qedit_titles=t.qedit_titles,c.each(t.bulkedit_post_titles,function(t,a){c("#inline_"+t+" .post_title").text(a[WPGlobusAdmin.data.language].name)})}).fail(function(t){}).always(function(t,a){}),c("body").on("change",".wpglobus-quick-edit-title",function(){var n="",i=[];c(".wpglobus-quick-edit-title").each(function(t,a){var e=c(a),o=e.data("language");""!==e.val()&&(n=WPGlobusCore.getString(n,e.val(),o)),WPGlobusAdmin.qedit_titles[l][o].name=e.val(),i[t]=o});var t=c(document).triggerHandler("wpglobus_get_translations",{string:n,lang:i,id:l});void 0!==t&&(n=t),c("input.ptitle").eq(0).attr("value",n),WPGlobusAdmin.qedit_titles[l].source=n}),void 0!==WPGlobusAdmin.data.tags&&c.each(WPGlobusAdmin.data.tags,function(t,a){WPGlobusAdmin.data.value[a].post_id={}}),c("button.save, input#bulk_edit").on("mouseenter",function(t){void 0!==WPGlobusAdmin.data.tags&&("bulk_edit"==t.currentTarget.id?c("input#bulk_edit").unbind("click"):c("button.save").unbind("click"),c("button.save, input#bulk_edit").on("click",function(a){var t=c.when(),e=(c(this),c.Deferred());e.resolve(function(t){t.next(".spinner").css({visibility:"visible"}),"bulk_edit"!=a.currentTarget.id&&c.ajaxSetup({async:!1});var o,n,i,l=t.parents("tr"),s=l.attr("id").replace("edit-","");c.each(WPGlobusAdmin.data.tags,function(t,a){if(0==(o=l.find("textarea[name='"+WPGlobusAdmin.data.names[a]+"']")).length)return!0;WPGlobusAdmin.data.value[a].post_id[s]=o.val(),n=WPGlobusAdmin.data.value[a].post_id[s].split(","),i=[];for(var e=0;e<n.length;e++)n[e]=n[e].trim(" "),""!=n[e]&&(void 0===WPGlobusAdmin.data.tag[a][n[e]]?i[e]=n[e]:i[e]=WPGlobusAdmin.data.tag[a][n[e]]);o.val(i.join(", "))})}(c(this))),t=t.then(function(){return c.when(e.done())}).then(function(){"bulk_edit"!=a.currentTarget.id&&setTimeout(function(){inlineEditPost.save(l),c.ajaxSetup({async:!0})},50)})}))}),c("#the-list").on("click",".editinline",function(){var t=c(this);if(o=t.parents("tr").attr("id"),"post"===n)l=o.replace("post-","");else{if("taxonomy"!==n)return;l=o.replace("tag-","")}"post"===n&&void 0!==WPGlobusAdmin.data.tags&&c.each(WPGlobusAdmin.data.tags,function(t,a){if(""!=WPGlobusAdmin.data.value[a]){var e,o=c("#edit-"+l+' textarea[name="'+WPGlobusAdmin.data.names[a]+'"]').val();void 0!==o&&(e=o.split(","),c.each(e,function(t,a){o=o.replace(a,WPGlobusCore.TextFilter(a,WPGlobusCoreData.language))}),c("#edit-"+l+' textarea[name="'+WPGlobusAdmin.data.names[a]+'"]').val(o))}});var a=c("#edit-"+l+" input.ptitle").eq(0),e=a.parents("label");a.val(WPGlobusAdmin.qedit_titles[l].source),a.addClass("hidden"),c(WPGlobusAdmin.data.template).insertAfter(e),void 0===WPGlobusAdmin.qedit_titles[l]&&(WPGlobusAdmin.qedit_titles[l]={},WPGlobusAdmin.qedit_titles[l].source=c("#"+o+" .name a.row-title").text(),c(WPGlobusAdmin.data.enabled_languages).each(function(t,a){WPGlobusAdmin.qedit_titles[l][a]={},a==WPGlobusAdmin.data.default_language?WPGlobusAdmin.qedit_titles[l][a].name=WPGlobusAdmin.qedit_titles[l].source:WPGlobusAdmin.qedit_titles[l][a].name="",WPGlobusAdmin.qedit_titles[l][a].description=""})),c(".wpglobus-quick-edit-title").each(function(t,a){var e=c(a),o=e.data("language");e.attr("id",o+l),void 0!==WPGlobusAdmin.qedit_titles[l][o]&&(WPGlobusAdmin.qedit_titles[l][o].name=WPGlobusAdmin.qedit_titles[l][o].name.replace(/\\\'/g,"'"),WPGlobusAdmin.qedit_titles[l][o].name=WPGlobusAdmin.qedit_titles[l][o].name.replace(/\\\"/g,'"'),e.attr("value",WPGlobusAdmin.qedit_titles[l][o].name),WPGlobusAdmin.qedit_titles[l].source=WPGlobusCore.getString(WPGlobusAdmin.qedit_titles[l].source,WPGlobusAdmin.qedit_titles[l][o].name,o))}),c("input.ptitle").eq(0).attr("value",WPGlobusAdmin.qedit_titles[l].source)})}},taxonomyEdit:function(){var a=[];a[0]="name",a[1]="description",c.each(WPGlobusCoreData.enabled_languages,function(t,u){c.each(a,function(t,a){var e,o,n,i,l,s,d;o=u,i=c("#"+(e=a)),l=i.clone(),s=i.attr("name"),d="wpglobus-element wpglobus-element_"+e+" wpglobus-element_"+o+" wpglobus-translatable",n=(n=document.getElementById(e)).nodeName,c(l).attr("id",e+"_"+o),c(l).attr("name",s+"_"+o),o!==WPGlobusCoreData.default_language&&(d+=" hidden"),c(l).attr("class",d),c(l).attr("data-save-to",e),c(l).attr("data-language",o),"INPUT"==n?c(l).attr("value",c("#wpglobus-link-tab-"+o).data(e)):"TEXTAREA"==n&&c(l).text(c("#wpglobus-link-tab-"+o).data(e)),i.addClass("hidden"),0==c(".wpglobus-element_"+e).length?c(l).insertAfter(i):c(l).insertAfter(c(".wpglobus-element_"+e).last())})}),c(".wpglobus-taxonomy-tabs").insertAfter("#ajax-response"),c(".wrap").tabs(),c("body").on("click",".wpglobus-taxonomy-tabs li",function(t){var a=c(this).data("language");c(".wpglobus-element").addClass("hidden"),c(".wpglobus-element_"+a).removeClass("hidden")}),c(".wpglobus-element").on("change",function(){var n=c(this).data("save-to"),i="";c(".wpglobus-element").each(function(t,a){var e=c(a),o=e.val();e.data("save-to")==n&&""!==o&&(i+=WPGlobusCore.addLocaleMarks(o,e.data("language")))}),c("#"+n).val(i)}),c(WPGlobusAdmin.data.multilingualSlug.title).insertAfter(".term-slug-wrap th label")},navMenus:function(){function e(){n!==c(i).length&&(clearInterval(o),c(i).each(function(t,a){var e=c(a);if(!e.hasClass("wpglobus-menu-item")){var l=c(a).attr("id");c.each(["input.edit-menu-item-title","input.edit-menu-item-attr-title"],function(t,a){var e=c("#"+l+" "+a),o=c(e);if(!o.hasClass("wpglobus-hidden")){o.addClass("wpglobus-hidden"),o.css("display","none");var n=o.parent("label"),i=o.parents("p");c(i).css("height","80px"),c(n).append('<div style="color:#f00;">'+WPGlobusAdmin.i18n.save_nav_menu+"</div>")}}),e.addClass("wpglobus-menu-item")}}))}var o,n,i="#menu-to-edit .menu-item";c.ajaxSetup({beforeSend:function(t,a){void 0!==a.data&&0<=a.data.indexOf("action=add-menu-item")&&(n=c(i).length,o=setInterval(e,500))}}),c(i).each(function(t,a){var e=c(a).attr("id"),u=e.replace("menu-item-","");c.each(["input.edit-menu-item-title","input.edit-menu-item-attr-title"],function(n,i){var l=c("#"+e+" "+i);l.val()!=WPGlobusAdmin.data.items[u][i].source&&l.val(WPGlobusAdmin.data.items[u][i].source);var s=c("#"+e+" "+i).parents("p"),d=0;c.each(WPGlobusAdmin.data.open_languages,function(t,a){var e=l.clone();e.attr("id",l.attr("id")+"-"+a),e.attr("name",l.attr("id")+"-"+a),e.attr("data-language",a),e.attr("data-item-id",u),e.attr("placeholder",WPGlobusAdmin.data.en_language_name[a]);var o=WPGlobusAdmin.data.items[u][a][i].class;0===n&&a===WPGlobusAdmin.data.default_language?e.attr("class",o+" edit-menu-item-title"):e.attr("class",o),""!=WPGlobusAdmin.data.items[u][a][i].caption?e.attr("value",WPGlobusAdmin.data.items[u][a][i].caption):e.attr("value",""),e.css("margin-bottom","0.6em"),c(s).append(e),d=t}),d=40*(d+1),l.css("display","none").attr("class","").addClass("widefat wpglobus-hidden"),c(s).css("height",d+"px").addClass("wpglobus-menu-item-box")}),c(a).addClass("wpglobus-menu-item")}),c(".menus-move-left, .menus-move-right").each(function(t,a){var e,o=c(a),n=(o.parents("li").attr("id").replace("menu-item-",""),o.attr("title"));void 0!==n&&c.each(WPGlobusAdmin.data.post_titles,function(t,a){0<=n.indexOf(t)&&(e=n.replace(t,a),o.attr("title",e),o.text(e))})}),c(".edit-menu-item-title").trigger("change"),wpNavMenu.refreshAdvancedAccessibility(),wpNavMenu.menusChanged=!1,c(".wpglobus-menu-item").on("change",function(){var t,a,e=c(this),o=e.data("item-id");e.hasClass("wpglobus-item-title")&&(t=WPGlobusCore.getString(c("input#edit-menu-item-title-"+o).val(),e.val(),e.data("language")),void 0!==(a=c(document).triggerHandler("wpglobus_get_menu_translations",{string:t,lang:WPGlobusCoreData.open_languages,id:o,type:"input.edit-menu-item-title"}))&&(t=a),c("input#edit-menu-item-title-"+o).val(t)),e.hasClass("wpglobus-item-attr")&&(t=WPGlobusCore.getString(c("input#edit-menu-item-attr-title-"+o).val(),e.val(),e.data("language")),void 0!==(a=c(document).triggerHandler("wpglobus_get_menu_translations",{string:t,lang:WPGlobusCoreData.open_languages,id:o,type:"input.edit-menu-item-attr-title"}))&&(t=a),c("input#edit-menu-item-attr-title-"+o).val(t))});var a=[];setTimeout(function(){c(".edit-menu-item-description").each(function(){var t=c(this).attr("id");a.push(t),WPGlobusDialogApp.addElement(t)}),c(".wpglobus_dialog_start").each(function(){c(this).css({"font-style":"normal"}),c(this).after("<br />")});var t={action:"getNavMenuItemsDescription"};t.menuItems=a,c.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json"}).done(function(t){"object"==typeof t&&c.each(t,function(t,a){""!=a&&(c("#"+t).val(a),c("#wpglobus-"+t).val(WPGlobusCore.TextFilter(a,WPGlobus.language,"RETURN_EMPTY")))})}).fail(function(t){}).always(function(t,a){})},1e3)},postEdit:function(){c(document).on("heartbeat-send",function(t,o){void 0!==o.wp_autosave&&(o.wpglobus_heartbeat="wpglobus",c.each(WPGlobusAdmin.data.open_languages,function(t,a){var e=c("#title_"+a).val()||"";""!=(e=c.trim(e))&&(o.wp_autosave["post_title_"+a]=e),e=c("#content_"+a).val()||"",""!=(e=c.trim(e))&&(o.wp_autosave["content_"+a]=e)}))});var e="#postdivrich",o=!0,a="#post-body-content";if(!1===WPGlobusAdmin.data.support.editor&&(o=!(e="#titlediv")),!1===WPGlobusAdmin.data.support.title&&(o=!1),c(a).prepend(c(".wpglobus-post-body-tabs-list")),c.each(WPGlobusAdmin.tabs,function(t,a){"default"===a?(c(e).wrap('<div id="tab-default"></div>'),o&&c(c("#titlediv")).insertBefore(e)):(c(e+"-"+a).wrap('<div id="tab-'+a+'"></div>'),o&&c(c("#titlediv-"+a)).insertBefore(e+"-"+a))}),setTimeout(function(){var i=!1;c(a).addClass("wpglobus-post-body-tabs").tabs({beforeActivate:function(t,a){!function(){if(!i){var t=c("#wp-content-editor-container .mce-btn-group").eq(0),a=t.children("div");if(0!=t.length&&0!=a.length){var l=t.attr("style"),s=a.attr("style");c.each(WPGlobusCoreData.enabled_languages,function(t,a){if(a!=WPGlobusCoreData.default_language){var e=c("#wp-content_"+a+"-editor-container .mce-btn-group").eq(0),o=e.children("div");if(0==e.length||0==o.length)return!0;var n=e.attr("style"),i=o.attr("style");l!=n&&e.attr("style",l),s!=i&&o.attr("style",s)}}),i=!0}}}();var e=a.oldTab[0].id.replace("link-tab-",""),o=a.newTab[0].id.replace("link-tab-","");"default"==e&&(e=WPGlobusCoreData.default_language),"default"==o&&(o=WPGlobusCoreData.default_language);var n=c(document).triggerHandler("wpglobus_post_body_tabs",[e,o]);return!(!n&&void 0!==n)}})},500),c("#title").val(WPGlobusAdmin.title),c("#content").text(WPGlobusAdmin.content),"undefined"!=typeof WPGlobusVendor&&WPGlobusVendor.vendor.WPSEO&&("undefined"!=typeof wpglobus_wpseo?wpglobus_wpseo():"undefined"!=typeof WPGlobusYoastSeo&&("undefined"!=typeof WPGlobusYoastSeoPremium&&WPGlobusYoastSeoPremium&&"function"==typeof WPGlobusYoastSeoPremium.init&&WPGlobusYoastSeoPremium.init(),"function"==typeof WPGlobusYoastSeo.init&&WPGlobusYoastSeo.init())),WPGlobusAdmin.data.modify_excerpt){var n=c("#excerpt");n.addClass("hidden").css({display:"none"}),c(WPGlobusAdmin.data.template).insertAfter(n),c("body").on("change",".wpglobus-excerpt",function(){var t=c(this);n.val(WPGlobusCore.getString(n.val(),t.val(),t.data("language")))})}if(void 0!==wp.utils&&void 0!==wp.utils.WordCounter){WPGlobusCoreData.wordCounter={};var l=this,s={};c.each(WPGlobusCoreData.enabled_languages,function(t,a){if(a==WPGlobusCoreData.default_language)return!0;var n,e,i;s[t]="content_"+a,n=jQuery,e=new wp.utils.WordCounter,i=a,WPGlobusCoreData.wordCounter[i]={},WPGlobusCoreData.wordCounter[i].counter=e,n(function(){function o(t){var a,e;"object"==typeof t&&(t="tinymce"==t?l.getCurrentTab():t.target.id.replace("content_","")),void 0!==WPGlobusCoreData.wordCounter[t]&&(a=!WPGlobusCoreData.wordCounter[t].contentEditor||WPGlobusCoreData.wordCounter[t].contentEditor.isHidden()?WPGlobusCoreData.wordCounter[t].content.val():WPGlobusCoreData.wordCounter[t].contentEditor.getContent({format:"raw"}),(e=WPGlobusCoreData.wordCounter[t].counter.count(a))!==WPGlobusCoreData.wordCounter[t].prevCount&&WPGlobusCoreData.wordCounter[t].count.text(e),WPGlobusCoreData.wordCounter[t].prevCount=e)}WPGlobusCoreData.wordCounter[i].content=n("#content_"+i),WPGlobusCoreData.wordCounter[i].count=n("#wp-word-count-"+i).find(".word-count-"+i),WPGlobusCoreData.wordCounter[i].prevCount=0,n(document).on("tinymce-editor-init",function(t,a){if(-1!=n.inArray(a.id,s)){var e=a.id.replace("content_","");(WPGlobusCoreData.wordCounter[e].contentEditor=a).on("nodechange keyup",_.debounce(o,1e3))}}),WPGlobusCoreData.wordCounter[i].content.on("input keyup",_.debounce(o,1e3)),o(i)})})}c(document).on("click","#publish, #save-post",function(){if(1<WPGlobusAdmin.data.open_languages.length){c(document).triggerHandler("wpglobus_before_save_post",{content_tabs_id:a});var t,e=c("#title").val(),o="",n="";0==e.length&&(t=WPGlobusAdmin.data.open_languages.indexOf(WPGlobusAdmin.data.default_language),WPGlobusAdmin.data.open_languages.splice(t,1),c(WPGlobusAdmin.data.open_languages).each(function(t,a){n=0==t?"":"-",0<(e=c("#title_"+a).val()).length&&(0==o.length&&(n=""),o=o+n+e)})),0<o.length&&c("#title").val(o)}void 0===WPGlobusAdmin.data.tagsdiv||WPGlobusAdmin.data.tagsdiv.length<1||c(WPGlobusAdmin.data.tagsdiv).each(function(t,a){if(0==c("#"+a).length)return!0;var e=a.replace("tagsdiv-","");if("undefined"===e)return!0;if(0==c("#tax-input-"+e).length)return!0;var o,n=[];c("#tagsdiv-"+e+" .tagchecklist li").each(function(t,a){o=(o=c(a).html()).replace(/<button.*<\/button> /,""),void 0===WPGlobusAdmin.data.tag[e][o]?n[t]=o:n[t]=WPGlobusAdmin.data.tag[e][o]}),c("#tax-input-"+e).val(n.join(", "))})}),c(".ui-state-default").on("click",function(){"link-tab-default"===c(this).attr("id")&&(c(window).scrollTop(c(window).scrollTop()+1),c(window).scrollTop(c(window).scrollTop()-1))}),c(document).on("tabsactivate",a,function(t,a){WPGlobusAdmin.currentTab=a.newTab[0].dataset.language}),c(document).triggerHandler("wpglobus_after_post_edit")},adminCentral:function(){c(".wpglobus-admin-central-tab").css({display:"none"}),1<c(".nav-tab-active").length&&c(".wpglobus-about-wrap .nav-tab-wrapper a").removeClass("nav-tab-active");var e=!0;0==location.hash.indexOf("#")&&c(".wpglobus-about-wrap .nav-tab-wrapper a").each(function(t,a){c(a).attr("href")==location.hash&&(e=!1,c(a).addClass("nav-tab-active"))}),e&&c(".wpglobus-about-wrap .nav-tab-wrapper a").eq(0).addClass("nav-tab-active");var t=c(".wpglobus-about-wrap .nav-tab-active").data("tab-id");""!=t&&c("#"+t).css({display:"block"}),c(document).on("click",".wpglobus-about-wrap .nav-tab",function(t){var a=c(this);a.hasClass("nav-tab-active")||(c(".wpglobus-admin-central-tab").css({display:"none"}),c(".wpglobus-about-wrap .nav-tab").removeClass("nav-tab-active"),a.addClass("nav-tab-active"),""!=a.data("tab-id")&&c("#"+a.data("tab-id")).css({display:"block"}))})},start:function(){var a=this;c("#wpglobus_flags").select2({formatResult:this.format,formatSelection:this.format,minimumResultsForSearch:-1,escapeMarkup:function(t){return t}}),c("body").on("click","#enabled_languages-list li:first input",function(t){return t.preventDefault(),c(".redux-save-warn").css({display:"none"}),c("#enabled_languages-list").find("li:first > input").val("1"),0===c("#disable_first_language").length&&c(a.config.disable_first_language).insertAfter("#info_bar"),!1})},format:function(t){return'<img class="wpglobus_flag" src="'+WPGlobusAdmin.flag_url+t.text+'"/> '+t.text},set_dialog:function(){if(void 0===WPGlobusAdmin.data.customFieldsEnabled||(WPGlobusAdmin.data.customFieldsEnabled=this.parseBool(WPGlobusAdmin.data.customFieldsEnabled),WPGlobusAdmin.data.customFieldsEnabled)){var o,a=!1,n=function(t){var s,d,u,r="wpglobus_dialog_start wpglobus_dialog_icon";u=['<div class="wpglobus_dialog_options_wrapper hidden">','<input style="width:initial;" id="wpglobus-cb-{{id}}" data-object="#wpglobus-dialog-start-{{id}}" data-meta-key="{{meta-key}}" class="wpglobus_dialog_option wpglobus_dialog_cb" type="checkbox" {{checked}} />',"</div>"].join(""),c(void 0===t?"#the-list tr":"#the-list tr#"+t).each(function(){var t,a,e,o=c(this),n=o.attr("id"),i=o.find("textarea"),l=r;if(void 0===(s=i.attr("id")))return!0;e=c("#"+n+"-key").val(),t=c("#"+s).clone(),c(i).addClass("wpglobus-dialog-field-source hidden"),a=i.attr("name"),c(t).attr("id","wpglobus-"+s),c(t).attr("name","wpglobus-"+a),c(t).attr("data-source-id",s),c(t).attr("class","wpglobus-dialog-field"),c(t).val(WPGlobusCore.TextFilter(c(i).val(),WPGlobusCoreData.language)),c(t).insertAfter(i),d=(d=u.replace(/{{id}}/g,s)).replace(/{{meta-key}}/g,e),void 0===WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type]?d=d.replace(/{{checked}}/,"checked"):l=void 0!==WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type][e]&&"false"==WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type][e]?(d=d.replace(/{{checked}}/,""),r+" wpglobus_dialog_start_hidden"):(d=d.replace(/{{checked}}/,"checked"),r),o.append('<td style="width:20px;"><div id="wpglobus-dialog-start-'+s+'" data-type="control" data-source-type="textarea" data-source-id="'+s+'" class="'+l+'"></div>'+d+"</td>")}),!a&&0<c("#list-table .wpglobus_dialog_start").length&&(c("#list-table thead tr").append('<th class="wpglobus-control-head"><div class="wpglobus_dialog_settings wpglobus_dialog_icon"></div></th>'),a=!0)};n(),c("body").on("change",".wpglobus-dialog-field",function(){var e,o,n=c(this),t="#"+n.data("source-id"),i="";e=c(t).val(),/(\{:|\[:|<!--:)[a-z]{2}/.test(e)?(c.each(WPGlobusCoreData.enabled_languages,function(t,a){""!=(o=a==WPGlobusCoreData.language?n.val():WPGlobusCore.TextFilter(e,a,"RETURN_EMPTY"))&&(i+=WPGlobusCore.addLocaleMarks(o,a))}),c(t).val(i)):c(t).val(n.val())}),c(document).ajaxSend(function(t,a,e){"add-meta"==e.action&&(o=e.element)}),c(document).ajaxComplete(function(t,a,e){"add-meta"==e.action&&void 0!==a.responseXML&&n("newmeta"==o?"meta-"+c(a.responseXML.documentElement.outerHTML).find("meta").attr("id"):o)}),WPGlobusDialogApp.init({dialogTitle:"Edit meta"})}}},new t.App,t)});
|
1 |
+
var WPGlobusCore,WPGlobusDialogApp;!function(i){var d;d=WPGlobusCore={strpos:function(t,a,e){var o=(t=""+t).indexOf(a,e);return 0<=o&&o},TextFilter:function(t,a,e){if(void 0===t||""===t)return t;var o,n,i=[],l=!1;a=""==a?"en":a,e=void 0===e||""==e?"RETURN_IN_DEFAULT_LANGUAGE":e,i[0]=[],i[0].start=WPGlobusCoreData.locale_tag_start.replace("%s",a),i[0].end=WPGlobusCoreData.locale_tag_end,i[1]=[],i[1].start="\x3c!--:"+a+"--\x3e",i[1].end="\x3c!--:--\x3e",i[2]=[],i[2].start="[:"+a+"]",i[2].end="[:";for(var s=0;s<3;s++)if(!1!==(o=d.strpos(t,i[s].start))){o+=i[s].start.length,t=!1===(n=d.strpos(t,i[s].end,o))?t.substr(o):t.substr(o,n-o),l=!0;break}return l||("RETURN_EMPTY"==e?a==WPGlobusCoreData.default_language&&!/(\{:|\[:|<!--:)[a-z]{2}/.test(t)||(t=""):a==WPGlobusCoreData.default_language?/(\{:|\[:|<!--:)[a-z]{2}/.test(t)&&(t=""):t=d.TextFilter(t,WPGlobusCoreData.default_language)),t},addLocaleMarks:function(t,a){return WPGlobusCoreData.locale_tag_start.replace("%s",a)+t+WPGlobusCoreData.locale_tag_end},getTranslations:function(e){var o,n={};return i.each(WPGlobusCoreData.enabled_languages,function(t,a){o=a==WPGlobusCoreData.default_language?"RETURN_IN_DEFAULT_LANGUAGE":"RETURN_EMPTY",n[a]=d.TextFilter(e,a,o)}),n},getString:function(t,a,e){if(void 0===t)return t;void 0===a&&(a=""),void 0===e&&(e=WPGlobusCoreData.language),(t=d.getTranslations(t))[e]=a;var o="";return i.each(t,function(t,a){""!=a&&t!=WPGlobusCoreData.default_language&&(o+=d.addLocaleMarks(a,t))}),""!=t[WPGlobusCoreData.default_language]&&(o=""==o?t[WPGlobusCoreData.default_language]:d.addLocaleMarks(t[WPGlobusCoreData.default_language],WPGlobusCoreData.default_language)+o),o}}}(jQuery),function(m){var f;f=WPGlobusDialogApp={option:{listenClass:".wpglobus_dialog_start",settingsClass:".wpglobus_dialog_settings",dialogTabs:"#wpglobus-dialog-tabs",dialogTitle:"",customData:null,callback:function(){},dialogOptions:{title:"",placeholder:"",formFooter:"",beforeOpen:function(){},afterOpen:function(){},afterSave:function(){},close:function(){}},dialog:{}},form:void 0,element:void 0,element_by:"id",id:"",clone_id:"",wpglobus_id:"",type:"textarea",source:"",order:{},value:{},request:"core",attrs:{},dialogTitle:"",trClass:"wpglobus-translatable",startButton:['<span id="wpglobus-dialog-start-{{clone_id}}" ','style="{{style}}" ','data-type="control" data-dialog-title="{{title}}" ','data-source-type="" data-source-id="{{id}}" data-source-name="{{name}}" ','data-nodename="{{nodename}}"',"{{sbTitle}} ",'class="{{classes}}"></span>'].join(""),startButtonClass:"wpglobus_dialog_start wpglobus_dialog_icon",clicks:0,init:function(t){f.option.dialog=f.option.dialogOptions,f.option=m.extend(f.option,t),m(f.option.dialogTabs).tabs(),f.dialogTitle=f.option.dialogTitle,this.attachListener(),null!=f.option.customData&&void 0!==f.option.customData.addElements&&m.each(f.option.customData.addElements,function(t,a){f.addElement(a)})},convertToId:function(t){return t=(t=t.replace(/\]/g,"")).replace(/\[/g,"-")},addElement:function(t){var a={id:null,style:"",styleTextareaWrapper:"",sbTitle:"",onChangeClass:"",dialogTitle:"",dialog:f.option.dialogOptions};if("string"==typeof t)a.id=t;else{if("object"!=typeof t)return;a=m.extend(a,t)}var e,o,n,i=null,l=null,s=null,d=null,u=f.startButton,r="";if(f.element_by="name",0==(d=document.getElementsByName(a.id)).length&&(f.element_by="id",d=document.getElementById(a.id)),null!==d){if(l=a.id,s=void 0===(i="id"==f.element_by?m("#"+l):(r=(r=d[0].nodeName).toLowerCase(),m(r+'[name="'+l+'"]'))).attr("name")||""==i.attr("name")?l:i.attr("name"),f.clone_id=f.convertToId(l),-1!=s.indexOf("wpglobus")||-1!=f.clone_id.indexOf("wpglobus"))return!1;if(0<m("#wpglobus-"+f.clone_id).length)return!1;if(0<m(r+'[name="wpglobus-'+s+'"]').length)return!1;e=m(i.clone()),n=i.attr("style")||"",i.attr("style","display:none;"),e.attr("id","wpglobus-"+f.clone_id).attr("name","wpglobus-"+s),e.addClass(f.trClass),""!=a.onChangeClass&&e.addClass(a.onChangeClass),"id"==f.element_by?e.attr("data-source-id",l).attr("data-source-name","").attr("data-source-get-by",f.element_by):e.attr("data-source-id","").attr("data-source-name",s).attr("data-source-get-by",f.element_by),"textarea"==r?(o=WPGlobusCore.getTranslations(i.val())[WPGlobusCoreData.language],e.val(o),e.attr("data-nodename","textarea"),""==a.style?e.attr("style",n+";width:95%;float:left;"):e.attr("style",n+";"+a.style)):(o=WPGlobusCore.getTranslations(i.val())[WPGlobusCoreData.language],e.attr("value",o),e.attr("data-nodename","input"),""!=a.style&&e.attr("style",n+";"+a.style)),""!=a.dialog&&e.attr("data-dialog",JSON.stringify(a.dialog)),u=u.replace(/{{clone_id}}/g,f.clone_id),u="id"==f.element_by?(u=(u=u.replace(/{{id}}/g,f.clone_id)).replace(/{{name}}/g,"")).replace(/{{nodename}}/g,""):(u=(u=u.replace(/{{id}}/g,"")).replace(/{{name}}/g,s)).replace(/{{nodename}}/g,r),u="textarea"==r?u.replace("{{style}}","float:left;margin-top:0;"):u.replace("{{style}}","");var c="textarea"==r?f.startButtonClass+" wpglobus-textarea wpglobus-textarea-"+f.clone_id:f.startButtonClass;u=u.replace("{{classes}}",c),u=""==a.dialogTitle?u.replace("{{title}}",f.dialogTitle):u.replace("{{title}}",a.dialogTitle),u=""==a.sbTitle?u.replace("{{sbTitle}}",a.sbTitle):u.replace("{{sbTitle}}",'title="'+a.sbTitle+'"'),m(u).insertAfter(i),m(e).insertAfter(i),"textarea"==r&&(m("#wpglobus-"+f.clone_id).addClass("wpglobus-textarea-"+f.clone_id),m(".wpglobus-textarea-"+f.clone_id).wrapAll('<div class="wpglobus-textarea-wrapper" style="'+a.styleTextareaWrapper+'"></div>'));var g,p=!1;if(""==a.onChangeClass)g="#wpglobus-"+f.clone_id;else{g="."+a.onChangeClass;var b=m._data(m(document)[0],"events");void 0===b?p=!0:void 0!==b.change&&m.each(b.change,function(t,a){if(a.selector==g)return!(p=!0)})}return p?!0:(m(document).on("change",g,function(){var t=m(this),a=t.data("source-id");a=""==a?t.data("nodename")+'[name="'+t.data("source-name")+'"]':"#"+a,m(a).val(WPGlobusCore.getString(m(a).val(),t.val()))}),!0)}},saveDialog:function(){var e,o,n,i="",l="",s="";m(".wpglobus_dialog_textarea").each(function(t,a){e=m(a),o=e.val(),(n=e.data("language"))==WPGlobusAdmin.data.language&&(s=o),""!=o&&(i+=WPGlobusCore.addLocaleMarks(o,n),n==WPGlobusCoreData.default_language&&(l=o))}),i=i.length==l.length+8?l:i,m(f.id).val(i),i=""==s?l:s,m(f.wpglobus_id).val(i),f.runCallback(f.option.dialog.afterSave)},dialog:m("#wpglobus-dialog-wrapper").dialog({autoOpen:!1,width:650,modal:!0,dialogClass:"wpglobus-dialog",buttons:[{text:"Save",class:"wpglobus-button-save",click:function(){f.saveDialog(),f.dialog.dialog("close")}},{text:"Cancel",class:"wpglobus-button-cancel",click:function(){f.dialog.dialog("close")}}],open:function(t,a){var e=f.dialogTitle;void 0!==f.attrs.maxlength&&(m(".wpglobus_dialog_textarea").attr("maxlength",f.attrs.maxlength),e+=" | maxlength="+f.attrs.maxlength),m(".wpglobus-dialog .ui-dialog-title").text(e),m(this).removeClass("hidden")},close:function(){m(this).addClass("hidden"),f.runCallback(f.option.dialog.close),f.form[0].reset()}}),attachListener:function(){m(document).on("click",f.option.settingsClass,function(){m(".wpglobus_dialog_options_wrapper").hasClass("hidden")?m(".wpglobus_dialog_options_wrapper").removeClass("hidden"):m(".wpglobus_dialog_options_wrapper").addClass("hidden")}),m(document).on("click",".wpglobus_dialog_option",function(t){var a=m(this),e=a.data("object");f.order.action="save_post_meta_settings",f.order.post_type=WPGlobusAdmin.data.post_type,f.order.checked=a.prop("checked"),f.order.id=a.attr("id"),f.order.meta_key=a.data("meta-key"),f.ajax(f.order).done(function(t){"ok"==t.result&&("true"==t.checked?m(e).removeClass("wpglobus_dialog_start_hidden"):m(e).addClass("wpglobus_dialog_start_hidden"))}).fail(function(t){}).always(function(t,a){})}),m(document).on("click",f.option.listenClass,function(a){f.element=m(this),f.id=f.element.data("source-id"),""==f.id?(f.id=f.element.data("nodename")+'[name="'+f.element.data("source-name")+'"]',f.wpglobus_id="#wpglobus-"+f.convertToId(f.element.data("source-name"))):(f.wpglobus_id="#wpglobus-"+f.id,f.id="#"+f.id),f.clicks++,1==f.clicks&&setTimeout(function(){if(1==f.clicks)f.onClick(a);else{var t=m(f.id);t.hasClass("hidden")?t.removeClass("hidden").attr("style","display:block;"):t.addClass("hidden").attr("style","display:none;")}f.clicks=0},200)}),f.form=f.dialog.find("form#wpglobus-dialog-form").on("submit",function(t){t.preventDefault(),f.saveDialog()})},ajax:function(t){return m.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json",async:!1})},onClick:function(t){void 0===f.element.data("dialog-title")||""==f.element.data("dialog-title")?f.dialogTitle=f.option.dialogTitle:f.dialogTitle=f.element.data("dialog-title"),void 0!==f.id&&(f.attrs.maxlength=m(f.id).attr("maxlength")),f.source=f.element.data("source-value"),void 0===f.source&&(f.source=m(f.id).val(),"ajax"==f.request||(f.value=WPGlobusCore.getTranslations(f.source))),f.option.dialog=m.extend({},f.option.dialogOptions,m(f.wpglobus_id).data("dialog")),""!=f.option.dialog.title&&(f.dialogTitle=f.option.dialog.title),m.each(f.value,function(t,a){var e=m("#wpglobus-dialog-"+t);e.val(a),e.attr("placeholder",WPGlobusCore.TextFilter(f.option.dialog.placeholder,t,"RETURN_IN_DEFAULT_LANGUAGE"))}),m("#wpglobus-dialog-form-footer").html(f.option.dialog.formFooter),f.runCallback(f.option.dialog.beforeOpen),f.dialog.dialog("open"),f.runCallback(f.option.dialog.afterOpen)},runCallback:function(t){if("object"==typeof t){var a=Object.keys(t)[0],e=t[Object.keys(t)[0]];"window"===a?"function"==typeof window[e]&&window[e](t[Object.keys(t)[1]]):"function"==typeof window[a][e]&&window[a][e](t[Object.keys(t)[1]])}else"string"==typeof t?"function"==typeof window[t]&&window[t]():"function"==typeof t&&t()}}}(jQuery),jQuery(document).ready(function(){"use strict";var t,c;window.WPGlobusAdminApp=(t=window.WPGlobusAdminApp||{},c=jQuery,t.App=function(t){void 0===window.WPGlobusAdminApp&&(this.config={debug:!1,version:WPGlobusAdmin.version},this.status="ok","undefined"==typeof WPGlobusAdmin?(this.status="error",this.config.debug&&console.log("WPGlobus: error options loading")):this.config.debug&&console.dir(WPGlobusAdmin),this.config.disable_first_language=['<div id="disable_first_language" style="display:block;" class="redux-field-errors notice-red">',"<strong>","<span> </span>",WPGlobusAdmin.i18n.cannot_disable_language,"</strong>","</div>"].join(""),c.extend(this.config,t),"ok"===this.status&&this.init())},t.App.prototype={$document:c(document),init:function(){WPGlobusCoreData.multisite=this.parseBool(WPGlobusCoreData.multisite),this.adminInit(),c("#content").addClass("wpglobus-editor").attr("data-language",WPGlobusAdmin.data.default_language),c("textarea[id^=content_]").each(function(t,a){var e=c(a).attr("id").replace("content_","");c(a).attr("data-language",e)}),"post.php"===WPGlobusAdmin.page?(this.postEdit(),this.set_dialog(),"undefined"!=typeof WPGlobusAioseop&&WPGlobusAioseop.init()):"menu-edit"===WPGlobusAdmin.page?(WPGlobusDialogApp.init({dialogTitle:"Edit description"}),this.navMenus()):"taxonomy-edit"===WPGlobusAdmin.page?WPGlobusAdmin.data.tag_id&&this.taxonomyEdit():"taxonomy-quick-edit"===WPGlobusAdmin.page?this.quickEdit("taxonomy"):"edit.php"===WPGlobusAdmin.page?(this.quickEdit("post"),0<_.size(WPGlobusAdmin.$_get)&&WPGlobusDialogApp.init()):"options-general.php"==WPGlobusAdmin.page?(this.optionsGeneral(),WPGlobusDialogApp.init({customData:WPGlobusCoreData.page_custom_data})):"widgets.php"==WPGlobusAdmin.page?(WPGlobusWidgets.init(),WPGlobusDialogApp.init({dialogTitle:"Edit text"})):"wpglobus_options"==WPGlobusAdmin.page?this.start():"wpglobusAdminCentral"==WPGlobusAdmin.page?this.adminCentral():WPGlobusDialogApp.init({customData:WPGlobusCoreData.page_custom_data})},parseBool:function(t){return!/^(false|0)$/i.test(t)&&!!t},getCurrentTab:function(){return c(".wpglobus-post-body-tabs-list .ui-tabs-active").data("language")},adminInit:function(){var t=c(".wpglobus-addons-group a").data("key");if(void 0!==t)if(0<=window.location.search.indexOf("page=wpglobus_options&tab="+t))WPGlobusCoreData.multisite?window.location=WPGlobusCoreData.pluginInstallLocation.multisite:window.location=WPGlobusCoreData.pluginInstallLocation.single;else{var a=c("#toplevel_page_wpglobus_options li").eq(t+1);WPGlobusCoreData.multisite?c(a).find("a").attr("href",WPGlobusCoreData.pluginInstallLocation.multisite).attr("onclick","window.location=jQuery(this).attr('href');return false;"):c(a).find("a").attr("href",WPGlobusCoreData.pluginInstallLocation.single).attr("onclick","window.location=jQuery(this).attr('href');return false;")}},optionsGeneral:function(){var o=c("#blogname"),t=c("body");o.addClass("hidden"),c("#wpglobus-blogname").insertAfter(o).removeClass("hidden"),t.on("blur",".wpglobus-blogname",function(){c(".wpglobus-blogname").each(function(t,a){var e=c(a);o.val(WPGlobusCore.getString(o.val(),e.val(),e.data("language")))})});var n=c("#blogdescription");n.addClass("hidden"),c("#wpglobus-blogdescription").insertAfter(n).removeClass("hidden"),t.on("blur",".wpglobus-blogdesc",function(){c(".wpglobus-blogdesc").each(function(t,a){var e=c(a);n.val(WPGlobusCore.getString(n.val(),e.val(),e.data("language")))})})},quickEdit:function(n){if(void 0!==WPGlobusAdmin.data.has_items&&WPGlobusAdmin.data.has_items){var o="",l=0;c(document).ajaxComplete(function(t,a,e){void 0!==e.data&&""!=o&&0<=e.data.indexOf("action=inline-save-tax&")&&(c("#"+o+" a.row-title").text(WPGlobusAdmin.qedit_titles[l][WPGlobusAdmin.data.language].name),c("#"+o+" .description").text(WPGlobusAdmin.qedit_titles[l][WPGlobusAdmin.data.language].description))});var i={};c("#the-list tr").each(function(t,a){var e=c(a),o="post"===n?"post-":"tag-";l=e.attr("id").replace(o,""),i[l]={},"post"===n?i[l].source=e.find(".post_title").text():"taxonomy"===n&&(i[l].source=c("#inline_"+l+" .name").text())});var t={action:"get_titles"};t.type=n,t.taxonomy=void 0!==WPGlobusAdmin.data.taxonomy&&WPGlobusAdmin.data.taxonomy,t.title=i,c.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json"}).done(function(t){WPGlobusAdmin.qedit_titles=t.qedit_titles,c.each(t.bulkedit_post_titles,function(t,a){c("#inline_"+t+" .post_title").text(a[WPGlobusAdmin.data.language].name)})}).fail(function(t){}).always(function(t,a){}),c("body").on("change",".wpglobus-quick-edit-title",function(){var n="",i=[];c(".wpglobus-quick-edit-title").each(function(t,a){var e=c(a),o=e.data("language");""!==e.val()&&(n=WPGlobusCore.getString(n,e.val(),o)),WPGlobusAdmin.qedit_titles[l][o].name=e.val(),i[t]=o});var t=c(document).triggerHandler("wpglobus_get_translations",{string:n,lang:i,id:l});void 0!==t&&(n=t),c("input.ptitle").eq(0).attr("value",n),WPGlobusAdmin.qedit_titles[l].source=n}),void 0!==WPGlobusAdmin.data.tags&&c.each(WPGlobusAdmin.data.tags,function(t,a){WPGlobusAdmin.data.value[a].post_id={}}),c("button.save, input#bulk_edit").on("mouseenter",function(t){void 0!==WPGlobusAdmin.data.tags&&("bulk_edit"==t.currentTarget.id?c("input#bulk_edit").unbind("click"):c("button.save").unbind("click"),c("button.save, input#bulk_edit").on("click",function(a){var t=c.when(),e=(c(this),c.Deferred());e.resolve(function(t){t.next(".spinner").css({visibility:"visible"}),"bulk_edit"!=a.currentTarget.id&&c.ajaxSetup({async:!1});var o,n,i,l=t.parents("tr"),s=l.attr("id").replace("edit-","");c.each(WPGlobusAdmin.data.tags,function(t,a){if(0==(o=l.find("textarea[name='"+WPGlobusAdmin.data.names[a]+"']")).length)return!0;WPGlobusAdmin.data.value[a].post_id[s]=o.val(),n=WPGlobusAdmin.data.value[a].post_id[s].split(","),i=[];for(var e=0;e<n.length;e++)n[e]=n[e].trim(" "),""!=n[e]&&(void 0===WPGlobusAdmin.data.tag[a][n[e]]?i[e]=n[e]:i[e]=WPGlobusAdmin.data.tag[a][n[e]]);o.val(i.join(", "))})}(c(this))),t=t.then(function(){return c.when(e.done())}).then(function(){"bulk_edit"!=a.currentTarget.id&&setTimeout(function(){inlineEditPost.save(l),c.ajaxSetup({async:!0})},50)})}))}),c("#the-list").on("click",".editinline",function(){var t=c(this);if(o=t.parents("tr").attr("id"),"post"===n)l=o.replace("post-","");else{if("taxonomy"!==n)return;l=o.replace("tag-","")}"post"===n&&void 0!==WPGlobusAdmin.data.tags&&c.each(WPGlobusAdmin.data.tags,function(t,a){if(""!=WPGlobusAdmin.data.value[a]){var e,o=c("#edit-"+l+' textarea[name="'+WPGlobusAdmin.data.names[a]+'"]').val();void 0!==o&&(e=o.split(","),c.each(e,function(t,a){o=o.replace(a,WPGlobusCore.TextFilter(a,WPGlobusCoreData.language))}),c("#edit-"+l+' textarea[name="'+WPGlobusAdmin.data.names[a]+'"]').val(o))}});var a=c("#edit-"+l+" input.ptitle").eq(0),e=a.parents("label");a.val(WPGlobusAdmin.qedit_titles[l].source),a.addClass("hidden"),c(WPGlobusAdmin.data.template).insertAfter(e),void 0===WPGlobusAdmin.qedit_titles[l]&&(WPGlobusAdmin.qedit_titles[l]={},WPGlobusAdmin.qedit_titles[l].source=c("#"+o+" .name a.row-title").text(),c(WPGlobusAdmin.data.enabled_languages).each(function(t,a){WPGlobusAdmin.qedit_titles[l][a]={},a==WPGlobusAdmin.data.default_language?WPGlobusAdmin.qedit_titles[l][a].name=WPGlobusAdmin.qedit_titles[l].source:WPGlobusAdmin.qedit_titles[l][a].name="",WPGlobusAdmin.qedit_titles[l][a].description=""})),c(".wpglobus-quick-edit-title").each(function(t,a){var e=c(a),o=e.data("language");e.attr("id",o+l),void 0!==WPGlobusAdmin.qedit_titles[l][o]&&(WPGlobusAdmin.qedit_titles[l][o].name=WPGlobusAdmin.qedit_titles[l][o].name.replace(/\\\'/g,"'"),WPGlobusAdmin.qedit_titles[l][o].name=WPGlobusAdmin.qedit_titles[l][o].name.replace(/\\\"/g,'"'),e.attr("value",WPGlobusAdmin.qedit_titles[l][o].name),WPGlobusAdmin.qedit_titles[l].source=WPGlobusCore.getString(WPGlobusAdmin.qedit_titles[l].source,WPGlobusAdmin.qedit_titles[l][o].name,o))}),c("input.ptitle").eq(0).attr("value",WPGlobusAdmin.qedit_titles[l].source)})}},taxonomyEdit:function(){var a=[];a[0]="name",a[1]="description",c.each(WPGlobusCoreData.enabled_languages,function(t,u){c.each(a,function(t,a){var e,o,n,i,l,s,d;o=u,i=c("#"+(e=a)),l=i.clone(),s=i.attr("name"),d="wpglobus-element wpglobus-element_"+e+" wpglobus-element_"+o+" wpglobus-translatable",n=(n=document.getElementById(e)).nodeName,c(l).attr("id",e+"_"+o),c(l).attr("name",s+"_"+o),o!==WPGlobusCoreData.default_language&&(d+=" hidden"),c(l).attr("class",d),c(l).attr("data-save-to",e),c(l).attr("data-language",o),"INPUT"==n?c(l).attr("value",c("#wpglobus-link-tab-"+o).data(e)):"TEXTAREA"==n&&c(l).text(c("#wpglobus-link-tab-"+o).data(e)),i.addClass("hidden"),0==c(".wpglobus-element_"+e).length?c(l).insertAfter(i):c(l).insertAfter(c(".wpglobus-element_"+e).last())})}),c(".wpglobus-taxonomy-tabs").insertAfter("#ajax-response"),c(".wrap").tabs(),c("body").on("click",".wpglobus-taxonomy-tabs li",function(t){var a=c(this).data("language");c(".wpglobus-element").addClass("hidden"),c(".wpglobus-element_"+a).removeClass("hidden")}),c(".wpglobus-element").on("change",function(){var n=c(this).data("save-to"),i="";c(".wpglobus-element").each(function(t,a){var e=c(a),o=e.val();e.data("save-to")==n&&""!==o&&(i+=WPGlobusCore.addLocaleMarks(o,e.data("language")))}),c("#"+n).val(i)}),c(WPGlobusAdmin.data.multilingualSlug.title).insertAfter(".term-slug-wrap th label")},navMenus:function(){function e(){n!==c(i).length&&(clearInterval(o),c(i).each(function(t,a){var e=c(a);if(!e.hasClass("wpglobus-menu-item")){var l=c(a).attr("id");c.each(["input.edit-menu-item-title","input.edit-menu-item-attr-title"],function(t,a){var e=c("#"+l+" "+a),o=c(e);if(!o.hasClass("wpglobus-hidden")){o.addClass("wpglobus-hidden"),o.css("display","none");var n=o.parent("label"),i=o.parents("p");c(i).css("height","80px"),c(n).append('<div style="color:#f00;">'+WPGlobusAdmin.i18n.save_nav_menu+"</div>")}}),e.addClass("wpglobus-menu-item")}}))}var o,n,i="#menu-to-edit .menu-item";c.ajaxSetup({beforeSend:function(t,a){void 0!==a.data&&0<=a.data.indexOf("action=add-menu-item")&&(n=c(i).length,o=setInterval(e,500))}}),c(i).each(function(t,a){var e=c(a).attr("id"),u=e.replace("menu-item-","");c.each(["input.edit-menu-item-title","input.edit-menu-item-attr-title"],function(n,i){var l=c("#"+e+" "+i);l.val()!=WPGlobusAdmin.data.items[u][i].source&&l.val(WPGlobusAdmin.data.items[u][i].source);var s=c("#"+e+" "+i).parents("p"),d=0;c.each(WPGlobusAdmin.data.open_languages,function(t,a){var e=l.clone();e.attr("id",l.attr("id")+"-"+a),e.attr("name",l.attr("id")+"-"+a),e.attr("data-language",a),e.attr("data-item-id",u),e.attr("placeholder",WPGlobusAdmin.data.en_language_name[a]);var o=WPGlobusAdmin.data.items[u][a][i].class;0===n&&a===WPGlobusAdmin.data.default_language?e.attr("class",o+" edit-menu-item-title"):e.attr("class",o),""!=WPGlobusAdmin.data.items[u][a][i].caption?e.attr("value",WPGlobusAdmin.data.items[u][a][i].caption):e.attr("value",""),e.css("margin-bottom","0.6em"),c(s).append(e),d=t}),d=40*(d+1),l.css("display","none").attr("class","").addClass("widefat wpglobus-hidden"),c(s).css("height",d+"px").addClass("wpglobus-menu-item-box")}),c(a).addClass("wpglobus-menu-item")}),c(".menus-move-left, .menus-move-right").each(function(t,a){var e,o=c(a),n=(o.parents("li").attr("id").replace("menu-item-",""),o.attr("title"));void 0!==n&&c.each(WPGlobusAdmin.data.post_titles,function(t,a){0<=n.indexOf(t)&&(e=n.replace(t,a),o.attr("title",e),o.text(e))})}),c(".edit-menu-item-title").trigger("change"),wpNavMenu.refreshAdvancedAccessibility(),wpNavMenu.menusChanged=!1,c(".wpglobus-menu-item").on("change",function(){var t,a,e=c(this),o=e.data("item-id");e.hasClass("wpglobus-item-title")&&(t=WPGlobusCore.getString(c("input#edit-menu-item-title-"+o).val(),e.val(),e.data("language")),void 0!==(a=c(document).triggerHandler("wpglobus_get_menu_translations",{string:t,lang:WPGlobusCoreData.open_languages,id:o,type:"input.edit-menu-item-title"}))&&(t=a),c("input#edit-menu-item-title-"+o).val(t)),e.hasClass("wpglobus-item-attr")&&(t=WPGlobusCore.getString(c("input#edit-menu-item-attr-title-"+o).val(),e.val(),e.data("language")),void 0!==(a=c(document).triggerHandler("wpglobus_get_menu_translations",{string:t,lang:WPGlobusCoreData.open_languages,id:o,type:"input.edit-menu-item-attr-title"}))&&(t=a),c("input#edit-menu-item-attr-title-"+o).val(t))});var a=[];setTimeout(function(){c(".edit-menu-item-description").each(function(){var t=c(this).attr("id");a.push(t),WPGlobusDialogApp.addElement(t)}),c(".wpglobus_dialog_start").each(function(){c(this).css({"font-style":"normal"}),c(this).after("<br />")});var t={action:"getNavMenuItemsDescription"};t.menuItems=a,c.ajax({type:"POST",url:WPGlobusAdmin.ajaxurl,data:{action:WPGlobusAdmin.process_ajax,order:t},dataType:"json"}).done(function(t){"object"==typeof t&&c.each(t,function(t,a){""!=a&&(c("#"+t).val(a),c("#wpglobus-"+t).val(WPGlobusCore.TextFilter(a,WPGlobus.language,"RETURN_EMPTY")))})}).fail(function(t){}).always(function(t,a){})},1e3)},postEdit:function(){c(document).on("heartbeat-send",function(t,o){void 0!==o.wp_autosave&&(o.wpglobus_heartbeat="wpglobus",c.each(WPGlobusAdmin.data.open_languages,function(t,a){var e=c("#title_"+a).val()||"";""!=(e=c.trim(e))&&(o.wp_autosave["post_title_"+a]=e),e=c("#content_"+a).val()||"",""!=(e=c.trim(e))&&(o.wp_autosave["content_"+a]=e)}))});var e="#postdivrich",o=!0,a="#post-body-content";if(!1===WPGlobusAdmin.data.support.editor&&(o=!(e="#titlediv")),!1===WPGlobusAdmin.data.support.title&&(o=!1),c(a).prepend(c(".wpglobus-post-body-tabs-list")),c.each(WPGlobusAdmin.tabs,function(t,a){"default"===a?(c(e).wrap('<div id="tab-default"></div>'),o&&c(c("#titlediv")).insertBefore(e)):(c(e+"-"+a).wrap('<div id="tab-'+a+'"></div>'),o&&c(c("#titlediv-"+a)).insertBefore(e+"-"+a))}),setTimeout(function(){var i=!1;c(a).addClass("wpglobus-post-body-tabs").tabs({beforeActivate:function(t,a){!function(){if(!i){var t=c("#wp-content-editor-container .mce-btn-group").eq(0),a=t.children("div");if(0!=t.length&&0!=a.length){var l=t.attr("style"),s=a.attr("style");c.each(WPGlobusCoreData.enabled_languages,function(t,a){if(a!=WPGlobusCoreData.default_language){var e=c("#wp-content_"+a+"-editor-container .mce-btn-group").eq(0),o=e.children("div");if(0==e.length||0==o.length)return!0;var n=e.attr("style"),i=o.attr("style");l!=n&&e.attr("style",l),s!=i&&o.attr("style",s)}}),i=!0}}}();var e=a.oldTab[0].id.replace("link-tab-",""),o=a.newTab[0].id.replace("link-tab-","");"default"==e&&(e=WPGlobusCoreData.default_language),"default"==o&&(o=WPGlobusCoreData.default_language);var n=c(document).triggerHandler("wpglobus_post_body_tabs",[e,o]);return!(!n&&void 0!==n)}})},500),c("#title").val(WPGlobusAdmin.title),c("#content").text(WPGlobusAdmin.content),"undefined"!=typeof WPGlobusVendor&&WPGlobusVendor.vendor.WPSEO&&("undefined"!=typeof wpglobus_wpseo?wpglobus_wpseo():"undefined"!=typeof WPGlobusYoastSeo&&("undefined"!=typeof WPGlobusYoastSeoPremium&&WPGlobusYoastSeoPremium&&"function"==typeof WPGlobusYoastSeoPremium.init&&WPGlobusYoastSeoPremium.init(),"function"==typeof WPGlobusYoastSeo.init&&WPGlobusYoastSeo.init())),WPGlobusAdmin.data.modify_excerpt){var n=c("#excerpt");n.addClass("hidden").css({display:"none"}),c(WPGlobusAdmin.data.template).insertAfter(n),c("body").on("change",".wpglobus-excerpt",function(){var t=c(this);n.val(WPGlobusCore.getString(n.val(),t.val(),t.data("language")))})}if(void 0!==wp.utils&&void 0!==wp.utils.WordCounter){WPGlobusCoreData.wordCounter={};var l=this,s={};c.each(WPGlobusCoreData.enabled_languages,function(t,a){if(a==WPGlobusCoreData.default_language)return!0;var n,e,i;s[t]="content_"+a,n=jQuery,e=new wp.utils.WordCounter,i=a,WPGlobusCoreData.wordCounter[i]={},WPGlobusCoreData.wordCounter[i].counter=e,n(function(){function o(t){var a,e;"object"==typeof t&&(t="tinymce"==t?l.getCurrentTab():t.target.id.replace("content_","")),void 0!==WPGlobusCoreData.wordCounter[t]&&(a=!WPGlobusCoreData.wordCounter[t].contentEditor||WPGlobusCoreData.wordCounter[t].contentEditor.isHidden()?WPGlobusCoreData.wordCounter[t].content.val():WPGlobusCoreData.wordCounter[t].contentEditor.getContent({format:"raw"}),(e=WPGlobusCoreData.wordCounter[t].counter.count(a))!==WPGlobusCoreData.wordCounter[t].prevCount&&WPGlobusCoreData.wordCounter[t].count.text(e),WPGlobusCoreData.wordCounter[t].prevCount=e)}WPGlobusCoreData.wordCounter[i].content=n("#content_"+i),WPGlobusCoreData.wordCounter[i].count=n("#wp-word-count-"+i).find(".word-count-"+i),WPGlobusCoreData.wordCounter[i].prevCount=0,n(document).on("tinymce-editor-init",function(t,a){if(-1!=n.inArray(a.id,s)){var e=a.id.replace("content_","");(WPGlobusCoreData.wordCounter[e].contentEditor=a).on("nodechange keyup",_.debounce(o,1e3))}}),WPGlobusCoreData.wordCounter[i].content.on("input keyup",_.debounce(o,1e3)),o(i)})})}c(document).on("click","#publish, #save-post",function(){if(1<WPGlobusAdmin.data.open_languages.length){c(document).triggerHandler("wpglobus_before_save_post",{content_tabs_id:a});var t,e=c("#title").val(),o="",n="";0==e.length&&(t=WPGlobusAdmin.data.open_languages.indexOf(WPGlobusAdmin.data.default_language),WPGlobusAdmin.data.open_languages.splice(t,1),c(WPGlobusAdmin.data.open_languages).each(function(t,a){n=0==t?"":"-",0<(e=c("#title_"+a).val()).length&&(0==o.length&&(n=""),o=o+n+e)})),0<o.length&&c("#title").val(o)}void 0===WPGlobusAdmin.data.tagsdiv||WPGlobusAdmin.data.tagsdiv.length<1||c(WPGlobusAdmin.data.tagsdiv).each(function(t,a){if(0==c("#"+a).length)return!0;var e=a.replace("tagsdiv-","");if("undefined"===e)return!0;if(0==c("#tax-input-"+e).length)return!0;var o,n=[];c("#tagsdiv-"+e+" .tagchecklist li").each(function(t,a){o=(o=c(a).html()).replace(/<button.*<\/button> /,""),void 0===WPGlobusAdmin.data.tag[e][o]?n[t]=o:n[t]=WPGlobusAdmin.data.tag[e][o]}),c("#tax-input-"+e).val(n.join(", "))})}),c(".ui-state-default").on("click",function(){"link-tab-default"===c(this).attr("id")&&(c(window).scrollTop(c(window).scrollTop()+1),c(window).scrollTop(c(window).scrollTop()-1))}),c(document).on("tabsactivate",a,function(t,a){WPGlobusAdmin.currentTab=a.newTab[0].dataset.language}),c(document).triggerHandler("wpglobus_after_post_edit")},adminCentral:function(){c(".wpglobus-admin-central-tab").css({display:"none"}),1<c(".nav-tab-active").length&&c(".wpglobus-about-wrap .nav-tab-wrapper a").removeClass("nav-tab-active");var e=!0;0==location.hash.indexOf("#")&&c(".wpglobus-about-wrap .nav-tab-wrapper a").each(function(t,a){c(a).attr("href")==location.hash&&(e=!1,c(a).addClass("nav-tab-active"))}),e&&c(".wpglobus-about-wrap .nav-tab-wrapper a").eq(0).addClass("nav-tab-active");var t=c(".wpglobus-about-wrap .nav-tab-active").data("tab-id");""!=t&&c("#"+t).css({display:"block"}),c(document).on("click",".wpglobus-about-wrap .nav-tab",function(t){var a=c(this);a.hasClass("nav-tab-active")||(c(".wpglobus-admin-central-tab").css({display:"none"}),c(".wpglobus-about-wrap .nav-tab").removeClass("nav-tab-active"),a.addClass("nav-tab-active"),""!=a.data("tab-id")&&c("#"+a.data("tab-id")).css({display:"block"}))})},start:function(){var a=this;c("#wpglobus_flags").select2({formatResult:this.format,formatSelection:this.format,minimumResultsForSearch:-1,escapeMarkup:function(t){return t}}),c("body").on("click","#enabled_languages-list li:first input",function(t){return t.preventDefault(),c(".redux-save-warn").css({display:"none"}),c("#enabled_languages-list").find("li:first > input").val("1"),0===c("#disable_first_language").length&&c(a.config.disable_first_language).insertAfter("#info_bar"),!1})},format:function(t){return'<img class="wpglobus_flag" src="'+WPGlobusAdmin.flag_url+t.text+'"/> '+t.text},set_dialog:function(){if(void 0===WPGlobusAdmin.data.customFieldsEnabled||(WPGlobusAdmin.data.customFieldsEnabled=this.parseBool(WPGlobusAdmin.data.customFieldsEnabled),WPGlobusAdmin.data.customFieldsEnabled)){var o,a=!1,n=function(t){var s,d,u,r="wpglobus_dialog_start wpglobus_dialog_icon";u=['<div class="wpglobus_dialog_options_wrapper hidden">','<input style="width:initial;" id="wpglobus-cb-{{id}}" data-object="#wpglobus-dialog-start-{{id}}" data-meta-key="{{meta-key}}" class="wpglobus_dialog_option wpglobus_dialog_cb" type="checkbox" {{checked}} />',"</div>"].join(""),c(void 0===t?"#the-list tr":"#the-list tr#"+t).each(function(){var t,a,e,o=c(this),n=o.attr("id"),i=o.find("textarea"),l=r;if(void 0===(s=i.attr("id")))return!0;e=c("#"+n+"-key").val(),t=c("#"+s).clone(),c(i).addClass("wpglobus-dialog-field-source hidden"),a=i.attr("name"),c(t).attr("id","wpglobus-"+s),c(t).attr("name","wpglobus-"+a),c(t).attr("data-source-id",s),c(t).attr("class","wpglobus-dialog-field"),c(t).val(WPGlobusCore.TextFilter(c(i).val(),WPGlobusCoreData.language)),c(t).insertAfter(i),d=(d=u.replace(/{{id}}/g,s)).replace(/{{meta-key}}/g,e),void 0===WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type]?d=d.replace(/{{checked}}/,"checked"):l=void 0!==WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type][e]&&"false"==WPGlobusAdmin.data.post_meta_settings[WPGlobusAdmin.data.post_type][e]?(d=d.replace(/{{checked}}/,""),r+" wpglobus_dialog_start_hidden"):(d=d.replace(/{{checked}}/,"checked"),r),o.append('<td style="width:20px;"><div id="wpglobus-dialog-start-'+s+'" data-type="control" data-source-type="textarea" data-source-id="'+s+'" class="'+l+'"></div>'+d+"</td>")}),!a&&0<c("#list-table .wpglobus_dialog_start").length&&(c("#list-table thead tr").append('<th class="wpglobus-control-head"><div class="wpglobus_dialog_settings wpglobus_dialog_icon"></div></th>'),a=!0)};n(),c("body").on("change",".wpglobus-dialog-field",function(){var e,o,n=c(this),t="#"+n.data("source-id"),i="";e=c(t).val(),/(\{:|\[:|<!--:)[a-z]{2}/.test(e)?(c.each(WPGlobusCoreData.enabled_languages,function(t,a){""!=(o=a==WPGlobusCoreData.language?n.val():WPGlobusCore.TextFilter(e,a,"RETURN_EMPTY"))&&(i+=WPGlobusCore.addLocaleMarks(o,a))}),c(t).val(i)):c(t).val(n.val())}),c(document).ajaxSend(function(t,a,e){"add-meta"==e.action&&(o=e.element)}),c(document).ajaxComplete(function(t,a,e){"add-meta"==e.action&&void 0!==a.responseXML&&n("newmeta"==o?"meta-"+c(a.responseXML.documentElement.outerHTML).find("meta").attr("id"):o)}),WPGlobusDialogApp.init({dialogTitle:"Edit meta"})}}},new t.App,t)});
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2020 WPGlobus 2.3.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.3.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.3.
|
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.3.1
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.3.1 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.3.1\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
@@ -218,6 +218,11 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
218 |
|
219 |
== Changelog ==
|
220 |
|
|
|
|
|
|
|
|
|
|
|
221 |
= 2.3.0 =
|
222 |
|
223 |
* Added: (Builders/Pods) Support (partially - Standard and Custom Post Types) `Pods – Custom Content Types and Fields`.
|
218 |
|
219 |
== Changelog ==
|
220 |
|
221 |
+
= 2.3.1 =
|
222 |
+
|
223 |
+
* Added: (Core/Post Types) post types of `Elementor Pro` to the hidden types array.
|
224 |
+
* Added: (Core/WPGlobusDialogApp) `afterOpen` callback.
|
225 |
+
|
226 |
= 2.3.0 =
|
227 |
|
228 |
* Added: (Builders/Pods) Support (partially - Standard and Custom Post Types) `Pods – Custom Content Types and Fields`.
|
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.3.
|
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.3.
|
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.3.1
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
42 |
exit;
|
43 |
}
|
44 |
|
45 |
+
define( 'WPGLOBUS_VERSION', '2.3.1' );
|
46 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
47 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
48 |
|