Version Description
- Added: (Options) new style for
Add new Language
button. - Fixed: (Customizer) Disable sections to prevent using elements with no
id
attribute with theStartkit
theme.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.2.28 |
Comparing to | |
See all releases |
Code changes from version 2.2.27 to 2.2.28
- data/wpglobus-product-info.json +1 -1
- includes/admin/customize/wpglobus-customize-filters.php +33 -1
- includes/js/wpglobus-customize-control140.min.js +1 -1
- includes/js/wpglobus-customize-control170.min.js +1 -1
- includes/js/wpglobus-customize-control190.js +14 -0
- includes/js/wpglobus-customize-control190.min.js +1 -1
- includes/options/fields/table/class-wpglobus-languages-table.php +2 -2
- languages/wpglobus.pot +3 -3
- readme.txt +5 -24
- 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"},"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.1","_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"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.2.
|
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"},"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.1","_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"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.2.6","_api_tested_up_to":"5.3"}}
|
includes/admin/customize/wpglobus-customize-filters.php
CHANGED
@@ -30,7 +30,39 @@ if ( ! class_exists( 'WPGlobus_Customize_Filters' ) ) :
|
|
30 |
*/
|
31 |
$disabled_sections[] = 'tt_font_typography';
|
32 |
}
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
return $disabled_sections;
|
35 |
|
36 |
}
|
30 |
*/
|
31 |
$disabled_sections[] = 'tt_font_typography';
|
32 |
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @since 2.2.28
|
36 |
+
*/
|
37 |
+
if ( class_exists( 'WPGlobus_Customize_Themes' ) ) {
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @see W.I.P. `Prevent using element with no id attribute` in includes\js\wpglobus-customize-control190.js
|
41 |
+
* to getting sections for disabling.
|
42 |
+
*/
|
43 |
+
$theme_name = WPGlobus_Customize_Themes::get_theme_name_lc();
|
44 |
+
|
45 |
+
if ( 'startkit' == $theme_name ) {
|
46 |
+
/**
|
47 |
+
* @see https://wordpress.org/themes/startkit/
|
48 |
+
*/
|
49 |
+
$disabled_sections[] = 'slider_setting';
|
50 |
+
$disabled_sections[] = 'service_setting';
|
51 |
+
$disabled_sections[] = 'testimonial_setting';
|
52 |
+
$disabled_sections[] = 'footer_icon';
|
53 |
+
$disabled_sections[] = 'Body_typography';
|
54 |
+
$disabled_sections[] = 'paragraph_typography';
|
55 |
+
$disabled_sections[] = 'H1_typography';
|
56 |
+
$disabled_sections[] = 'H2_typography';
|
57 |
+
$disabled_sections[] = 'H3_typography';
|
58 |
+
$disabled_sections[] = 'H4_typography';
|
59 |
+
$disabled_sections[] = 'H5_typography';
|
60 |
+
$disabled_sections[] = 'H6_typography';
|
61 |
+
$disabled_sections[] = 'menu_typography';
|
62 |
+
$disabled_sections[] = 'section_typography';
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
return $disabled_sections;
|
67 |
|
68 |
}
|
includes/js/wpglobus-customize-control140.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){"use strict";var c={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,selectorHtml:'<span style="margin-left:5px;" class="wpglobus-icon-globe"></span><span style="font-weight:bold;">{{language}}</span>',init:function(t){c.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(a.each(WPGlobusCoreData.enabled_languages,function(t,e){c.languages[t]=e,c.length=t}),c.addLanguageSelector(),c.setControlInstances(),c.setFieldsSection(),c.attachListeners())},setFieldsSection:function(){var o={},n=a(".wpglobus-fields_settings_control_box").data("section-template"),s="",l="",i="";a.each(WPGlobusCustomize.controlInstances,function(t,e){void 0===o[e.section]&&(o[e.section]={}),o[e.section][t]=e}),a.each(o,function(t,e){l="<ul>",a.each(e,function(t,e){i=e.userControl.enabled?" checked ":"",l+='<li><input id="wpglobus-cb-control-'+t+'" data-control="'+t+'" class="wpglobus-customize-cb-control" type="checkbox"'+i+" /> "+e.title+"</li>"}),l+="</ul>",s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(t).params.title)).replace(/{{section}}/g,t)).replace("{{section_id}}",'"'+t+'"')).replace("{{items}}",l),a(s).insertBefore(a("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),a("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),a(WPGlobusCustomizeOptions.helpButton).insertAfter(a("#accordion-section-wpglobus_fields_settings_section .customize-action")),a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),a("."+WPGlobusCustomizeOptions.userControlIconClass).on("click",function(t){var o=a(this).data("section");a(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(t,e){o==a(e).data("section")?a(this).css({display:"block"}):a(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand()}),a(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(t){a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(t,e){var o=e.controlSelector+" "+e.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+e.section+'" style="position:absolute;right:0px;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';a(n).insertBefore(o),e.userControl.enabled||(1<a(o).length?a(o).each(function(t,e){a(e).removeClass(WPGlobusCustomize.controlClass)}):a(o).removeClass(WPGlobusCustomize.controlClass).val(e.setting))},ctrlMenuItemsCallback:function(t,e){},ctrlWidgetCallback:function(l,i){if(c.action=!1,void 0===c.controlWidgets[l].element){void 0===i&&(i=wp.customize.control.instance(l)),c.controlWidgets[l].element={},c.controlWidgets[l].control=i,c.controlWidgets[l].inWidgetTitle=i.container.find(".in-widget-title");var t=i.container.find("input[type=submit]");0!=t.length&&(t.css({display:"block"}),t.attr("data-widget",l),c.controlWidgets[l].submit=t,c.attachWidgetListeners(c.controlWidgets[l])),i.liveUpdateMode=!1,void 0===i.setting().title?c.controlWidgets[l].inWidgetTitle.text(""):c.controlWidgets[l].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(i.setting().title,WPGlobusCustomize.languageAdmin)),a.each(WPGlobusCustomize.elementSelector,function(t,n){var s=i.container.find(n);0!=s.length&&a.each(s,function(t,e){if(void 0===e.id||""==e.id)return!0;var o=a(s[t]);void 0===c.controlWidgets[l].element[e.id]&&(c.controlWidgets[l].element[e.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",l),c.controlWidgets[l].element[e.id].element=o,c.controlWidgets[l].element[e.id].setting=i.setting(),c.controlWidgets[l].element[e.id].selector=n,c.controlWidgets[l].element[e.id].value=e.defaultValue,o.val(WPGlobusCore.TextFilter(e.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),a(document).triggerHandler("wpglobus_customize_control_added_widget",[l])}},ctrlCallback:function(o,n,t){var s=!1;if(a.each(WPGlobusCustomize.disabledSections,function(t,e){if(o.section()==e)return!(s=!0)}),!s&&(a.each(WPGlobusCustomize.disabledSettingMask,function(t,e){if(0<=n.indexOf(e))return!(s=!0)}),!s)){var l=wp.customize.control.instance(n);if(0<=n.indexOf("widget"))return void 0===c.controlWidgets[n]&&(c.controlWidgets[n]={},c.action&&c.ctrlWidgetCallback(n,l)),c.controlWidgets[n].parent=l.selector,!1;if(void 0===c.controlInstances[n]){var i=!0;a.each(WPGlobusCustomize.elementSelector,function(t,e){var o=l.container.find(e);0!=o.length&&(c.controlInstances[n]={},c.controlInstances[n].element=o,c.controlInstances[n].setting=l.setting(),c.controlInstances[n].selector=e,c.controlInstances[n].controlSelector=l.selector,c.controlInstances[n].type="",c.controlInstances[n].section=l.section(),c.controlInstances[n].title=null,c.controlInstances[n].userControl=null,a.each(WPGlobusCustomize.setLinkBy,function(t,e){0<=n.indexOf(e)&&(c.controlInstances[n].type="link",""==c.controlInstances[n].setting&&(c.controlInstances[n].setting=o[0].defaultValue),o.addClass("wpglobus-control-link"))}),""===c.controlInstances[n].type&&(c.controlInstances[n].type="textarea"==e?"textarea":"text"),o.val(WPGlobusCore.TextFilter(c.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),o.addClass("wpglobus-customize-control"),o.attr("data-wpglobus-customize-control",c.controlInstances[n].controlSelector.replace("#customize-control-","")),"link"==c.controlInstances[n].type&&(c.controlInstances[n].setting=c.convertString(o[0].defaultValue)),c.controlInstances[n].title=a(l.selector+" .customize-control-title").text(),null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][n]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][n]&&(i=!1),c.controlInstances[n].userControl={},c.controlInstances[n].userControl.enabled=i,c.setUserControls(n,c.controlInstances[n]))})}}},setControlInstances:function(){wp.customize.control.each(c.ctrlCallback)},setTitle:function(){a(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(t){if(void 0===t)return t;var o=[],e=WPGlobusCore.getTranslations(t),n=0,s=!0;return a.each(e,function(t,e){o[n]=""==e?"null":(s=!1,e),n++}),s?"":o.join("|||")},getTranslations:function(t){var o={},n=t.split("|||");return a.each(WPGlobusCoreData.enabled_languages,function(t,e){o[e]="undefined"===n[t]||"null"===n[t]?"":n[t]}),o},getString:function(t,o,n){if(void 0===t)return t;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var e=c.getTranslations(t),s=[],l=0;return a.each(e,function(t,e){s[l]=t==n?o:""==e?"null":e,l++}),s=s.join("|||")},addLanguageSelector:function(){a(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),a(".wpglobus-customize-selector").html(c.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).on("click",".wpglobus-customize-selector",function(t){c.index>c.length-1?c.index=0:c.index++,WPGlobusCoreData.language=c.languages[c.index],a(this).html(c.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),a(".wpglobus-customize-control").each(function(t,e){var o=a(e),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=c.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))}),a(".wpglobus-customize-widget-control").each(function(t,e){var o=a(e),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})})},updateElements:function(s){void 0===s&&(s=!0),a.each(WPGlobusCustomize.controlInstances,function(t,e){if(!e.userControl.enabled)return!0;var o=wp.customize.control.instance(t);if("link"==e.type){var n=c.getTranslations(WPGlobusCustomize.controlInstances[t].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),e.element.val(o.setting())):e.element.val(n[WPGlobusCoreData.language])}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),e.element.val(o.setting())):e.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(t){"mouseenter"==t.type?a.each(c.controlWidgets[a(this).data("widget")].element,function(t,e){a("#"+t).val(e.value)}):"mouseleave"==t.type?c.widgetKeep||a.each(c.controlWidgets[a(this).data("widget")].element,function(t,e){a("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==t.type&&(c.widgetKeep=!0)},attachWidgetListeners:function(t){void 0!==t.submit[0].id&&a(document).on("mouseenter","#"+t.submit[0].id,c.onSubmitEvents).on("mouseleave","#"+t.submit[0].id,c.onSubmitEvents).on("click","#"+t.submit[0].id,c.onSubmitEvents)},attachListeners:function(){a(".wpglobus-customize-control").on("keyup",function(t){var e=a(this),o=e.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=e.data("wpglobus-customize-control"),void 0===WPGlobusCustomize.controlInstances[o])||("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=c.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language))}),a(document).on("keyup",".wpglobus-customize-widget-control",function(t){var e=a(this),o=e.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value,e.val(),WPGlobusCoreData.language))}),a("#save").on("mouseenter",function(t){a.each(WPGlobusCustomize.controlInstances,function(t,e){if(e.userControl.enabled){var o=wp.customize.control.instance(t);o.setting.set(e.setting),e.element.val(o.setting())}})}).on("mouseleave",function(t){c.instancesKeep||c.updateElements()}).on("click",function(t){c.instancesKeep=!0}),a(document).on("ajaxComplete",function(t,n){void 0!==n.responseText&&('{"success":true,"data":[]}'==n.responseText?c.updateElements(!1):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(c.action="customizerAjaxComplete",c.setControlInstances()),a.each(WPGlobusCustomize.controlWidgets,function(t,e){var o=t.replace("_","-");if(0<=n.responseText.indexOf(o))return e.submit.css({display:"block"}),e.control.liveUpdateMode=!1,a.each(e.element,function(t,e){a("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),e.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(e.control.setting().title,WPGlobusCustomize.languageAdmin)),c.widgetKeep=!1})))}),a(document).on("click",".widget-title, .widget-title-action",function(t){var o=a(this).parents(".customize-control-widget_form").attr("id");a.each(c.controlWidgets,function(t,e){if("#"+o==e.parent)return c.ctrlWidgetCallback(t),!1})})}};WPGlobusCustomize=a.extend({},WPGlobusCustomize,c),WPGlobusCustomize.init()});
|
1 |
+
jQuery(document).ready(function(a){"use strict";var c={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,selectorHtml:'<span style="margin-left:5px;" class="wpglobus-icon-globe"></span><span style="font-weight:bold;">{{language}}</span>',init:function(t){c.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(a.each(WPGlobusCoreData.enabled_languages,function(t,e){c.languages[t]=e,c.length=t}),c.addLanguageSelector(),c.setControlInstances(),c.setFieldsSection(),c.attachListeners())},setFieldsSection:function(){var o={},n=a(".wpglobus-fields_settings_control_box").data("section-template"),s="",l="",i="";a.each(WPGlobusCustomize.controlInstances,function(t,e){void 0===o[e.section]&&(o[e.section]={}),o[e.section][t]=e}),a.each(o,function(t,e){l="<ul>",a.each(e,function(t,e){i=e.userControl.enabled?" checked ":"",l+='<li><input id="wpglobus-cb-control-'+t+'" data-control="'+t+'" class="wpglobus-customize-cb-control" type="checkbox"'+i+" /> "+e.title+"</li>"}),l+="</ul>",s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(t).params.title)).replace(/{{section}}/g,t)).replace("{{section_id}}",'"'+t+'"')).replace("{{items}}",l),a(s).insertBefore(a("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),a("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),a(WPGlobusCustomizeOptions.helpButton).insertAfter(a("#accordion-section-wpglobus_fields_settings_section .customize-action")),a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),a("."+WPGlobusCustomizeOptions.userControlIconClass).on("click",function(t){var o=a(this).data("section");a(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(t,e){o==a(e).data("section")?a(this).css({display:"block"}):a(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand()}),a(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(t){a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(t,e){var o=e.controlSelector+" "+e.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+e.section+'" style="position:absolute;right:0px;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';a(n).insertBefore(o),e.userControl.enabled||(1<a(o).length?a(o).each(function(t,e){a(e).removeClass(WPGlobusCustomize.controlClass)}):a(o).removeClass(WPGlobusCustomize.controlClass).val(e.setting))},ctrlMenuItemsCallback:function(t,e){},ctrlWidgetCallback:function(l,i){if(c.action=!1,void 0===c.controlWidgets[l].element){void 0===i&&(i=wp.customize.control.instance(l)),c.controlWidgets[l].element={},c.controlWidgets[l].control=i,c.controlWidgets[l].inWidgetTitle=i.container.find(".in-widget-title");var t=i.container.find("input[type=submit]");0!=t.length&&(t.css({display:"block"}),t.attr("data-widget",l),c.controlWidgets[l].submit=t,c.attachWidgetListeners(c.controlWidgets[l])),i.liveUpdateMode=!1,void 0===i.setting().title?c.controlWidgets[l].inWidgetTitle.text(""):c.controlWidgets[l].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(i.setting().title,WPGlobusCustomize.languageAdmin)),a.each(WPGlobusCustomize.elementSelector,function(t,n){var s=i.container.find(n);0!=s.length&&a.each(s,function(t,e){if(void 0===e.id||""==e.id)return!0;var o=a(s[t]);void 0===c.controlWidgets[l].element[e.id]&&(c.controlWidgets[l].element[e.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",l),c.controlWidgets[l].element[e.id].element=o,c.controlWidgets[l].element[e.id].setting=i.setting(),c.controlWidgets[l].element[e.id].selector=n,c.controlWidgets[l].element[e.id].value=e.defaultValue,o.val(WPGlobusCore.TextFilter(e.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),a(document).triggerHandler("wpglobus_customize_control_added_widget",[l])}},ctrlCallback:function(o,n,t){var s=!1;if(a.each(WPGlobusCustomize.disabledSections,function(t,e){if(o.section()==e)return!(s=!0)}),!s&&(a.each(WPGlobusCustomize.disabledSettingMask,function(t,e){if(0<=n.indexOf(e))return!(s=!0)}),!s)){var l=wp.customize.control.instance(n);if(0<=n.indexOf("widget"))return void 0===c.controlWidgets[n]&&(c.controlWidgets[n]={},c.action&&c.ctrlWidgetCallback(n,l)),c.controlWidgets[n].parent=l.selector,!1;if(void 0===c.controlInstances[n]){var i=!0;a.each(WPGlobusCustomize.elementSelector,function(t,e){var o=l.container.find(e);0!=o.length&&(c.controlInstances[n]={},c.controlInstances[n].element=o,c.controlInstances[n].setting=l.setting(),c.controlInstances[n].selector=e,c.controlInstances[n].controlSelector=l.selector,c.controlInstances[n].type="",c.controlInstances[n].section=l.section(),c.controlInstances[n].title=null,c.controlInstances[n].userControl=null,a.each(WPGlobusCustomize.setLinkBy,function(t,e){0<=n.indexOf(e)&&(c.controlInstances[n].type="link",""==c.controlInstances[n].setting&&(c.controlInstances[n].setting=o[0].defaultValue),o.addClass("wpglobus-control-link"))}),""===c.controlInstances[n].type&&(c.controlInstances[n].type="textarea"==e?"textarea":"text"),o.val(WPGlobusCore.TextFilter(c.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),o.addClass("wpglobus-customize-control"),o.attr("data-wpglobus-customize-control",c.controlInstances[n].controlSelector.replace("#customize-control-","")),"link"==c.controlInstances[n].type&&(c.controlInstances[n].setting=c.convertString(o[0].defaultValue)),c.controlInstances[n].title=a(l.selector+" .customize-control-title").text(),null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][n]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][n]&&(i=!1),c.controlInstances[n].userControl={},c.controlInstances[n].userControl.enabled=i,c.setUserControls(n,c.controlInstances[n]))})}}},setControlInstances:function(){wp.customize.control.each(c.ctrlCallback)},setTitle:function(){a(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(t){if(void 0===t)return t;var o=[],e=WPGlobusCore.getTranslations(t),n=0,s=!0;return a.each(e,function(t,e){""==e?o[n]="null":(s=!1,o[n]=e),n++}),s?"":o.join("|||")},getTranslations:function(t){var o={},n=t.split("|||");return a.each(WPGlobusCoreData.enabled_languages,function(t,e){o[e]="undefined"===n[t]||"null"===n[t]?"":n[t]}),o},getString:function(t,o,n){if(void 0===t)return t;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var e=c.getTranslations(t),s=[],l=0;return a.each(e,function(t,e){s[l]=t==n?o:""==e?"null":e,l++}),s=s.join("|||")},addLanguageSelector:function(){a(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),a(".wpglobus-customize-selector").html(c.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).on("click",".wpglobus-customize-selector",function(t){c.index>c.length-1?c.index=0:c.index++,WPGlobusCoreData.language=c.languages[c.index],a(this).html(c.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),a(".wpglobus-customize-control").each(function(t,e){var o=a(e),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=c.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))}),a(".wpglobus-customize-widget-control").each(function(t,e){var o=a(e),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})})},updateElements:function(s){void 0===s&&(s=!0),a.each(WPGlobusCustomize.controlInstances,function(t,e){if(!e.userControl.enabled)return!0;var o=wp.customize.control.instance(t);if("link"==e.type){var n=c.getTranslations(WPGlobusCustomize.controlInstances[t].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),e.element.val(o.setting())):e.element.val(n[WPGlobusCoreData.language])}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),e.element.val(o.setting())):e.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(t){"mouseenter"==t.type?a.each(c.controlWidgets[a(this).data("widget")].element,function(t,e){a("#"+t).val(e.value)}):"mouseleave"==t.type?c.widgetKeep||a.each(c.controlWidgets[a(this).data("widget")].element,function(t,e){a("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==t.type&&(c.widgetKeep=!0)},attachWidgetListeners:function(t){void 0!==t.submit[0].id&&a(document).on("mouseenter","#"+t.submit[0].id,c.onSubmitEvents).on("mouseleave","#"+t.submit[0].id,c.onSubmitEvents).on("click","#"+t.submit[0].id,c.onSubmitEvents)},attachListeners:function(){a(".wpglobus-customize-control").on("keyup",function(t){var e=a(this),o=e.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=e.data("wpglobus-customize-control"),void 0===WPGlobusCustomize.controlInstances[o])||("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=c.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language))}),a(document).on("keyup",".wpglobus-customize-widget-control",function(t){var e=a(this),o=e.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value,e.val(),WPGlobusCoreData.language))}),a("#save").on("mouseenter",function(t){a.each(WPGlobusCustomize.controlInstances,function(t,e){if(e.userControl.enabled){var o=wp.customize.control.instance(t);o.setting.set(e.setting),e.element.val(o.setting())}})}).on("mouseleave",function(t){c.instancesKeep||c.updateElements()}).on("click",function(t){c.instancesKeep=!0}),a(document).on("ajaxComplete",function(t,n){void 0!==n.responseText&&('{"success":true,"data":[]}'==n.responseText?c.updateElements(!1):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(c.action="customizerAjaxComplete",c.setControlInstances()),a.each(WPGlobusCustomize.controlWidgets,function(t,e){var o=t.replace("_","-");if(0<=n.responseText.indexOf(o))return e.submit.css({display:"block"}),e.control.liveUpdateMode=!1,a.each(e.element,function(t,e){a("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),e.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(e.control.setting().title,WPGlobusCustomize.languageAdmin)),c.widgetKeep=!1})))}),a(document).on("click",".widget-title, .widget-title-action",function(t){var o=a(this).parents(".customize-control-widget_form").attr("id");a.each(c.controlWidgets,function(t,e){if("#"+o==e.parent)return c.ctrlWidgetCallback(t),!1})})}};WPGlobusCustomize=a.extend({},WPGlobusCustomize,c),WPGlobusCustomize.init()});
|
includes/js/wpglobus-customize-control170.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(c){"use strict";var u={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,customizeSave:!1,selectorHtml:'<span style="margin-left:5px;" class="wpglobus-icon-globe"></span><span style="font-weight:bold;">{{language}}</span>',settingsSectionExpand:function(){c(document).triggerHandler("wpglobus_fields_settings_section_expand",[this,u])},init:function(t){u.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(c.each(WPGlobusCoreData.enabled_languages,function(t,e){u.languages[t]=e,u.length=t}),u.addLanguageSelector(),u.setControlInstances(),u.setFieldsSection(),u.attachListeners(),u.setTinymce())},updateTinymce:function(t){"tinymce"==WPGlobusCustomize.controlInstances[this.id].type&&(WPGlobusCustomize.controlInstances[this.id].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[this.id].setting,t.target.textContent,WPGlobusCoreData.language))},setTinymce:function(t){c(document).on("tinymce-editor-init",function(t,e){"object"==typeof u.controlInstances[e.id]&&(u.controlInstances[e.id].type="tinymce",c(e.iframeElement).addClass("wpglobus-customize-control").css({width:"99%"}),e.on("input",_.debounce(u.updateTinymce,300)))})},getSize:function(t){return void 0===t?_.size(u.controlInstances):"widget"==t?_.size(u.controlWidgets):null},setFieldsSection:function(){var o={},n=c(".wpglobus-fields_settings_control_box").data("section-template"),s="",i="",l="";c.each(WPGlobusCustomize.controlInstances,function(t,e){void 0===o[e.section]&&(o[e.section]={}),o[e.section][t]=e}),c.each(o,function(t,e){if(i="<ul>",c.each(e,function(t,e){l=e.userControl.enabled?" checked ":"",i+='<li id="'+e.fieldSettings.itemID+'">',i+='<input id="'+e.fieldSettings.cbID+'" data-control="'+t+'" class="wpglobus-customize-cb-control" type="checkbox"'+l+' /> <span class="wpglobus-cb-control-title">'+e.title+"</span>",i+="</li>"}),i+="</ul>",void 0===wp.customize.section(t))return!0;s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(t).params.title)).replace(/{{section}}/g,t)).replace("{{section_id}}",'"'+t+'"')).replace("{{items}}",i),c(s).insertBefore(c("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),c("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),c(WPGlobusCustomizeOptions.helpButton).insertAfter(c("#accordion-section-wpglobus_fields_settings_section .customize-action")),c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),c(document).on("click","."+WPGlobusCustomizeOptions.userControlIconClass,function(t){var o=c(this).data("section");c(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(t,e){o==c(e).data("section")?c(this).css({display:"block"}):c(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand})}),c(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(t){c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(t,e){var o=e.controlSelector+" "+e.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+e.section+'" style="position:absolute;right:0px;cursor:pointer;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';c(n).insertBefore(o),e.userControl.enabled||(1<c(o).length?c(o).each(function(t,e){c(e).removeClass(WPGlobusCustomize.controlClass)}):c(o).removeClass(WPGlobusCustomize.controlClass).val(e.setting))},ctrlMenuItemsCallback:function(t,e){},ctrlWidgetCallback:function(i,l){if(u.action=!1,void 0===u.controlWidgets[i].element){void 0===l&&(l=wp.customize.control.instance(i)),u.controlWidgets[i].element={},u.controlWidgets[i].control=l,u.controlWidgets[i].inWidgetTitle=l.container.find(".in-widget-title"),u.controlWidgets[i].parent=l.selector;var t=l.container.find("input[type=submit]");0!=t.length&&(t.css({display:"block"}),t.attr("data-widget",i),u.controlWidgets[i].submit=t,u.attachWidgetListeners(u.controlWidgets[i])),l.liveUpdateMode=!1,void 0===l.setting().title?u.controlWidgets[i].inWidgetTitle.text(""):u.controlWidgets[i].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(l.setting().title,WPGlobusCustomize.languageAdmin)),c.each(WPGlobusCustomize.elementSelector,function(t,n){var s=l.container.find(n);0!=s.length&&c.each(s,function(t,e){if(void 0===e.id||""==e.id)return!0;var o=c(s[t]);void 0===u.controlWidgets[i].element[e.id]&&(u.controlWidgets[i].element[e.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",i),u.controlWidgets[i].element[e.id].element=o,u.controlWidgets[i].element[e.id].setting=l.setting(),u.controlWidgets[i].element[e.id].selector=n,u.controlWidgets[i].element[e.id].value=e.defaultValue,o.val(WPGlobusCore.TextFilter(e.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),c(document).triggerHandler("wpglobus_customize_control_added_widget",[i])}},ctrlCallback:function(o,i,t){var n=!1;if(c.each(WPGlobusCustomize.disabledSections,function(t,e){if(o.section()==e)return!(n=!0)}),!n&&(c.each(WPGlobusCustomize.disabledSettingMask,function(t,e){if(0<=i.indexOf(e))return!(n=!0)}),!n)){var l=wp.customize.control.instance(i);if(0<=i.indexOf("widget"))return void 0===u.controlWidgets[i]&&(u.controlWidgets[i]={},u.action&&u.ctrlWidgetCallback(i,l)),u.controlWidgets[i].parent=l.selector,1!=c(l.selector).length?u.controlWidgets[i].observer=null:(u.controlWidgets[i].observer=new MutationObserver(function(t){t.forEach(function(t){"class"==t.attributeName&&-1!=t.target.className.indexOf("expanding")&&u.ctrlWidgetCallback(i)})}),u.controlWidgets[i].observer.observe(document.querySelector(u.controlWidgets[i].parent),{attributes:!0,childList:!0,characterData:!0})),!1;if(void 0===u.controlInstances[i]){var a=!0;c.each(WPGlobusCustomize.elementSelector,function(t,e){var s=l.container.find(e);0!=s.length&&(u.controlInstances[i]={},u.controlInstances[i].element=s,u.controlInstances[i].elementID=s.attr("id")?"#"+s.attr("id"):void 0,u.controlInstances[i].setting=l.setting(),u.controlInstances[i].selector=e,u.controlInstances[i].controlSelector=l.selector,u.controlInstances[i].type="",u.controlInstances[i].section=l.section(),u.controlInstances[i].title=null,u.controlInstances[i].userControl=null,u.controlInstances[i].fieldSettings={},u.controlInstances[i].fieldSettings.itemID="item-wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(i),u.controlInstances[i].fieldSettings.cbID="wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(i),c.each(WPGlobusCustomize.setLinkBy,function(t,e){if(0<=i.indexOf(e)){if(u.controlInstances[i].type="link",""==u.controlInstances[i].setting&&(u.controlInstances[i].setting=s[0].defaultValue),WPGlobusCustomize.changeset_uuid){var o=wp.customize.control(i).setting();if(-1!==o.indexOf("|||")){var n=u.getTranslations(o);wp.customize.control(i).setting(n[WPGlobusCoreData.default_language]),c(WPGlobusCustomize.controlInstances[i].controlSelector+" "+WPGlobusCustomize.controlInstances[i].selector).val(n[WPGlobusCoreData.default_language])}}s.addClass("wpglobus-control-link")}}),""===u.controlInstances[i].type&&(u.controlInstances[i].type="textarea"==e?"textarea":"text"),s.val(WPGlobusCore.TextFilter(u.controlInstances[i].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),s.addClass("wpglobus-customize-control"),s.attr("data-wpglobus-customize-control",u.controlInstances[i].controlSelector.replace("#customize-control-","")),"link"==u.controlInstances[i].type&&(u.controlInstances[i].setting=u.convertString(s[0].defaultValue)),u.controlInstances[i].title=l.params.label,null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][i]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][i]&&(a=!1),u.controlInstances[i].userControl={},u.controlInstances[i].userControl.enabled=a,u.setUserControls(i,u.controlInstances[i]))})}}},setControlInstances:function(){wp.customize.control.each(u.ctrlCallback)},setTitle:function(){c(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(t){if(void 0===t)return t;var o=[],e=WPGlobusCore.getTranslations(t),n=0,s=!0;return t==e[WPGlobusCoreData.default_language]?t:(c.each(e,function(t,e){o[n]=""==e?"null":(s=!1,e),n++}),s?"":o.join("|||"))},getTranslations:function(t){if(void 0===t)return t;var o={},n=t.split("|||");return c.each(WPGlobusCoreData.enabled_languages,function(t,e){o[e]=void 0===n[t]||"null"===n[t]?"":n[t]}),o},getString:function(t,o,n){if(void 0===t)return t;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var e=u.getTranslations(t),s=[],i=0,l=!0;return c.each(e,function(t,e){t==n?(o=o.trim(),s[i]=""==o?"null":o):s[i]=""==e?"null":e,t!=WPGlobusCoreData.default_language&&"null"!=s[i]&&(l=!1),i++}),s=l?s[0]:s.join("|||")},addLanguageSelector:function(){c(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),c(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).on("click",".wpglobus-customize-selector",function(t){u.index>u.length-1?u.index=0:u.index++,WPGlobusCoreData.language=u.languages[u.index],c(this).html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),c(".wpglobus-customize-control").each(function(t,e){var o=c(e),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=u.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else{s=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY");"tinymce"==WPGlobusCustomize.controlInstances[n].type&&tinymce.get(n).setContent(s,{format:"raw"}),o.val(WPGlobusCore.TextFilter(s,"RETURN_EMPTY"))}}),c(".wpglobus-customize-widget-control").each(function(t,e){var o=c(e),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})})},updateElements:function(s){void 0===s&&(s=!0),c.each(WPGlobusCustomize.controlInstances,function(t,e){if(!e.userControl.enabled)return!0;var o=wp.customize.control.instance(t);if("link"==e.type){var n=u.getTranslations(WPGlobusCustomize.controlInstances[t].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),e.element.val(o.setting())):e.element.val(n[WPGlobusCoreData.language])}else if("tinymce"==e.type){n=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY");tinymce.get(t).setContent(n,{format:"raw"}),e.element.val(n)}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),e.element.val(o.setting())):e.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(t){"mouseenter"==t.type?c.each(u.controlWidgets[c(this).data("widget")].element,function(t,e){c("#"+t).val(e.value)}):"mouseleave"==t.type?u.widgetKeep||c.each(u.controlWidgets[c(this).data("widget")].element,function(t,e){c("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==t.type&&(u.widgetKeep=!0)},attachWidgetListeners:function(t){void 0!==t.submit[0].id&&c(document).on("mouseenter","#"+t.submit[0].id,u.onSubmitEvents).on("mouseleave","#"+t.submit[0].id,u.onSubmitEvents).on("click","#"+t.submit[0].id,u.onSubmitEvents)},attachListeners:function(){c(".wpglobus-customize-control").on("keyup",function(t){var e=c(this),o=e.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=e.data("wpglobus-customize-control"),WPGlobusCustomize.controlInstances[o]),void 0===c(document).triggerHandler("wpglobus_customize_control_keyup",[e,o])&&("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=u.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language))}),c(document).on("keyup",".wpglobus-customize-widget-control",function(t){var e=c(this),o=e.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value,e.val(),WPGlobusCoreData.language))}),c(document).on("mouseenter","#save",function(t){c.each(WPGlobusCustomize.controlInstances,function(t,e){if(e.userControl.enabled){var o=wp.customize.control.instance(t);"tinymce"==e.type&&tinymce.get(t).setContent(e.setting,{format:"raw"}),o.setting.set(e.setting),e.element.val(o.setting())}})}).on("mouseleave","#save",function(t){u.instancesKeep||(u.updateElements(),wp.customize.previewer.refresh())}),c("#save").on("click",function(t){u.instancesKeep=!0}),c(document).on("ajaxSend",function(t,e,o){void 0!==o.data&&-1!=o.data.indexOf("wp_customize=on")&&-1!=o.data.indexOf("action=customize_save")&&(u.customizeSave=!0)}),c(document).on("ajaxComplete",function(t,n){void 0!==n.responseText&&(u.customizeSave?(u.updateElements(!1),u.instancesKeep&&(u.instancesKeep=!1)):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(u.action="customizerAjaxComplete",u.setControlInstances()),c.each(WPGlobusCustomize.controlWidgets,function(t,e){var o=t.replace("_","-");if(0<=n.responseText.indexOf(o))return e.submit.css({display:"block"}),e.control.liveUpdateMode=!1,c.each(e.element,function(t,e){c("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),e.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(e.control.setting().title,WPGlobusCustomize.languageAdmin)),u.widgetKeep=!1})),u.customizeSave=!1,wp.customize.previewer.refresh())})}};WPGlobusCustomize=c.extend({},WPGlobusCustomize,u),WPGlobusCustomize.init()});
|
1 |
+
jQuery(document).ready(function(c){"use strict";var u={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,customizeSave:!1,selectorHtml:'<span style="margin-left:5px;" class="wpglobus-icon-globe"></span><span style="font-weight:bold;">{{language}}</span>',settingsSectionExpand:function(){c(document).triggerHandler("wpglobus_fields_settings_section_expand",[this,u])},init:function(t){u.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(c.each(WPGlobusCoreData.enabled_languages,function(t,e){u.languages[t]=e,u.length=t}),u.addLanguageSelector(),u.setControlInstances(),u.setFieldsSection(),u.attachListeners(),u.setTinymce())},updateTinymce:function(t){"tinymce"==WPGlobusCustomize.controlInstances[this.id].type&&(WPGlobusCustomize.controlInstances[this.id].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[this.id].setting,t.target.textContent,WPGlobusCoreData.language))},setTinymce:function(t){c(document).on("tinymce-editor-init",function(t,e){"object"==typeof u.controlInstances[e.id]&&(u.controlInstances[e.id].type="tinymce",c(e.iframeElement).addClass("wpglobus-customize-control").css({width:"99%"}),e.on("input",_.debounce(u.updateTinymce,300)))})},getSize:function(t){return void 0===t?_.size(u.controlInstances):"widget"==t?_.size(u.controlWidgets):null},setFieldsSection:function(){var o={},n=c(".wpglobus-fields_settings_control_box").data("section-template"),s="",i="",l="";c.each(WPGlobusCustomize.controlInstances,function(t,e){void 0===o[e.section]&&(o[e.section]={}),o[e.section][t]=e}),c.each(o,function(t,e){if(i="<ul>",c.each(e,function(t,e){l=e.userControl.enabled?" checked ":"",i+='<li id="'+e.fieldSettings.itemID+'">',i+='<input id="'+e.fieldSettings.cbID+'" data-control="'+t+'" class="wpglobus-customize-cb-control" type="checkbox"'+l+' /> <span class="wpglobus-cb-control-title">'+e.title+"</span>",i+="</li>"}),i+="</ul>",void 0===wp.customize.section(t))return!0;s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(t).params.title)).replace(/{{section}}/g,t)).replace("{{section_id}}",'"'+t+'"')).replace("{{items}}",i),c(s).insertBefore(c("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),c("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),c(WPGlobusCustomizeOptions.helpButton).insertAfter(c("#accordion-section-wpglobus_fields_settings_section .customize-action")),c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),c(document).on("click","."+WPGlobusCustomizeOptions.userControlIconClass,function(t){var o=c(this).data("section");c(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(t,e){o==c(e).data("section")?c(this).css({display:"block"}):c(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand})}),c(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(t){c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(t,e){var o=e.controlSelector+" "+e.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+e.section+'" style="position:absolute;right:0px;cursor:pointer;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';c(n).insertBefore(o),e.userControl.enabled||(1<c(o).length?c(o).each(function(t,e){c(e).removeClass(WPGlobusCustomize.controlClass)}):c(o).removeClass(WPGlobusCustomize.controlClass).val(e.setting))},ctrlMenuItemsCallback:function(t,e){},ctrlWidgetCallback:function(i,l){if(u.action=!1,void 0===u.controlWidgets[i].element){void 0===l&&(l=wp.customize.control.instance(i)),u.controlWidgets[i].element={},u.controlWidgets[i].control=l,u.controlWidgets[i].inWidgetTitle=l.container.find(".in-widget-title"),u.controlWidgets[i].parent=l.selector;var t=l.container.find("input[type=submit]");0!=t.length&&(t.css({display:"block"}),t.attr("data-widget",i),u.controlWidgets[i].submit=t,u.attachWidgetListeners(u.controlWidgets[i])),l.liveUpdateMode=!1,void 0===l.setting().title?u.controlWidgets[i].inWidgetTitle.text(""):u.controlWidgets[i].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(l.setting().title,WPGlobusCustomize.languageAdmin)),c.each(WPGlobusCustomize.elementSelector,function(t,n){var s=l.container.find(n);0!=s.length&&c.each(s,function(t,e){if(void 0===e.id||""==e.id)return!0;var o=c(s[t]);void 0===u.controlWidgets[i].element[e.id]&&(u.controlWidgets[i].element[e.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",i),u.controlWidgets[i].element[e.id].element=o,u.controlWidgets[i].element[e.id].setting=l.setting(),u.controlWidgets[i].element[e.id].selector=n,u.controlWidgets[i].element[e.id].value=e.defaultValue,o.val(WPGlobusCore.TextFilter(e.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),c(document).triggerHandler("wpglobus_customize_control_added_widget",[i])}},ctrlCallback:function(o,i,t){var n=!1;if(c.each(WPGlobusCustomize.disabledSections,function(t,e){if(o.section()==e)return!(n=!0)}),!n&&(c.each(WPGlobusCustomize.disabledSettingMask,function(t,e){if(0<=i.indexOf(e))return!(n=!0)}),!n)){var l=wp.customize.control.instance(i);if(0<=i.indexOf("widget"))return void 0===u.controlWidgets[i]&&(u.controlWidgets[i]={},u.action&&u.ctrlWidgetCallback(i,l)),u.controlWidgets[i].parent=l.selector,1!=c(l.selector).length?u.controlWidgets[i].observer=null:(u.controlWidgets[i].observer=new MutationObserver(function(t){t.forEach(function(t){"class"==t.attributeName&&-1!=t.target.className.indexOf("expanding")&&u.ctrlWidgetCallback(i)})}),u.controlWidgets[i].observer.observe(document.querySelector(u.controlWidgets[i].parent),{attributes:!0,childList:!0,characterData:!0})),!1;if(void 0===u.controlInstances[i]){var a=!0;c.each(WPGlobusCustomize.elementSelector,function(t,e){var s=l.container.find(e);0!=s.length&&(u.controlInstances[i]={},u.controlInstances[i].element=s,u.controlInstances[i].elementID=s.attr("id")?"#"+s.attr("id"):void 0,u.controlInstances[i].setting=l.setting(),u.controlInstances[i].selector=e,u.controlInstances[i].controlSelector=l.selector,u.controlInstances[i].type="",u.controlInstances[i].section=l.section(),u.controlInstances[i].title=null,u.controlInstances[i].userControl=null,u.controlInstances[i].fieldSettings={},u.controlInstances[i].fieldSettings.itemID="item-wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(i),u.controlInstances[i].fieldSettings.cbID="wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(i),c.each(WPGlobusCustomize.setLinkBy,function(t,e){if(0<=i.indexOf(e)){if(u.controlInstances[i].type="link",""==u.controlInstances[i].setting&&(u.controlInstances[i].setting=s[0].defaultValue),WPGlobusCustomize.changeset_uuid){var o=wp.customize.control(i).setting();if(-1!==o.indexOf("|||")){var n=u.getTranslations(o);wp.customize.control(i).setting(n[WPGlobusCoreData.default_language]),c(WPGlobusCustomize.controlInstances[i].controlSelector+" "+WPGlobusCustomize.controlInstances[i].selector).val(n[WPGlobusCoreData.default_language])}}s.addClass("wpglobus-control-link")}}),""===u.controlInstances[i].type&&(u.controlInstances[i].type="textarea"==e?"textarea":"text"),s.val(WPGlobusCore.TextFilter(u.controlInstances[i].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),s.addClass("wpglobus-customize-control"),s.attr("data-wpglobus-customize-control",u.controlInstances[i].controlSelector.replace("#customize-control-","")),"link"==u.controlInstances[i].type&&(u.controlInstances[i].setting=u.convertString(s[0].defaultValue)),u.controlInstances[i].title=l.params.label,null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][i]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][i]&&(a=!1),u.controlInstances[i].userControl={},u.controlInstances[i].userControl.enabled=a,u.setUserControls(i,u.controlInstances[i]))})}}},setControlInstances:function(){wp.customize.control.each(u.ctrlCallback)},setTitle:function(){c(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(t){if(void 0===t)return t;var o=[],e=WPGlobusCore.getTranslations(t),n=0,s=!0;return t==e[WPGlobusCoreData.default_language]?t:(c.each(e,function(t,e){""==e?o[n]="null":(s=!1,o[n]=e),n++}),s?"":o.join("|||"))},getTranslations:function(t){if(void 0===t)return t;var o={},n=t.split("|||");return c.each(WPGlobusCoreData.enabled_languages,function(t,e){o[e]=void 0===n[t]||"null"===n[t]?"":n[t]}),o},getString:function(t,o,n){if(void 0===t)return t;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var e=u.getTranslations(t),s=[],i=0,l=!0;return c.each(e,function(t,e){t==n?(o=o.trim(),s[i]=""==o?"null":o):s[i]=""==e?"null":e,t!=WPGlobusCoreData.default_language&&"null"!=s[i]&&(l=!1),i++}),s=l?s[0]:s.join("|||")},addLanguageSelector:function(){c(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),c(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).on("click",".wpglobus-customize-selector",function(t){u.index>u.length-1?u.index=0:u.index++,WPGlobusCoreData.language=u.languages[u.index],c(this).html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),c(".wpglobus-customize-control").each(function(t,e){var o=c(e),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=u.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else{s=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY");"tinymce"==WPGlobusCustomize.controlInstances[n].type&&tinymce.get(n).setContent(s,{format:"raw"}),o.val(WPGlobusCore.TextFilter(s,"RETURN_EMPTY"))}}),c(".wpglobus-customize-widget-control").each(function(t,e){var o=c(e),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})})},updateElements:function(s){void 0===s&&(s=!0),c.each(WPGlobusCustomize.controlInstances,function(t,e){if(!e.userControl.enabled)return!0;var o=wp.customize.control.instance(t);if("link"==e.type){var n=u.getTranslations(WPGlobusCustomize.controlInstances[t].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),e.element.val(o.setting())):e.element.val(n[WPGlobusCoreData.language])}else if("tinymce"==e.type){n=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY");tinymce.get(t).setContent(n,{format:"raw"}),e.element.val(n)}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),e.element.val(o.setting())):e.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[t].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(t){"mouseenter"==t.type?c.each(u.controlWidgets[c(this).data("widget")].element,function(t,e){c("#"+t).val(e.value)}):"mouseleave"==t.type?u.widgetKeep||c.each(u.controlWidgets[c(this).data("widget")].element,function(t,e){c("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==t.type&&(u.widgetKeep=!0)},attachWidgetListeners:function(t){void 0!==t.submit[0].id&&c(document).on("mouseenter","#"+t.submit[0].id,u.onSubmitEvents).on("mouseleave","#"+t.submit[0].id,u.onSubmitEvents).on("click","#"+t.submit[0].id,u.onSubmitEvents)},attachListeners:function(){c(".wpglobus-customize-control").on("keyup",function(t){var e=c(this),o=e.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=e.data("wpglobus-customize-control"),WPGlobusCustomize.controlInstances[o]),void 0===c(document).triggerHandler("wpglobus_customize_control_keyup",[e,o])&&("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=u.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,e.val(),WPGlobusCoreData.language))}),c(document).on("keyup",".wpglobus-customize-widget-control",function(t){var e=c(this),o=e.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[e.attr("id")].value,e.val(),WPGlobusCoreData.language))}),c(document).on("mouseenter","#save",function(t){c.each(WPGlobusCustomize.controlInstances,function(t,e){if(e.userControl.enabled){var o=wp.customize.control.instance(t);"tinymce"==e.type&&tinymce.get(t).setContent(e.setting,{format:"raw"}),o.setting.set(e.setting),e.element.val(o.setting())}})}).on("mouseleave","#save",function(t){u.instancesKeep||(u.updateElements(),wp.customize.previewer.refresh())}),c("#save").on("click",function(t){u.instancesKeep=!0}),c(document).on("ajaxSend",function(t,e,o){void 0!==o.data&&-1!=o.data.indexOf("wp_customize=on")&&-1!=o.data.indexOf("action=customize_save")&&(u.customizeSave=!0)}),c(document).on("ajaxComplete",function(t,n){void 0!==n.responseText&&(u.customizeSave?(u.updateElements(!1),u.instancesKeep&&(u.instancesKeep=!1)):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(u.action="customizerAjaxComplete",u.setControlInstances()),c.each(WPGlobusCustomize.controlWidgets,function(t,e){var o=t.replace("_","-");if(0<=n.responseText.indexOf(o))return e.submit.css({display:"block"}),e.control.liveUpdateMode=!1,c.each(e.element,function(t,e){c("#"+t).val(WPGlobusCore.TextFilter(e.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),e.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(e.control.setting().title,WPGlobusCustomize.languageAdmin)),u.widgetKeep=!1})),u.customizeSave=!1,wp.customize.previewer.refresh())})}};WPGlobusCustomize=c.extend({},WPGlobusCustomize,u),WPGlobusCustomize.init()});
|
includes/js/wpglobus-customize-control190.js
CHANGED
@@ -447,6 +447,20 @@ jQuery(document).ready(function ($) {
|
|
447 |
*/
|
448 |
return true;
|
449 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
450 |
|
451 |
api.controlInstances[obj] = {};
|
452 |
api.controlInstances[obj]['element'] = element;
|
447 |
*/
|
448 |
return true;
|
449 |
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* @todo W.I.P
|
453 |
+
* Prevent using element with no id attribute.
|
454 |
+
* @since 2.2.28
|
455 |
+
* For example, the "Homepage section" -> "Slider section" -> "Default" option and
|
456 |
+
* the "Typography" -> "Sections" in
|
457 |
+
* @link https://wordpress.org/themes/startkit/
|
458 |
+
*/
|
459 |
+
if ( 'undefined' === typeof element.attr('id') ) {
|
460 |
+
//console.log( 'control.section:: ', control.section() );
|
461 |
+
//console.log( 'element:: ', element );
|
462 |
+
//return true;
|
463 |
+
}
|
464 |
|
465 |
api.controlInstances[obj] = {};
|
466 |
api.controlInstances[obj]['element'] = element;
|
includes/js/wpglobus-customize-control190.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(a){"use strict";var u={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,customizeSave:!1,selectorHtml:"",settingsSectionExpand:function(){a(document).triggerHandler("wpglobus_fields_settings_section_expand",[this,u])},init:function(e){u.selectorHtml=WPGlobusCustomize.selector_html,u.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(a.each(WPGlobusCoreData.enabled_languages,function(e,t){u.languages[e]=t,u.length=e}),u.addLanguageSelector(),u.setControlInstances(),u.setFieldsSection(),u.attachListeners(),u.setTinymce())},updateTinymce:function(e){"tinymce"==WPGlobusCustomize.controlInstances[this.id].type&&(WPGlobusCustomize.controlInstances[this.id].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[this.id].setting,e.target.textContent,WPGlobusCoreData.language))},setTinymce:function(e){a(document).on("tinymce-editor-init",function(e,t){"object"==typeof u.controlInstances[t.id]&&(u.controlInstances[t.id].type="tinymce",a(t.iframeElement).addClass("wpglobus-customize-control").css({width:"99%"}),t.on("input",_.debounce(u.updateTinymce,300)))})},getSize:function(e){return void 0===e?_.size(u.controlInstances):"widget"==e?_.size(u.controlWidgets):null},setFieldsSection:function(){var o={},n=a(".wpglobus-fields_settings_control_box").data("section-template"),s="",l="",i="";a.each(WPGlobusCustomize.controlInstances,function(e,t){void 0===o[t.section]&&(o[t.section]={}),o[t.section][e]=t}),a.each(o,function(e,t){if(l="<ul>",a.each(t,function(e,t){i=t.userControl.enabled?" checked ":"",l+='<li id="'+t.fieldSettings.itemID+'">',l+='<input id="'+t.fieldSettings.cbID+'" data-control="'+e+'" class="wpglobus-customize-cb-control" type="checkbox"'+i+' /> <span class="wpglobus-cb-control-title">'+t.title+"</span>",l+="</li>"}),l+="</ul>",void 0===wp.customize.section(e))return!0;s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(e).params.title)).replace(/{{section}}/g,e)).replace("{{section_id}}",'"'+e+'"')).replace("{{items}}",l),a(s).insertBefore(a("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),a("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),a(WPGlobusCustomizeOptions.helpButton).insertAfter(a("#accordion-section-wpglobus_fields_settings_section .customize-action")),a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),a(document).on("click","."+WPGlobusCustomizeOptions.userControlIconClass,function(e){var o=a(this).data("section");a(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(e,t){o==a(t).data("section")?a(this).css({display:"block"}):a(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand})}),a(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(e){a("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(e,t){var o=t.controlSelector+" "+t.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+t.section+'" style="position:absolute;right:0px;cursor:pointer;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';a(n).insertBefore(o),t.userControl.enabled||(1<a(o).length?a(o).each(function(e,t){a(t).removeClass(WPGlobusCustomize.controlClass)}):a(o).removeClass(WPGlobusCustomize.controlClass).val(t.setting))},ctrlMenuItemsCallback:function(e,t){},ctrlWidgetCallback:function(l,i){if(u.action=!1,void 0===u.controlWidgets[l].element){void 0===i&&(i=wp.customize.control.instance(l)),u.controlWidgets[l].element={},u.controlWidgets[l].control=i,u.controlWidgets[l].inWidgetTitle=i.container.find(".in-widget-title"),u.controlWidgets[l].parent=i.selector;var e=i.container.find("input[type=submit]");0!=e.length&&(e.css({display:"block"}),e.attr("data-widget",l),u.controlWidgets[l].submit=e,u.attachWidgetListeners(u.controlWidgets[l])),i.liveUpdateMode=!1,void 0===i.setting().title?u.controlWidgets[l].inWidgetTitle.text(""):u.controlWidgets[l].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(i.setting().title,WPGlobusCustomize.languageAdmin)),a.each(WPGlobusCustomize.elementSelector,function(e,n){var s=i.container.find(n);0!=s.length&&a.each(s,function(e,t){if(void 0===t.id||""==t.id)return!0;var o=a(s[e]);void 0===u.controlWidgets[l].element[t.id]&&(u.controlWidgets[l].element[t.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",l),u.controlWidgets[l].element[t.id].element=o,u.controlWidgets[l].element[t.id].setting=i.setting(),u.controlWidgets[l].element[t.id].selector=n,u.controlWidgets[l].element[t.id].value=t.defaultValue,o.val(WPGlobusCore.TextFilter(t.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),a(document).triggerHandler("wpglobus_customize_control_added_widget",[l])}},ctrlCallback:function(o,l,e){var n=!1;if(a.each(WPGlobusCustomize.disabledSections,function(e,t){if(o.section()==t)return!(n=!0)}),!n&&(a.each(WPGlobusCustomize.disabledSettingMask,function(e,t){if(0<=l.indexOf(t))return!(n=!0)}),!n)){var i=wp.customize.control.instance(l);if(0<=l.indexOf("widget"))return void 0===u.controlWidgets[l]&&(u.controlWidgets[l]={},u.action&&u.ctrlWidgetCallback(l,i)),u.controlWidgets[l].parent=i.selector,1!=a(i.selector).length?u.controlWidgets[l].observer=null:(u.controlWidgets[l].observer=new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&-1!=e.target.className.indexOf("expanding")&&u.ctrlWidgetCallback(l)})}),u.controlWidgets[l].observer.observe(document.querySelector(u.controlWidgets[l].parent),{attributes:!0,childList:!0,characterData:!0})),!1;if(void 0===u.controlInstances[l]){var c=!0;a.each(WPGlobusCustomize.elementSelector,function(e,t){var s=i.container.find(t);if(0!=s.length){if("function"!=typeof i.setting)return!0;u.controlInstances[l]={},u.controlInstances[l].element=s,u.controlInstances[l].elementID=s.attr("id")?"#"+s.attr("id"):void 0,u.controlInstances[l].setting=i.setting(),u.controlInstances[l].settingType=typeof i.setting(),u.controlInstances[l].selector=t,u.controlInstances[l].controlSelector=i.selector,u.controlInstances[l].type="",u.controlInstances[l].section=i.section(),u.controlInstances[l].title=null,u.controlInstances[l].userControl=null,u.controlInstances[l].fieldSettings={},u.controlInstances[l].fieldSettings.itemID="item-wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(l),u.controlInstances[l].fieldSettings.cbID="wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(l),a.each(WPGlobusCustomize.setLinkBy,function(e,t){if(0<=l.indexOf(t)){if(u.controlInstances[l].type="link",""==u.controlInstances[l].setting&&(u.controlInstances[l].setting=s[0].defaultValue),WPGlobusCustomize.changeset_uuid){var o=wp.customize.control(l).setting();if(-1!==o.indexOf("|||")){var n=u.getTranslations(o);wp.customize.control(l).setting(n[WPGlobusCoreData.default_language]),a(WPGlobusCustomize.controlInstances[l].controlSelector+" "+WPGlobusCustomize.controlInstances[l].selector).val(n[WPGlobusCoreData.default_language])}}s.addClass("wpglobus-control-link")}}),""===u.controlInstances[l].type&&(u.controlInstances[l].type="textarea"==t?"textarea":"text"),"string"==u.controlInstances[l].settingType&&""!=u.controlInstances[l].setting&&s.val(WPGlobusCore.TextFilter(u.controlInstances[l].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),s.addClass("wpglobus-customize-control"),s.attr("data-wpglobus-customize-control",u.controlInstances[l].controlSelector.replace("#customize-control-","")),s.attr("data-wpglobus-customize-control-setting-type",u.controlInstances[l].settingType),"link"==u.controlInstances[l].type&&(u.controlInstances[l].setting=u.convertString(s[0].defaultValue)),u.controlInstances[l].title=i.params.label,null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][l]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][l]&&(c=!1),u.controlInstances[l].userControl={},u.controlInstances[l].userControl.enabled=c,u.setUserControls(l,u.controlInstances[l])}})}}},setControlInstances:function(){wp.customize.control.each(u.ctrlCallback)},setTitle:function(){a(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(e){if(void 0===e)return e;var o=[],t=WPGlobusCore.getTranslations(e),n=0,s=!0;return e==t[WPGlobusCoreData.default_language]?e:(a.each(t,function(e,t){o[n]=""==t?"null":(s=!1,t),n++}),s?"":o.join("|||"))},getTranslations:function(e){if(void 0===e)return e;var o={},n=e.split("|||");return a.each(WPGlobusCoreData.enabled_languages,function(e,t){o[t]=void 0===n[e]||"null"===n[e]?"":n[e]}),o},getString:function(e,o,n){if(void 0===e)return e;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var t=u.getTranslations(e),s=[],l=0,i=!0;return a.each(t,function(e,t){e==n?(o=o.trim(),s[l]=""==o?"null":o):s[l]=""==t?"null":t,e!=WPGlobusCoreData.default_language&&"null"!=s[l]&&(i=!1),l++}),s=i?s[0]:s.join("|||")},addLanguageSelector:function(){"dropdown"!=WPGlobusCustomize.selectorType?(a(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),a(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).on("click",".wpglobus-customize-selector",function(e){u.index>u.length-1?u.index=0:u.index++,WPGlobusCoreData.language=u.languages[u.index],a(this).html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),a(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),u.setControlsValue()})):u.addLanguageSelectorDropdown()},addLanguageSelectorDropdown:function(){a(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),a(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language));var e=a(".wpglobus-customize-selector").offset(),t=e.top+46;t+="px;";var o=e.left+"px;",n=0,s='<ul class="wpglobus-customize-selector-dropdown" style="display:none;position:fixed;width:46px;border-left:1px solid #ddd;border-right:1px solid #ddd;background-color:#eee;margin:-1px 0 0;padding:0;top:'+t+"left:"+o+'">';a.each(WPGlobusCoreData.enabled_languages,function(e,t){s+='<li class="item" style="text-align:center;cursor:pointer;border-bottom:1px solid #ddd;margin:0;" data-language="'+t+'">',s+='<span class="value value-'+t+'" style="font-size:15px;">'+t+"</span>",s+="</li>"}),s+='<li class="item wpglobus-customize-item-settings" style="text-align:center;cursor:pointer;border-bottom:1px solid #ddd;margin:0;"><span style="padding-top:14px;" class="dashicons dashicons-admin-tools"></span></li>',s+="</ul>",a(".wpglobus-customize-selector").after(s),a(document).on("mouseenter",".wpglobus-customize-selector",function(e){a(".wpglobus-customize-selector-dropdown").css({display:"block"}),n=e.screenY}),a(document).on("mouseleave",".wpglobus-customize-selector",function(e){0!=n&&e.screenY-n<=0&&a(".wpglobus-customize-selector-dropdown").css({display:"none"})}),a(document).on("mouseleave",".wpglobus-customize-selector-dropdown",function(e){a(".wpglobus-customize-selector-dropdown").css({display:"none"})}),a(document).on("mouseenter",".wpglobus-customize-selector-dropdown .item",function(e){var t=a(this),o=t.data("language");t.addClass("active"),t.css({"background-color":"#fff"}),t.find(".value-"+o).css({"font-weight":"bold"})}),a(document).on("mouseleave",".wpglobus-customize-selector-dropdown .item",function(e){var t=a(this);t.removeClass("active"),t.css({"background-color":"#eee"}),a(this).find(".value").css({"font-weight":""})}),a(document).on("click",".wpglobus-customize-selector-dropdown .item",function(e){var t=a(this).data("language");void 0!==t&&t!=a(".wpglobus-customize-selector").data("language")&&u.languageChanged(t)}),a(document).on("click",".wpglobus-customize-item-settings",function(e){wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand}),a(".wpglobus-customize-selector-dropdown").css({display:"none"})})},languageChanged:function(e){WPGlobusCoreData.language=e,a(".wpglobus-customize-selector").data("language",e),a(".wpglobus-customize-selector .current-language").text(e),a(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),u.setControlsValue()},setControlsValue:function(){a(".wpglobus-customize-control").each(function(e,t){var o=a(t),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=u.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else if("object"!=WPGlobusCustomize.controlInstances[n].settingType&&"number"!=WPGlobusCustomize.controlInstances[n].settingType){s=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY");"tinymce"==WPGlobusCustomize.controlInstances[n].type&&tinymce.get(n).setContent(s,{format:"raw"}),o.val(WPGlobusCore.TextFilter(s,"RETURN_EMPTY"))}}),a(".wpglobus-customize-widget-control").each(function(e,t){var o=a(t),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})},updateElements:function(s){void 0===s&&(s=!0),a.each(WPGlobusCustomize.controlInstances,function(e,t){if(!t.userControl.enabled)return!0;var o=wp.customize.control.instance(e);if("link"==t.type){var n=u.getTranslations(WPGlobusCustomize.controlInstances[e].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),t.element.val(o.setting())):t.element.val(n[WPGlobusCoreData.language])}else if("tinymce"==t.type){n=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY");tinymce.get(e).setContent(n,{format:"raw"}),t.element.val(n)}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),t.element.val(o.setting())):t.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(e){"mouseenter"==e.type?a.each(u.controlWidgets[a(this).data("widget")].element,function(e,t){a("#"+e).val(t.value)}):"mouseleave"==e.type?u.widgetKeep||a.each(u.controlWidgets[a(this).data("widget")].element,function(e,t){a("#"+e).val(WPGlobusCore.TextFilter(t.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==e.type&&(u.widgetKeep=!0)},attachWidgetListeners:function(e){void 0!==e.submit[0].id&&a(document).on("mouseenter","#"+e.submit[0].id,u.onSubmitEvents).on("mouseleave","#"+e.submit[0].id,u.onSubmitEvents).on("click","#"+e.submit[0].id,u.onSubmitEvents)},attachListeners:function(){a(".wpglobus-customize-control").on("keyup",function(e){var t=a(this),o=t.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=t.data("wpglobus-customize-control"),WPGlobusCustomize.controlInstances[o]),void 0===a(document).triggerHandler("wpglobus_customize_control_keyup",[t,o])&&("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=u.getString(WPGlobusCustomize.controlInstances[o].setting,t.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,t.val(),WPGlobusCoreData.language))}),a(document).on("keyup",".wpglobus-customize-widget-control",function(e){var t=a(this),o=t.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[t.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[t.attr("id")].value,t.val(),WPGlobusCoreData.language))}),a(document).on("mouseenter","#save",function(e){a.each(WPGlobusCustomize.controlInstances,function(e,t){if(t.userControl.enabled){var o=wp.customize.control.instance(e);"tinymce"==t.type&&tinymce.get(e).setContent(t.setting,{format:"raw"}),o.setting.set(t.setting),t.element.val(o.setting())}})}).on("mouseleave","#save",function(e){u.instancesKeep||(u.updateElements(),wp.customize.previewer.refresh())}),a("#save").on("click",function(e){u.instancesKeep=!0}),a(document).on("ajaxSend",function(e,t,o){void 0!==o.data&&-1!=o.data.indexOf("wp_customize=on")&&-1!=o.data.indexOf("action=customize_save")&&(u.customizeSave=!0)}),a(document).on("ajaxComplete",function(e,n){void 0!==n.responseText&&(u.customizeSave?(u.updateElements(!1),u.instancesKeep&&(u.instancesKeep=!1)):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(u.action="customizerAjaxComplete",u.setControlInstances()),a.each(WPGlobusCustomize.controlWidgets,function(e,t){var o=e.replace("_","-");if(0<=n.responseText.indexOf(o))return t.submit.css({display:"block"}),t.control.liveUpdateMode=!1,a.each(t.element,function(e,t){a("#"+e).val(WPGlobusCore.TextFilter(t.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),t.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(t.control.setting().title,WPGlobusCustomize.languageAdmin)),u.widgetKeep=!1})),u.customizeSave=!1,wp.customize.previewer.refresh())})}};WPGlobusCustomize=a.extend({},WPGlobusCustomize,u),WPGlobusCustomize.init()});
|
1 |
+
jQuery(document).ready(function(c){"use strict";var u={languages:{},index:0,length:0,controlInstances:{},controlWidgets:{},instancesKeep:!1,widgetKeep:!1,action:!1,customizeSave:!1,selectorHtml:"",settingsSectionExpand:function(){c(document).triggerHandler("wpglobus_fields_settings_section_expand",[this,u])},init:function(e){u.selectorHtml=WPGlobusCustomize.selector_html,u.setTitle(),"false"!=WPGlobusCustomizeOptions.themeEnabled&&(c.each(WPGlobusCoreData.enabled_languages,function(e,t){u.languages[e]=t,u.length=e}),u.addLanguageSelector(),u.setControlInstances(),u.setFieldsSection(),u.attachListeners(),u.setTinymce())},updateTinymce:function(e){"tinymce"==WPGlobusCustomize.controlInstances[this.id].type&&(WPGlobusCustomize.controlInstances[this.id].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[this.id].setting,e.target.textContent,WPGlobusCoreData.language))},setTinymce:function(e){c(document).on("tinymce-editor-init",function(e,t){"object"==typeof u.controlInstances[t.id]&&(u.controlInstances[t.id].type="tinymce",c(t.iframeElement).addClass("wpglobus-customize-control").css({width:"99%"}),t.on("input",_.debounce(u.updateTinymce,300)))})},getSize:function(e){return void 0===e?_.size(u.controlInstances):"widget"==e?_.size(u.controlWidgets):null},setFieldsSection:function(){var o={},n=c(".wpglobus-fields_settings_control_box").data("section-template"),s="",l="",i="";c.each(WPGlobusCustomize.controlInstances,function(e,t){void 0===o[t.section]&&(o[t.section]={}),o[t.section][e]=t}),c.each(o,function(e,t){if(l="<ul>",c.each(t,function(e,t){i=t.userControl.enabled?" checked ":"",l+='<li id="'+t.fieldSettings.itemID+'">',l+='<input id="'+t.fieldSettings.cbID+'" data-control="'+e+'" class="wpglobus-customize-cb-control" type="checkbox"'+i+' /> <span class="wpglobus-cb-control-title">'+t.title+"</span>",l+="</li>"}),l+="</ul>",void 0===wp.customize.section(e))return!0;s=(s=(s=(s=n.replace("{{section_title}}",wp.customize.section(e).params.title)).replace(/{{section}}/g,e)).replace("{{section_id}}",'"'+e+'"')).replace("{{items}}",l),c(s).insertBefore(c("#"+WPGlobusCustomizeOptions.userControlSaveButton))}),c("#accordion-section-wpglobus_fields_settings_section").css({"margin-top":"15px"}),c(WPGlobusCustomizeOptions.helpButton).insertAfter(c("#accordion-section-wpglobus_fields_settings_section .customize-action")),c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").addClass("hidden"),c(document).on("click","."+WPGlobusCustomizeOptions.userControlIconClass,function(e){var o=c(this).data("section");c(WPGlobusCustomizeOptions.userControlBoxSelector).each(function(e,t){o==c(t).data("section")?c(this).css({display:"block"}):c(this).css({display:"none"})}),wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand})}),c(".wpglobus-customize-icon-help.customize-help-toggle").on("click",function(e){c("#accordion-section-wpglobus_fields_settings_section .customize-section-description").toggleClass("hidden")})},setUserControls:function(e,t){var o=t.controlSelector+" "+t.selector,n='<img class="'+WPGlobusCustomizeOptions.userControlIconClass+'" data-section="'+t.section+'" style="position:absolute;right:0px;cursor:pointer;" src="'+WPGlobusCustomizeOptions.userControlIcon+'" />';c(n).insertBefore(o),t.userControl.enabled||(1<c(o).length?c(o).each(function(e,t){c(t).removeClass(WPGlobusCustomize.controlClass)}):c(o).removeClass(WPGlobusCustomize.controlClass).val(t.setting))},ctrlMenuItemsCallback:function(e,t){},ctrlWidgetCallback:function(l,i){if(u.action=!1,void 0===u.controlWidgets[l].element){void 0===i&&(i=wp.customize.control.instance(l)),u.controlWidgets[l].element={},u.controlWidgets[l].control=i,u.controlWidgets[l].inWidgetTitle=i.container.find(".in-widget-title"),u.controlWidgets[l].parent=i.selector;var e=i.container.find("input[type=submit]");0!=e.length&&(e.css({display:"block"}),e.attr("data-widget",l),u.controlWidgets[l].submit=e,u.attachWidgetListeners(u.controlWidgets[l])),i.liveUpdateMode=!1,void 0===i.setting().title?u.controlWidgets[l].inWidgetTitle.text(""):u.controlWidgets[l].inWidgetTitle.text(": "+WPGlobusCore.TextFilter(i.setting().title,WPGlobusCustomize.languageAdmin)),c.each(WPGlobusCustomize.elementSelector,function(e,n){var s=i.container.find(n);0!=s.length&&c.each(s,function(e,t){if(void 0===t.id||""==t.id)return!0;var o=c(s[e]);void 0===u.controlWidgets[l].element[t.id]&&(u.controlWidgets[l].element[t.id]={}),o.addClass("wpglobus-customize-widget-control"),o.attr("data-widget",l),u.controlWidgets[l].element[t.id].element=o,u.controlWidgets[l].element[t.id].setting=i.setting(),u.controlWidgets[l].element[t.id].selector=n,u.controlWidgets[l].element[t.id].value=t.defaultValue,o.val(WPGlobusCore.TextFilter(t.defaultValue,WPGlobusCoreData.language,"RETURN_EMPTY"))})}),c(document).triggerHandler("wpglobus_customize_control_added_widget",[l])}},ctrlCallback:function(o,l,e){var n=!1;if(c.each(WPGlobusCustomize.disabledSections,function(e,t){if(o.section()==t)return!(n=!0)}),!n&&(c.each(WPGlobusCustomize.disabledSettingMask,function(e,t){if(0<=l.indexOf(t))return!(n=!0)}),!n)){var i=wp.customize.control.instance(l);if(0<=l.indexOf("widget"))return void 0===u.controlWidgets[l]&&(u.controlWidgets[l]={},u.action&&u.ctrlWidgetCallback(l,i)),u.controlWidgets[l].parent=i.selector,1!=c(i.selector).length?u.controlWidgets[l].observer=null:(u.controlWidgets[l].observer=new MutationObserver(function(e){e.forEach(function(e){"class"==e.attributeName&&-1!=e.target.className.indexOf("expanding")&&u.ctrlWidgetCallback(l)})}),u.controlWidgets[l].observer.observe(document.querySelector(u.controlWidgets[l].parent),{attributes:!0,childList:!0,characterData:!0})),!1;if(void 0===u.controlInstances[l]){var a=!0;c.each(WPGlobusCustomize.elementSelector,function(e,t){var s=i.container.find(t);if(0!=s.length){if("function"!=typeof i.setting)return!0;s.attr("id"),u.controlInstances[l]={},u.controlInstances[l].element=s,u.controlInstances[l].elementID=s.attr("id")?"#"+s.attr("id"):void 0,u.controlInstances[l].setting=i.setting(),u.controlInstances[l].settingType=typeof i.setting(),u.controlInstances[l].selector=t,u.controlInstances[l].controlSelector=i.selector,u.controlInstances[l].type="",u.controlInstances[l].section=i.section(),u.controlInstances[l].title=null,u.controlInstances[l].userControl=null,u.controlInstances[l].fieldSettings={},u.controlInstances[l].fieldSettings.itemID="item-wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(l),u.controlInstances[l].fieldSettings.cbID="wpglobus-cb-control-"+WPGlobusDialogApp.convertToId(l),c.each(WPGlobusCustomize.setLinkBy,function(e,t){if(0<=l.indexOf(t)){if(u.controlInstances[l].type="link",""==u.controlInstances[l].setting&&(u.controlInstances[l].setting=s[0].defaultValue),WPGlobusCustomize.changeset_uuid){var o=wp.customize.control(l).setting();if(-1!==o.indexOf("|||")){var n=u.getTranslations(o);wp.customize.control(l).setting(n[WPGlobusCoreData.default_language]),c(WPGlobusCustomize.controlInstances[l].controlSelector+" "+WPGlobusCustomize.controlInstances[l].selector).val(n[WPGlobusCoreData.default_language])}}s.addClass("wpglobus-control-link")}}),""===u.controlInstances[l].type&&(u.controlInstances[l].type="textarea"==t?"textarea":"text"),"string"==u.controlInstances[l].settingType&&""!=u.controlInstances[l].setting&&s.val(WPGlobusCore.TextFilter(u.controlInstances[l].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),s.addClass("wpglobus-customize-control"),s.attr("data-wpglobus-customize-control",u.controlInstances[l].controlSelector.replace("#customize-control-","")),s.attr("data-wpglobus-customize-control-setting-type",u.controlInstances[l].settingType),"link"==u.controlInstances[l].type&&(u.controlInstances[l].setting=u.convertString(s[0].defaultValue)),u.controlInstances[l].title=i.params.label,null!==WPGlobusCustomizeOptions.userControl&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName]&&void 0!==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][l]&&"disable"==WPGlobusCustomizeOptions.userControl[WPGlobusCustomizeOptions.themeName][l]&&(a=!1),u.controlInstances[l].userControl={},u.controlInstances[l].userControl.enabled=a,u.setUserControls(l,u.controlInstances[l])}})}}},setControlInstances:function(){wp.customize.control.each(u.ctrlCallback)},setTitle:function(){c(WPGlobusCoreData.customize.info.element).html(WPGlobusCoreData.customize.info.html)},convertString:function(e){if(void 0===e)return e;var o=[],t=WPGlobusCore.getTranslations(e),n=0,s=!0;return e==t[WPGlobusCoreData.default_language]?e:(c.each(t,function(e,t){""==t?o[n]="null":(s=!1,o[n]=t),n++}),s?"":o.join("|||"))},getTranslations:function(e){if(void 0===e)return e;var o={},n=e.split("|||");return c.each(WPGlobusCoreData.enabled_languages,function(e,t){o[t]=void 0===n[e]||"null"===n[e]?"":n[e]}),o},getString:function(e,o,n){if(void 0===e)return e;void 0===o&&(o=""),void 0===n&&(n=WPGlobusCoreData.language);var t=u.getTranslations(e),s=[],l=0,i=!0;return c.each(t,function(e,t){e==n?(o=o.trim(),s[l]=""==o?"null":o):s[l]=""==t?"null":t,e!=WPGlobusCoreData.default_language&&"null"!=s[l]&&(i=!1),l++}),s=i?s[0]:s.join("|||")},addLanguageSelector:function(){"dropdown"!=WPGlobusCustomize.selectorType?(c(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),c(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).on("click",".wpglobus-customize-selector",function(e){u.index>u.length-1?u.index=0:u.index++,WPGlobusCoreData.language=u.languages[u.index],c(this).html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language)),c(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),u.setControlsValue()})):u.addLanguageSelectorDropdown()},addLanguageSelectorDropdown:function(){c(WPGlobusCustomize.selectorButton).insertAfter(".customize-controls-preview-toggle"),c(".wpglobus-customize-selector").html(u.selectorHtml.replace("{{language}}",WPGlobusCoreData.language));var e=c(".wpglobus-customize-selector").offset(),t=e.top+46;t+="px;";var o=e.left+"px;",n=0,s='<ul class="wpglobus-customize-selector-dropdown" style="display:none;position:fixed;width:46px;border-left:1px solid #ddd;border-right:1px solid #ddd;background-color:#eee;margin:-1px 0 0;padding:0;top:'+t+"left:"+o+'">';c.each(WPGlobusCoreData.enabled_languages,function(e,t){s+='<li class="item" style="text-align:center;cursor:pointer;border-bottom:1px solid #ddd;margin:0;" data-language="'+t+'">',s+='<span class="value value-'+t+'" style="font-size:15px;">'+t+"</span>",s+="</li>"}),s+='<li class="item wpglobus-customize-item-settings" style="text-align:center;cursor:pointer;border-bottom:1px solid #ddd;margin:0;"><span style="padding-top:14px;" class="dashicons dashicons-admin-tools"></span></li>',s+="</ul>",c(".wpglobus-customize-selector").after(s),c(document).on("mouseenter",".wpglobus-customize-selector",function(e){c(".wpglobus-customize-selector-dropdown").css({display:"block"}),n=e.screenY}),c(document).on("mouseleave",".wpglobus-customize-selector",function(e){0!=n&&e.screenY-n<=0&&c(".wpglobus-customize-selector-dropdown").css({display:"none"})}),c(document).on("mouseleave",".wpglobus-customize-selector-dropdown",function(e){c(".wpglobus-customize-selector-dropdown").css({display:"none"})}),c(document).on("mouseenter",".wpglobus-customize-selector-dropdown .item",function(e){var t=c(this),o=t.data("language");t.addClass("active"),t.css({"background-color":"#fff"}),t.find(".value-"+o).css({"font-weight":"bold"})}),c(document).on("mouseleave",".wpglobus-customize-selector-dropdown .item",function(e){var t=c(this);t.removeClass("active"),t.css({"background-color":"#eee"}),c(this).find(".value").css({"font-weight":""})}),c(document).on("click",".wpglobus-customize-selector-dropdown .item",function(e){var t=c(this).data("language");void 0!==t&&t!=c(".wpglobus-customize-selector").data("language")&&u.languageChanged(t)}),c(document).on("click",".wpglobus-customize-item-settings",function(e){wp.customize.control("wpglobus_fields_settings_section").expand({completeCallback:u.settingsSectionExpand}),c(".wpglobus-customize-selector-dropdown").css({display:"none"})})},languageChanged:function(e){WPGlobusCoreData.language=e,c(".wpglobus-customize-selector").data("language",e),c(".wpglobus-customize-selector .current-language").text(e),c(document).triggerHandler("wpglobus_customize_control_language",[WPGlobusCoreData.language]),u.setControlsValue()},setControlsValue:function(){c(".wpglobus-customize-control").each(function(e,t){var o=c(t),n=o.data("customize-setting-link");if(void 0!==WPGlobusCustomize.controlInstances[n]||(n=o.data("wpglobus-customize-control"),void 0!==WPGlobusCustomize.controlInstances[n]))if(o.hasClass("wpglobus-control-link")){var s=u.getTranslations(WPGlobusCustomize.controlInstances[n].setting);o.val(s[WPGlobusCoreData.language])}else if("object"!=WPGlobusCustomize.controlInstances[n].settingType&&"number"!=WPGlobusCustomize.controlInstances[n].settingType){s=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[n].setting,WPGlobusCoreData.language,"RETURN_EMPTY");"tinymce"==WPGlobusCustomize.controlInstances[n].type&&tinymce.get(n).setContent(s,{format:"raw"}),o.val(WPGlobusCore.TextFilter(s,"RETURN_EMPTY"))}}),c(".wpglobus-customize-widget-control").each(function(e,t){var o=c(t),n=o.data("widget");if(void 0===o.attr("id"))return!0;o.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlWidgets[n].element[o.attr("id")].value,WPGlobusCoreData.language,"RETURN_EMPTY"))})},updateElements:function(s){void 0===s&&(s=!0),c.each(WPGlobusCustomize.controlInstances,function(e,t){if(!t.userControl.enabled)return!0;var o=wp.customize.control.instance(e);if("link"==t.type){var n=u.getTranslations(WPGlobusCustomize.controlInstances[e].setting);s?(o.setting.set(n[WPGlobusCoreData.language]),t.element.val(o.setting())):t.element.val(n[WPGlobusCoreData.language])}else if("tinymce"==t.type){n=WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY");tinymce.get(e).setContent(n,{format:"raw"}),t.element.val(n)}else s?(o.setting.set(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY")),t.element.val(o.setting())):t.element.val(WPGlobusCore.TextFilter(WPGlobusCustomize.controlInstances[e].setting,WPGlobusCoreData.language,"RETURN_EMPTY"))})},onSubmitEvents:function(e){"mouseenter"==e.type?c.each(u.controlWidgets[c(this).data("widget")].element,function(e,t){c("#"+e).val(t.value)}):"mouseleave"==e.type?u.widgetKeep||c.each(u.controlWidgets[c(this).data("widget")].element,function(e,t){c("#"+e).val(WPGlobusCore.TextFilter(t.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}):"click"==e.type&&(u.widgetKeep=!0)},attachWidgetListeners:function(e){void 0!==e.submit[0].id&&c(document).on("mouseenter","#"+e.submit[0].id,u.onSubmitEvents).on("mouseleave","#"+e.submit[0].id,u.onSubmitEvents).on("click","#"+e.submit[0].id,u.onSubmitEvents)},attachListeners:function(){c(".wpglobus-customize-control").on("keyup",function(e){var t=c(this),o=t.data("customize-setting-link");void 0===WPGlobusCustomize.controlInstances[o]&&(o=t.data("wpglobus-customize-control"),WPGlobusCustomize.controlInstances[o]),void 0===c(document).triggerHandler("wpglobus_customize_control_keyup",[t,o])&&("link"==WPGlobusCustomize.controlInstances[o].type?WPGlobusCustomize.controlInstances[o].setting=u.getString(WPGlobusCustomize.controlInstances[o].setting,t.val(),WPGlobusCoreData.language):WPGlobusCustomize.controlInstances[o].setting=WPGlobusCore.getString(WPGlobusCustomize.controlInstances[o].setting,t.val(),WPGlobusCoreData.language))}),c(document).on("keyup",".wpglobus-customize-widget-control",function(e){var t=c(this),o=t.data("widget");void 0!==WPGlobusCustomize.controlWidgets[o]&&(WPGlobusCustomize.controlWidgets[o].element[t.attr("id")].value=WPGlobusCore.getString(WPGlobusCustomize.controlWidgets[o].element[t.attr("id")].value,t.val(),WPGlobusCoreData.language))}),c(document).on("mouseenter","#save",function(e){c.each(WPGlobusCustomize.controlInstances,function(e,t){if(t.userControl.enabled){var o=wp.customize.control.instance(e);"tinymce"==t.type&&tinymce.get(e).setContent(t.setting,{format:"raw"}),o.setting.set(t.setting),t.element.val(o.setting())}})}).on("mouseleave","#save",function(e){u.instancesKeep||(u.updateElements(),wp.customize.previewer.refresh())}),c("#save").on("click",function(e){u.instancesKeep=!0}),c(document).on("ajaxSend",function(e,t,o){void 0!==o.data&&-1!=o.data.indexOf("wp_customize=on")&&-1!=o.data.indexOf("action=customize_save")&&(u.customizeSave=!0)}),c(document).on("ajaxComplete",function(e,n){void 0!==n.responseText&&(u.customizeSave?(u.updateElements(!1),u.instancesKeep&&(u.instancesKeep=!1)):(0<=n.responseText.indexOf("WP_CUSTOMIZER_SIGNATURE")&&(u.action="customizerAjaxComplete",u.setControlInstances()),c.each(WPGlobusCustomize.controlWidgets,function(e,t){var o=e.replace("_","-");if(0<=n.responseText.indexOf(o))return t.submit.css({display:"block"}),t.control.liveUpdateMode=!1,c.each(t.element,function(e,t){c("#"+e).val(WPGlobusCore.TextFilter(t.value,WPGlobusCoreData.language,"RETURN_EMPTY"))}),t.inWidgetTitle.text(": "+WPGlobusCore.TextFilter(t.control.setting().title,WPGlobusCustomize.languageAdmin)),u.widgetKeep=!1})),u.customizeSave=!1,wp.customize.previewer.refresh())})}};WPGlobusCustomize=c.extend({},WPGlobusCustomize,u),WPGlobusCustomize.init()});
|
includes/options/fields/table/class-wpglobus-languages-table.php
CHANGED
@@ -159,8 +159,8 @@ class WPGlobus_Languages_Table extends WP_List_Table {
|
|
159 |
$this->prepare_items();
|
160 |
?>
|
161 |
<div id="wpglobus-options-<?php echo $this->field['id']; ?>" class="wpglobus-languages-table-wrapper wpglobus-options-field" data-js-handler="handler<?php echo ucfirst($this->field['id']); ?>">
|
162 |
-
<a id="wpglobus_add_language" href="<?php echo esc_url( WPGlobus_Language_Edit_Request::url_language_add() ); ?>" class="button button-primary">
|
163 |
-
<i class="dashicons dashicons-plus-alt" style="line-height:
|
164 |
<?php esc_html_e( 'Add new Language', 'wpglobus' ); ?>
|
165 |
</a>
|
166 |
|
159 |
$this->prepare_items();
|
160 |
?>
|
161 |
<div id="wpglobus-options-<?php echo $this->field['id']; ?>" class="wpglobus-languages-table-wrapper wpglobus-options-field" data-js-handler="handler<?php echo ucfirst($this->field['id']); ?>">
|
162 |
+
<a id="wpglobus_add_language" href="<?php echo esc_url( WPGlobus_Language_Edit_Request::url_language_add() ); ?>" class="button button-primary" style="height:36px;padding-top:3px;">
|
163 |
+
<i class="dashicons dashicons-plus-alt" style="line-height: initial;margin-top: 3px;"></i>
|
164 |
<?php esc_html_e( 'Add new Language', 'wpglobus' ); ?>
|
165 |
</a>
|
166 |
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2019 WPGlobus 2.2.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.2.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.2.
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
1 |
+
# Copyright (C) 2019 WPGlobus 2.2.28
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.2.28 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.2.28\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.2.27 =
|
222 |
|
223 |
* Added: (Vendor/Acf) If editor is hidden by ACF, we hide WPGlobus, too.
|
@@ -227,30 +232,6 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
227 |
* Fixed: (Core/Builders) Don't initialize the Builders class when initial attributes are empty.
|
228 |
* Internal: (Builders/Block Editor) Changed the admin bar builder label to `Block Editor`.
|
229 |
|
230 |
-
= 2.2.25 =
|
231 |
-
|
232 |
-
* Fixed: (Vendor/Yoast) Don't start JS if support module was not defined.
|
233 |
-
* Fixed: (Vendor/Yoast) Start the support module while the corresponding option is missing.
|
234 |
-
|
235 |
-
= 2.2.24 =
|
236 |
-
|
237 |
-
* Added: (Core/Builders) Check if block editor is used with specific post types.
|
238 |
-
|
239 |
-
= 2.2.23 =
|
240 |
-
|
241 |
-
* Internal: (Options) Moved theme info to `Customize` section.
|
242 |
-
* Internal: (Core) Get hidden post types from the corresponding class.
|
243 |
-
|
244 |
-
= 2.2.22 =
|
245 |
-
|
246 |
-
* Added: (Core/Media) Media files support for the standard and Builder modes.
|
247 |
-
* Added: (Vendor/Acf) Filter for the `Url` field type.
|
248 |
-
|
249 |
-
= 2.2.21 =
|
250 |
-
|
251 |
-
* Fixed: (Core) Uncaught `TypeError: WPGlobusYoastSeo.init is not a function`.
|
252 |
-
* Internal: (Builders/Gutenberg) Updated save post message.
|
253 |
-
|
254 |
= Earlier versions and Add-ons =
|
255 |
|
256 |
* [See the complete changelog here](https://github.com/WPGlobus/WPGlobus/blob/master/CHANGELOG.md)
|
218 |
|
219 |
== Changelog ==
|
220 |
|
221 |
+
= 2.2.28 =
|
222 |
+
|
223 |
+
* Added: (Options) new style for `Add new Language` button.
|
224 |
+
* Fixed: (Customizer) Disable sections to prevent using elements with no `id` attribute with the `Startkit` theme.
|
225 |
+
|
226 |
= 2.2.27 =
|
227 |
|
228 |
* Added: (Vendor/Acf) If editor is hidden by ACF, we hide WPGlobus, too.
|
232 |
* Fixed: (Core/Builders) Don't initialize the Builders class when initial attributes are empty.
|
233 |
* Internal: (Builders/Block Editor) Changed the admin bar builder label to `Block Editor`.
|
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.2.
|
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.2.
|
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.2.28
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
42 |
exit;
|
43 |
}
|
44 |
|
45 |
+
define( 'WPGLOBUS_VERSION', '2.2.28' );
|
46 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
47 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
48 |
|