Changeset 3384222
- Timestamp:
- 10/24/2025 08:12:07 PM (5 months ago)
- Location:
- cyr2lat
- Files:
-
- 4 added
- 30 edited
- 1 copied
-
assets/blueprints (added)
-
assets/blueprints/blueprint.json (added)
-
tags/6.5.0 (copied) (copied from cyr2lat/trunk)
-
tags/6.5.0/SECURITY.md (added)
-
tags/6.5.0/assets/js/acf-field-group.min.js (modified) (1 diff)
-
tags/6.5.0/assets/js/apps/converter.js (modified) (1 diff)
-
tags/6.5.0/assets/js/apps/tables.js (modified) (1 diff)
-
tags/6.5.0/assets/js/system-info.min.js (modified) (1 diff)
-
tags/6.5.0/changelog.txt (modified) (4 diffs)
-
tags/6.5.0/cyr-to-lat.php (modified) (2 diffs)
-
tags/6.5.0/readme.txt (modified) (9 diffs)
-
tags/6.5.0/src/php/ConversionTables.php (modified) (3 diffs)
-
tags/6.5.0/src/php/ErrorHandler.php (modified) (5 diffs)
-
tags/6.5.0/src/php/Main.php (modified) (9 diffs)
-
tags/6.5.0/src/php/Settings/SystemInfo.php (modified) (3 diffs)
-
tags/6.5.0/vendor/autoload.php (modified) (1 diff)
-
tags/6.5.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/6.5.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/6.5.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/SECURITY.md (added)
-
trunk/assets/js/acf-field-group.min.js (modified) (1 diff)
-
trunk/assets/js/apps/converter.js (modified) (1 diff)
-
trunk/assets/js/apps/tables.js (modified) (1 diff)
-
trunk/assets/js/system-info.min.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (4 diffs)
-
trunk/cyr-to-lat.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (9 diffs)
-
trunk/src/php/ConversionTables.php (modified) (3 diffs)
-
trunk/src/php/ErrorHandler.php (modified) (5 diffs)
-
trunk/src/php/Main.php (modified) (9 diffs)
-
trunk/src/php/Settings/SystemInfo.php (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cyr2lat/tags/6.5.0/assets/js/acf-field-group.min.js
r2882726 r3384222 1 !function(e,n,a){"use strict";var r=CyrToLatAcfFieldGroup.table,c=function(n){return e.each(r, (function(e,a){var r=new RegExp(e,"g");n=n.replace(r,a)})),n=(n=(n=(n=n.replace(/[^\w\d\-_]/g,"")).replace(/_+/g,"_")).replace(/^_?(.*)$/g,"$1")).replace(/^(.*)_$/g,"$1")};acf.addFilter("generate_field_object_name",(function(e){return c(e)})),e(a).on("change",".acf-field .field-name",(function(){if(e(this).is(":focus"))return!1;var n=e(this),a=n.val();(a=c(a))!==n.val()&&n.val(a)}))}(window.jQuery,window,document);1 !function(e,n,a){"use strict";var r=CyrToLatAcfFieldGroup.table,c=function(n){return e.each(r,function(e,a){var r=new RegExp(e,"g");n=n.replace(r,a)}),n=(n=(n=(n=n.replace(/[^\w\d\-_]/g,"")).replace(/_+/g,"_")).replace(/^_?(.*)$/g,"$1")).replace(/^(.*)_$/g,"$1")};acf.addFilter("generate_field_object_name",function(e){return c(e)}),e(a).on("change",".acf-field .field-name",function(){if(e(this).is(":focus"))return!1;var n=e(this),a=n.val();(a=c(a))!==n.val()&&n.val(a)})}(window.jQuery,window,document); -
cyr2lat/tags/6.5.0/assets/js/apps/converter.js
r3188005 r3384222 1 (()=>{"use strict";function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}function o(t,o){for(var e=0;e<o.length;e++){var i=o[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function n(o){var n=function(o,n){if("object"!=t(o)||!o)return o;var e=o[Symbol.toPrimitive];if(void 0!==e){var i=e.call(o,n||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(o)}(o,"string");return"symbol"==t(n)?n:n+""}const e=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t),this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.bindEvents()},(n=[{key:"bindEvents",value:function(){var t=this;document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(o){return o.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}}])&&o(t.prototype,n),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,e}();document.addEventListener("DOMContentLoaded", (function(){new e}))})();1 (()=>{"use strict";function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}function o(t,o){for(var e=0;e<o.length;e++){var i=o[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function n(o){var n=function(o,n){if("object"!=t(o)||!o)return o;var e=o[Symbol.toPrimitive];if(void 0!==e){var i=e.call(o,n||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(o)}(o,"string");return"symbol"==t(n)?n:n+""}const e=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t),this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.bindEvents()},(n=[{key:"bindEvents",value:function(){var t=this;document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(o){return o.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}}])&&o(t.prototype,n),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,e}();document.addEventListener("DOMContentLoaded",function(){new e})})(); -
cyr2lat/tags/6.5.0/assets/js/apps/tables.js
r3211834 r3384222 1 (()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var i=function(t,i){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i||"default");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==e(i)?i:i+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.addWrapper(),this.addMessageLines(),this.moveTabs(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus(),this.checkLocale()},i=[{key:"getHeaders",value:function(){return t(document.querySelectorAll(this.HEADER_SELECTOR))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return t(document.querySelectorAll(this.TABLE_SELECTOR))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input"))}},{key:"getLabels",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label"))}},{key:"getPlusButtons",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS))}},{key:"isActiveTableChanged",value:function(){var e=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[e])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"checkLocale",value:function(){var e=Cyr2LatTablesObject.ctlLocale;e="ru_RU"===e?"ISO9":e;var t=this.getActiveTableLocale();t!==e?this.showMessage(this.warningMessage,Cyr2LatTablesObject.localeWarning.replace("{active_table}",t)):this.clearMessage(this.warningMessage)}},{key:"saveActiveTable",value:function(){var e=this;if(this.isActiveTableChanged()){var i=this.getActiveTable(),n=document.createElement("form");n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(i.cloneNode(!0)),t(i.querySelectorAll("input")).map( (function(e){return n.querySelector("#"+e.id).value=e.value})),t(this.optionsForm.querySelectorAll('input[type="hidden"]')).map((function(e){return n.appendChild(e.cloneNode(!0))})),document.body.appendChild(n);var a=new URLSearchParams(t(new FormData(n)));return a.append("action",Cyr2LatTablesObject.action),a.append("nonce",Cyr2LatTablesObject.nonce),fetch(Cyr2LatTablesObject.ajaxUrl,{method:"POST",body:a}).then((function(e){if(!e.ok)throw new Error(e.statusText);return e.json()})).then((function(t){t.success?(e.showMessage(e.successMessage,t.data),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,t.data)})).catch((function(t){return e.showMessage(e.errorMessage,t),{}})).finally((function(){n.parentNode.removeChild(n),e.setSubmitStatus()}))}}},{key:"getTableData",value:function(e){var i=this,n=t(e.querySelectorAll("input")),a={};return n.forEach((function(e){var t=document.querySelector(i.OPTIONS_FORM_SELECTOR+' label[for="'+e.id+'"]');a[t.innerHTML]=e.value})),a}},{key:"getTablesData",value:function(){var e=this;return this.getTables().map((function(t){return e.getTableData(t)}))}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"getActiveTableLocale",value:function(){return this.getActiveTable().querySelector("tr").classList[0].replace("cyr-to-lat-tables-","").replace("-","_")}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.insertBefore(t,this.optionsForm.firstChild),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error"),this.warningMessage=this.addMessageLine("ctl-warning")}},{key:"moveTabs",value:function(){var e=document.querySelector(".ctl-settings-tabs");e&&this.optionsForm.insertBefore(e,this.optionsForm.firstChild)}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var e=this.getLastCell();e.parentElement.insertBefore(e.cloneNode(!0),e.nextElementSibling);var t=(e=this.getLastCell()).querySelector("label"),i=e.querySelector("input"),n=i.id.split("-"),a=n[0]+"-"+(parseInt(n[1])+1);t.htmlFor=a,t.innerHTML="",i.id=a,i.value="",i.setAttribute("value",""),this.replaceName(i,""),this.bindEvents(),this.editLabel(t)}},{key:"hideTables",value:function(){var e=this,t=0;this.getTables().map((function(i,n){i.classList.add("ctl-table"),e.CURRENT_STUB_ID===i.previousElementSibling.id&&(t=n,i.classList.add(e.ACTIVE_TABLE_CLASS));var a=document.createElement("div");return a.classList.add(e.PLUS_CLASS),a.innerHTML=e.plusButton,i.querySelector("td fieldset").appendChild(a),null})),this.getHeaders().map((function(i,n){return i.classList.add("nav-tab"),i.dataset.index=n.toString(),e.wrapper.appendChild(i),n===t&&(i.classList.add(e.CURRENT_NAV_TAB_CLASS),i.classList.add(e.ACTIVE_NAV_TAB_CLASS)),null}))}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map((function(t,i,n){return t.onclick=function(t){t.preventDefault();var i=t.target.dataset.index;if(i===e.getActiveIndex())return!1;e.saveActiveTable(),n.map((function(t){return t.classList.remove(e.ACTIVE_NAV_TAB_CLASS)})),n[i].classList.add(e.ACTIVE_NAV_TAB_CLASS);var a=e.getTables();return a.map((function(t){return t.classList.remove(e.ACTIVE_TABLE_CLASS)})),a[i].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),e.checkLocale(),!1},null})),this.getInputs().map((function(t){return t.oninput=function(){e.setSubmitStatus()},null})),this.getLabels().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1},null})),this.editLabelInput.onblur=function(){e.saveLabel()},this.editLabelInput.onkeyup=function(t){"Escape"===t.key&&e.saveLabel(!0),"Enter"===t.key&&e.saveLabel()},this.getPlusButtons().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1},null})),this.submitButton.onclick=function(t){return t.preventDefault(),e.saveActiveTable(),!1}}},{key:"editLabel",value:function(e){e.parentNode.insertBefore(this.editLabelInput,e.nextSibling),this.editLabelInput.value=e.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(e){return t(this.getActiveTable().querySelectorAll("label")).reduce((function(t,i){return t&&i.innerHTML!==e}),!0)}},{key:"saveLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var t=this.editLabelInput.value.trim();if(""===t){var i=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),i.parentNode.removeChild(i),void this.setSubmitStatus()}var n=this.editLabelInput.parentNode.querySelector("label");if(e||t===n.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(t)){var a=this.editLabelInput.nextElementSibling;this.hideEditLabelInput(),n.innerHTML=t,this.replaceName(a,t),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(e,t){e.name=e.name.replace(/(.+\[.+])\[.*]/g,"$1["+t+"]")}},{key:"clearMessage",value:function(e){e.innerHTML="",e.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(e,t){var i=this;e.innerHTML=t,e.classList.add("active"),this.msgTimer=setTimeout((function(){i.clearMessages()}),5e3)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const r=s;document.addEventListener("DOMContentLoaded",(function(){new r}))})();1 (()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var i=function(t,i){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i||"default");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==e(i)?i:i+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.addWrapper(),this.addMessageLines(),this.moveTabs(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus(),this.checkLocale()},i=[{key:"getHeaders",value:function(){return t(document.querySelectorAll(this.HEADER_SELECTOR))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return t(document.querySelectorAll(this.TABLE_SELECTOR))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input"))}},{key:"getLabels",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label"))}},{key:"getPlusButtons",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS))}},{key:"isActiveTableChanged",value:function(){var e=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[e])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"checkLocale",value:function(){var e=Cyr2LatTablesObject.ctlLocale;e="ru_RU"===e?"ISO9":e;var t=this.getActiveTableLocale();t!==e?this.showMessage(this.warningMessage,Cyr2LatTablesObject.localeWarning.replace("{active_table}",t)):this.clearMessage(this.warningMessage)}},{key:"saveActiveTable",value:function(){var e=this;if(this.isActiveTableChanged()){var i=this.getActiveTable(),n=document.createElement("form");n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(i.cloneNode(!0)),t(i.querySelectorAll("input")).map(function(e){return n.querySelector("#"+e.id).value=e.value}),t(this.optionsForm.querySelectorAll('input[type="hidden"]')).map(function(e){return n.appendChild(e.cloneNode(!0))}),document.body.appendChild(n);var a=new URLSearchParams(t(new FormData(n)));return a.append("action",Cyr2LatTablesObject.action),a.append("nonce",Cyr2LatTablesObject.nonce),fetch(Cyr2LatTablesObject.ajaxUrl,{method:"POST",body:a}).then(function(e){if(!e.ok)throw new Error(e.statusText);return e.json()}).then(function(t){t.success?(e.showMessage(e.successMessage,t.data),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,t.data)}).catch(function(t){return e.showMessage(e.errorMessage,t),{}}).finally(function(){n.parentNode.removeChild(n),e.setSubmitStatus()})}}},{key:"getTableData",value:function(e){var i=this,n=t(e.querySelectorAll("input")),a={};return n.forEach(function(e){var t=document.querySelector(i.OPTIONS_FORM_SELECTOR+' label[for="'+e.id+'"]');a[t.innerHTML]=e.value}),a}},{key:"getTablesData",value:function(){var e=this;return this.getTables().map(function(t){return e.getTableData(t)})}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"getActiveTableLocale",value:function(){return this.getActiveTable().querySelector("tr").classList[0].replace("cyr-to-lat-tables-","").replace("-","_")}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.insertBefore(t,this.optionsForm.firstChild),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error"),this.warningMessage=this.addMessageLine("ctl-warning")}},{key:"moveTabs",value:function(){var e=document.querySelector(".ctl-settings-tabs");e&&this.optionsForm.insertBefore(e,this.optionsForm.firstChild)}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var e=this.getLastCell();e.parentElement.insertBefore(e.cloneNode(!0),e.nextElementSibling);var t=(e=this.getLastCell()).querySelector("label"),i=e.querySelector("input"),n=i.id.split("-"),a=n[0]+"-"+(parseInt(n[1])+1);t.htmlFor=a,t.innerHTML="",i.id=a,i.value="",i.setAttribute("value",""),this.replaceName(i,""),this.bindEvents(),this.editLabel(t)}},{key:"hideTables",value:function(){var e=this,t=0;this.getTables().map(function(i,n){i.classList.add("ctl-table"),e.CURRENT_STUB_ID===i.previousElementSibling.id&&(t=n,i.classList.add(e.ACTIVE_TABLE_CLASS));var a=document.createElement("div");return a.classList.add(e.PLUS_CLASS),a.innerHTML=e.plusButton,i.querySelector("td fieldset").appendChild(a),null}),this.getHeaders().map(function(i,n){return i.classList.add("nav-tab"),i.dataset.index=n.toString(),e.wrapper.appendChild(i),n===t&&(i.classList.add(e.CURRENT_NAV_TAB_CLASS),i.classList.add(e.ACTIVE_NAV_TAB_CLASS)),null})}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map(function(t,i,n){return t.onclick=function(t){t.preventDefault();var i=t.target.dataset.index;if(i===e.getActiveIndex())return!1;e.saveActiveTable(),n.map(function(t){return t.classList.remove(e.ACTIVE_NAV_TAB_CLASS)}),n[i].classList.add(e.ACTIVE_NAV_TAB_CLASS);var a=e.getTables();return a.map(function(t){return t.classList.remove(e.ACTIVE_TABLE_CLASS)}),a[i].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),e.checkLocale(),!1},null}),this.getInputs().map(function(t){return t.oninput=function(){e.setSubmitStatus()},null}),this.getLabels().map(function(t){return t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1},null}),this.editLabelInput.onblur=function(){e.saveLabel()},this.editLabelInput.onkeyup=function(t){"Escape"===t.key&&e.saveLabel(!0),"Enter"===t.key&&e.saveLabel()},this.getPlusButtons().map(function(t){return t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1},null}),this.submitButton.onclick=function(t){return t.preventDefault(),e.saveActiveTable(),!1}}},{key:"editLabel",value:function(e){e.parentNode.insertBefore(this.editLabelInput,e.nextSibling),this.editLabelInput.value=e.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(e){return t(this.getActiveTable().querySelectorAll("label")).reduce(function(t,i){return t&&i.innerHTML!==e},!0)}},{key:"saveLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var t=this.editLabelInput.value.trim();if(""===t){var i=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),i.parentNode.removeChild(i),void this.setSubmitStatus()}var n=this.editLabelInput.parentNode.querySelector("label");if(e||t===n.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(t)){var a=this.editLabelInput.nextElementSibling;this.hideEditLabelInput(),n.innerHTML=t,this.replaceName(a,t),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(e,t){e.name=e.name.replace(/(.+\[.+])\[.*]/g,"$1["+t+"]")}},{key:"clearMessage",value:function(e){e.innerHTML="",e.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(e,t){var i=this;e.innerHTML=t,e.classList.add("active"),this.msgTimer=setTimeout(function(){i.clearMessages()},5e3)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const r=s;document.addEventListener("DOMContentLoaded",function(){new r})})(); -
cyr2lat/tags/6.5.0/assets/js/system-info.min.js
r2943272 r3384222 1 document.addEventListener("DOMContentLoaded", (function(){document.querySelector("#ctl-system-info-wrap .helper").addEventListener("click",(function(){var e=document.getElementById("ctl-system-info");navigator.clipboard.writeText(e.value).then((function(){}),(function(){}));var t=Cyr2LatSystemInfoObject.copiedMsg;alert(t)}))}));1 document.addEventListener("DOMContentLoaded",function(){document.querySelector("#ctl-system-info-wrap .helper").addEventListener("click",function(){var e=document.getElementById("ctl-system-info");navigator.clipboard.writeText(e.value).then(function(){},function(){});var t=Cyr2LatSystemInfoObject.copiedMsg;alert(t)})}); -
cyr2lat/tags/6.5.0/changelog.txt
r3211834 r3384222 1 = 6.5.0 (24.10.2025) = 2 * Fixed transliteration of tags during editing. 3 4 = 6.4.1 (03.05.2025) = 5 * Fixed the layout of messages on the Tables page. 6 * Tested with WordPress 6.8. 7 * Tested with WooCommerce 9.8. 8 9 = 6.3.0 (22.12.2024) = 10 * Added a warning message on the Tables page when the active table does not match the site locale. 11 * Removed fix for translation after WordPress 6.5+ due to performance issues. 12 1 13 = 6.2.3 (24.11.2024) = 2 14 * Fixed deprecation error with PHP 8.4. … … 21 33 * Tested with WordPress 6.5. 22 34 * Tested with WooCommerce 8.6. 23 * Fixed error on System Info tab when post types or post statuses are not set.35 * Fixed error on the System Info tab when post types or post statuses are not set. 24 36 25 37 = 6.0.8 (14.02.2024) = … … 32 44 * Added description of post types and post statuses on the Converter page. 33 45 * Fixed displaying all file descriptions in the Theme Editor in the current locale. 34 * Fixed PHP warning in SettingsBase.35 * Fixed output of variable product attributes.46 * Fixed PHP warning in the SettingsBase. 47 * Fixed the output of variable product attributes. 36 48 37 49 = 6.0.6 (14.01.2024) = … … 40 52 * Tested with PHP 8.3. 41 53 * Fixed documentation on ctl_allow filter. 42 * Fixed improper display of the "rate plugin" message on options.php.54 * Fixed the improper display of the "rate plugin" message on options.php. 43 55 44 56 = 6.0.5 (09.10.2023) = -
cyr2lat/tags/6.5.0/cyr-to-lat.php
r3286669 r3384222 11 11 * Plugin URI: https://kagg.eu/cyr-to-lat/ 12 12 * Description: Convert Non-Latin characters in post and term slugs to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov. 13 * Version: 6. 4.113 * Version: 6.5.0 14 14 * Requires at least: 5.3 15 15 * Requires PHP: 7.2 … … 42 42 * Plugin version. 43 43 */ 44 define( 'CYR_TO_LAT_VERSION', '6. 4.1' );44 define( 'CYR_TO_LAT_VERSION', '6.5.0' ); 45 45 46 46 /** -
cyr2lat/tags/6.5.0/readme.txt
r3382917 r3384222 4 4 Requires at least: 5.3 5 5 Tested up to: 6.8 6 Stable tag: 6.4.17 6 Requires PHP: 7.2 7 Stable tag: 6.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 17 17 = Features = 18 * The only plugin with fully editable transliteration table. Allows to add/remove and edit pairs like 'Я' => 'Ya', or even 'Пиво' => 'Beer'18 * The only plugin with a fully editable transliteration table. Allows to add/remove and edit pairs like 'Я' => 'Ya', or even 'Пиво' => 'Beer' 19 19 * Converts any number of existing post, page and term slugs in background processes 20 20 * Saves existing post and page permalinks integrity … … 46 46 == Installation == 47 47 48 1. Upload `cyr2lat` folder to the `/wp-content/plugins/` directory.48 1. Upload the ` cyr2lat ` folder to the `/wp-content/plugins/` directory. 49 49 2. Activate the plugin through the 'Plugins' menu in WordPress. 50 50 … … 207 207 Regeneration of thumbnails with the command `wp media regenerate` can break links in old posts as file names become transliterated. 208 208 209 To avoid it, deactivate cyr2lat plugin during regeneration:209 To avoid it, deactivate the cyr2lat plugin during regeneration: 210 210 211 211 ` … … 225 225 226 226 == Changelog == 227 228 = 6.5.0 (24.10.2025) = 229 * Fixed transliteration of tags during editing. 227 230 228 231 = 6.4.1 (03.05.2025) = … … 232 235 233 236 = 6.3.0 (22.12.2024) = 234 * Added warning message on the Tables page whenactive table does not match the site locale.237 * Added a warning message on the Tables page when the active table does not match the site locale. 235 238 * Removed fix for translation after WordPress 6.5+ due to performance issues. 236 239 … … 257 260 * Tested with WordPress 6.5. 258 261 * Tested with WooCommerce 8.6. 259 * Fixed error on System Info tab when post types or post statuses are not set.262 * Fixed error on the System Info tab when post types or post statuses are not set. 260 263 261 264 = 6.0.8 (14.02.2024) = … … 268 271 * Added description of post types and post statuses on the Converter page. 269 272 * Fixed displaying all file descriptions in the Theme Editor in the current locale. 270 * Fixed PHP warning in SettingsBase.271 * Fixed output of variable product attributes.273 * Fixed PHP warning in the SettingsBase. 274 * Fixed the output of variable product attributes. 272 275 273 276 = 6.0.6 (14.01.2024) = … … 276 279 * Tested with PHP 8.3. 277 280 * Fixed documentation on ctl_allow filter. 278 * Fixed improper display of the "rate plugin" message on options.php.281 * Fixed the improper display of the "rate plugin" message on options.php. 279 282 280 283 = 6.0.5 (09.10.2023) = -
cyr2lat/tags/6.5.0/src/php/ConversionTables.php
r3211834 r3384222 21 21 22 22 /** 23 * Get conversion table by locale.23 * Get a conversion table by locale. 24 24 * 25 25 * @link https://ru.wikipedia.org/wiki/ISO_9 … … 29 29 * @return array 30 30 */ 31 public static function get( string $locale = '' ): array { 31 public static function get( string $locale = '' ): array { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh 32 32 switch ( $locale ) { 33 33 // Belorussian. … … 1204 1204 /** 1205 1205 * Get fix table for macOS. 1206 * On macOS, files containing characters in the table ,are sometimes encoded improperly.1206 * On macOS, files containing characters in the table are sometimes encoded improperly. 1207 1207 * 1208 1208 * @return array -
cyr2lat/tags/6.5.0/src/php/ErrorHandler.php
r3211834 r3384222 19 19 20 20 /** 21 * Text domain in the just_in_time error message. 22 */ 23 private const TEXT_DOMAIN_IN_JIT_ERROR = '<code>cyr2lat</code>'; 24 25 /** 21 26 * Initialize the class. 22 27 * … … 33 38 */ 34 39 private function init_hooks(): void { 35 36 40 // Suppress the _load_textdomain_just_in_time() notices related the plugin for WP 6.7+. 37 41 if ( version_compare( $GLOBALS['wp_version'], '6.7', '>=' ) ) { … … 53 57 */ 54 58 public function action_doing_it_wrong_run( $function_name, $message, $version ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed 55 56 59 global $wp_filter; 57 60 … … 96 99 */ 97 100 public function filter_doing_it_wrong_trigger_error( $trigger, $function_name, $message, $version ): bool { 98 99 101 $trigger = (bool) $trigger; 100 102 $function_name = (string) $function_name; … … 113 115 */ 114 116 protected function is_just_in_time_for_plugin_domain( string $function_name, string $message ): bool { 115 return '_load_textdomain_just_in_time' === $function_name && false !== strpos( $message, '<code>cyr2lat</code>');117 return '_load_textdomain_just_in_time' === $function_name && false !== strpos( $message, self::TEXT_DOMAIN_IN_JIT_ERROR ); 116 118 } 117 119 } -
cyr2lat/tags/6.5.0/src/php/Main.php
r3189796 r3384222 245 245 try { 246 246 /** 247 * Method WP_CLI::add_command() accepts class as callable.247 * Method WP_CLI::add_command() accepts a class as callable. 248 248 * 249 249 * @noinspection PhpParamsInspection … … 307 307 if ( 308 308 ! $title || 309 // Fix edbug with `_wp_old_slug` redirect.309 // Fix the bug with `_wp_old_slug` redirect. 310 310 'query' === $context || 311 // Transliterate on pre_term_slug with Polylang and WPML only. 312 ( 313 doing_filter( 'pre_term_slug' ) && 314 ! ( class_exists( 'Polylang' ) || class_exists( 'SitePress' ) ) 315 ) 311 ! $this->transliterate_on_pre_term_slug_filter( (string) $title ) 316 312 ) { 317 313 return $title; … … 360 356 /** 361 357 * WC before template part filter. 362 * Add sanitize_title filter to support transliteration of WC attributes onfrontend.358 * Add the sanitize_title filter to support transliteration of WC attributes on the frontend. 363 359 * 364 360 * @return void … … 369 365 370 366 /** 371 * WC after t emplate part filter.372 * Remove sanitize_title filter after supporting transliteration of WC attributes onfrontend.367 * WC after the template part filter. 368 * Remove the sanitize_title filter after supporting transliteration of WC attributes on the frontend. 373 369 * 374 370 * @return void … … 546 542 /** 547 543 * Check if the Block Editor is active. 548 * Must only be used after plugins_loaded action is fired.544 * Must only be used after the plugins_loaded action is fired. 549 545 * 550 546 * @return bool … … 715 711 716 712 /** 717 * Locale filter for Polylang with classic editor.713 * Locale filter for Polylang with the classic editor. 718 714 * 719 715 * @return bool|string … … 880 876 881 877 /** 882 * Changes a rray of items into string of items, separated by comma and sql-escaped878 * Changes an array of items into a string of items, separated by comma and sql-escaped. 883 879 * 884 880 * @see https://coderwall.com/p/zepnaw … … 888 884 * @param string $format %s or %d. 889 885 * 890 * @return string Items separated by comma and sql-escaped 886 * @return string Items separated by comma and sql-escaped. 891 887 */ 892 888 public function prepare_in( $items, string $format = '%s' ): string { … … 906 902 return $prepared_in; 907 903 } 904 905 /** 906 * Check if we should transliterate the tag on pre_term_slug filter. 907 * 908 * @param string $title Title. 909 * 910 * @return bool 911 */ 912 protected function transliterate_on_pre_term_slug_filter( string $title ): bool { 913 global $wp_query; 914 915 $tag_var = $wp_query->query_vars['tag'] ?? null; 916 917 return ! ( 918 $tag_var === $title && 919 doing_filter( 'pre_term_slug' ) && 920 // Transliterate on pre_term_slug with Polylang and WPML only. 921 ! ( class_exists( 'Polylang' ) || class_exists( 'SitePress' ) ) 922 ); 923 } 908 924 } -
cyr2lat/tags/6.5.0/src/php/Settings/SystemInfo.php
r3211834 r3384222 222 222 $data .= $this->data( 'Show On Front', get_option( 'show_on_front' ) ); 223 223 224 // Only show page specs if front page is set to 'page'.224 // Only show page specs if the front page is set to 'page'. 225 225 if ( get_option( 'show_on_front' ) === 'page' ) { 226 226 $front_page_id = get_option( 'page_on_front' ); … … 389 389 * @return string 390 390 */ 391 private function server_info(): string { 391 private function server_info(): string { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh 392 392 global $wpdb; 393 393 … … 420 420 $data .= $this->data( 'Session', isset( $_SESSION ) ? 'Enabled' : 'Disabled' ); 421 421 422 // The rest of this is only relevant if session is enabled.422 // The rest of this is only relevant if the session is enabled. 423 423 if ( isset( $_SESSION ) ) { 424 424 $data .= $this->data( 'Session Name', esc_html( ini_get( 'session.name' ) ) ); -
cyr2lat/tags/6.5.0/vendor/autoload.php
r3286663 r3384222 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724::getLoader();22 return ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe::getLoader(); -
cyr2lat/tags/6.5.0/vendor/composer/autoload_real.php
r3286663 r3384222 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit cb805c9fadce0583c03c04522eed97245 class ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit cb805c9fadce0583c03c04522eed9724::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); 33 33 $loader->register(true); 34 34 35 $filesToLoad = \Composer\Autoload\ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$files;35 $filesToLoad = \Composer\Autoload\ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$files; 36 36 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 37 37 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
cyr2lat/tags/6.5.0/vendor/composer/autoload_static.php
r3286663 r3384222 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit cb805c9fadce0583c03c04522eed97247 class ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe 8 8 { 9 9 public static $files = array ( … … 54 54 { 55 55 return \Closure::bind(function () use ($loader) { 56 $loader->prefixLengthsPsr4 = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$prefixLengthsPsr4;57 $loader->prefixDirsPsr4 = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$prefixDirsPsr4;58 $loader->classMap = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$classMap;56 $loader->prefixLengthsPsr4 = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$prefixLengthsPsr4; 57 $loader->prefixDirsPsr4 = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$prefixDirsPsr4; 58 $loader->classMap = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$classMap; 59 59 60 60 }, null, ClassLoader::class); -
cyr2lat/tags/6.5.0/vendor/composer/installed.php
r3286669 r3384222 2 2 'root' => array( 3 3 'name' => 'mihdan/cyr2lat', 4 'pretty_version' => '6. 4.1',5 'version' => '6. 4.1.0',6 'reference' => ' 234cab87aaacc62fd651746e36febd959b193b79',4 'pretty_version' => '6.5.0', 5 'version' => '6.5.0.0', 6 'reference' => '92def392f578ed659765fe52016f357b267abe05', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'mihdan/cyr2lat' => array( 14 'pretty_version' => '6. 4.1',15 'version' => '6. 4.1.0',16 'reference' => ' 234cab87aaacc62fd651746e36febd959b193b79',14 'pretty_version' => '6.5.0', 15 'version' => '6.5.0.0', 16 'reference' => '92def392f578ed659765fe52016f357b267abe05', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
cyr2lat/trunk/assets/js/acf-field-group.min.js
r2882726 r3384222 1 !function(e,n,a){"use strict";var r=CyrToLatAcfFieldGroup.table,c=function(n){return e.each(r, (function(e,a){var r=new RegExp(e,"g");n=n.replace(r,a)})),n=(n=(n=(n=n.replace(/[^\w\d\-_]/g,"")).replace(/_+/g,"_")).replace(/^_?(.*)$/g,"$1")).replace(/^(.*)_$/g,"$1")};acf.addFilter("generate_field_object_name",(function(e){return c(e)})),e(a).on("change",".acf-field .field-name",(function(){if(e(this).is(":focus"))return!1;var n=e(this),a=n.val();(a=c(a))!==n.val()&&n.val(a)}))}(window.jQuery,window,document);1 !function(e,n,a){"use strict";var r=CyrToLatAcfFieldGroup.table,c=function(n){return e.each(r,function(e,a){var r=new RegExp(e,"g");n=n.replace(r,a)}),n=(n=(n=(n=n.replace(/[^\w\d\-_]/g,"")).replace(/_+/g,"_")).replace(/^_?(.*)$/g,"$1")).replace(/^(.*)_$/g,"$1")};acf.addFilter("generate_field_object_name",function(e){return c(e)}),e(a).on("change",".acf-field .field-name",function(){if(e(this).is(":focus"))return!1;var n=e(this),a=n.val();(a=c(a))!==n.val()&&n.val(a)})}(window.jQuery,window,document); -
cyr2lat/trunk/assets/js/apps/converter.js
r3188005 r3384222 1 (()=>{"use strict";function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}function o(t,o){for(var e=0;e<o.length;e++){var i=o[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function n(o){var n=function(o,n){if("object"!=t(o)||!o)return o;var e=o[Symbol.toPrimitive];if(void 0!==e){var i=e.call(o,n||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(o)}(o,"string");return"symbol"==t(n)?n:n+""}const e=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t),this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.bindEvents()},(n=[{key:"bindEvents",value:function(){var t=this;document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(o){return o.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}}])&&o(t.prototype,n),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,e}();document.addEventListener("DOMContentLoaded", (function(){new e}))})();1 (()=>{"use strict";function t(o){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(o)}function o(t,o){for(var e=0;e<o.length;e++){var i=o[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function n(o){var n=function(o,n){if("object"!=t(o)||!o)return o;var e=o[Symbol.toPrimitive];if(void 0!==e){var i=e.call(o,n||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(o)}(o,"string");return"symbol"==t(n)?n:n+""}const e=function(){return t=function t(){!function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,t),this.CONVERT_FORM_SELECTOR="#ctl-convert-existing-slugs",this.CONVERT_BUTTON_SELECTOR="#ctl-convert-button",this.CONFIRM_POPUP_SELECTOR="#ctl-confirm-popup",this.CONFIRM_OK_SELECTOR="#ctl-confirm-ok",this.CONFIRM_CANCEL_SELECTOR="#ctl-confirm-cancel",this.confirmPopup=document.querySelector(this.CONFIRM_POPUP_SELECTOR),this.bindEvents()},(n=[{key:"bindEvents",value:function(){var t=this;document.querySelector(this.CONVERT_BUTTON_SELECTOR).onclick=function(o){return o.preventDefault(),t.confirmPopup.style.display="block",!1},this.confirmPopup.onclick=function(){t.hideConfirmPopup()},document.querySelector(this.CONFIRM_OK_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup(),document.querySelector(t.CONVERT_FORM_SELECTOR).submit()},document.querySelector(this.CONFIRM_CANCEL_SELECTOR).onclick=function(o){o.stopPropagation(),t.hideConfirmPopup()}}},{key:"hideConfirmPopup",value:function(){this.confirmPopup.style.display="none"}}])&&o(t.prototype,n),e&&o(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,e}();document.addEventListener("DOMContentLoaded",function(){new e})})(); -
cyr2lat/trunk/assets/js/apps/tables.js
r3211834 r3384222 1 (()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var i=function(t,i){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i||"default");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==e(i)?i:i+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.addWrapper(),this.addMessageLines(),this.moveTabs(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus(),this.checkLocale()},i=[{key:"getHeaders",value:function(){return t(document.querySelectorAll(this.HEADER_SELECTOR))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return t(document.querySelectorAll(this.TABLE_SELECTOR))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input"))}},{key:"getLabels",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label"))}},{key:"getPlusButtons",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS))}},{key:"isActiveTableChanged",value:function(){var e=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[e])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"checkLocale",value:function(){var e=Cyr2LatTablesObject.ctlLocale;e="ru_RU"===e?"ISO9":e;var t=this.getActiveTableLocale();t!==e?this.showMessage(this.warningMessage,Cyr2LatTablesObject.localeWarning.replace("{active_table}",t)):this.clearMessage(this.warningMessage)}},{key:"saveActiveTable",value:function(){var e=this;if(this.isActiveTableChanged()){var i=this.getActiveTable(),n=document.createElement("form");n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(i.cloneNode(!0)),t(i.querySelectorAll("input")).map( (function(e){return n.querySelector("#"+e.id).value=e.value})),t(this.optionsForm.querySelectorAll('input[type="hidden"]')).map((function(e){return n.appendChild(e.cloneNode(!0))})),document.body.appendChild(n);var a=new URLSearchParams(t(new FormData(n)));return a.append("action",Cyr2LatTablesObject.action),a.append("nonce",Cyr2LatTablesObject.nonce),fetch(Cyr2LatTablesObject.ajaxUrl,{method:"POST",body:a}).then((function(e){if(!e.ok)throw new Error(e.statusText);return e.json()})).then((function(t){t.success?(e.showMessage(e.successMessage,t.data),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,t.data)})).catch((function(t){return e.showMessage(e.errorMessage,t),{}})).finally((function(){n.parentNode.removeChild(n),e.setSubmitStatus()}))}}},{key:"getTableData",value:function(e){var i=this,n=t(e.querySelectorAll("input")),a={};return n.forEach((function(e){var t=document.querySelector(i.OPTIONS_FORM_SELECTOR+' label[for="'+e.id+'"]');a[t.innerHTML]=e.value})),a}},{key:"getTablesData",value:function(){var e=this;return this.getTables().map((function(t){return e.getTableData(t)}))}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"getActiveTableLocale",value:function(){return this.getActiveTable().querySelector("tr").classList[0].replace("cyr-to-lat-tables-","").replace("-","_")}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.insertBefore(t,this.optionsForm.firstChild),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error"),this.warningMessage=this.addMessageLine("ctl-warning")}},{key:"moveTabs",value:function(){var e=document.querySelector(".ctl-settings-tabs");e&&this.optionsForm.insertBefore(e,this.optionsForm.firstChild)}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var e=this.getLastCell();e.parentElement.insertBefore(e.cloneNode(!0),e.nextElementSibling);var t=(e=this.getLastCell()).querySelector("label"),i=e.querySelector("input"),n=i.id.split("-"),a=n[0]+"-"+(parseInt(n[1])+1);t.htmlFor=a,t.innerHTML="",i.id=a,i.value="",i.setAttribute("value",""),this.replaceName(i,""),this.bindEvents(),this.editLabel(t)}},{key:"hideTables",value:function(){var e=this,t=0;this.getTables().map((function(i,n){i.classList.add("ctl-table"),e.CURRENT_STUB_ID===i.previousElementSibling.id&&(t=n,i.classList.add(e.ACTIVE_TABLE_CLASS));var a=document.createElement("div");return a.classList.add(e.PLUS_CLASS),a.innerHTML=e.plusButton,i.querySelector("td fieldset").appendChild(a),null})),this.getHeaders().map((function(i,n){return i.classList.add("nav-tab"),i.dataset.index=n.toString(),e.wrapper.appendChild(i),n===t&&(i.classList.add(e.CURRENT_NAV_TAB_CLASS),i.classList.add(e.ACTIVE_NAV_TAB_CLASS)),null}))}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map((function(t,i,n){return t.onclick=function(t){t.preventDefault();var i=t.target.dataset.index;if(i===e.getActiveIndex())return!1;e.saveActiveTable(),n.map((function(t){return t.classList.remove(e.ACTIVE_NAV_TAB_CLASS)})),n[i].classList.add(e.ACTIVE_NAV_TAB_CLASS);var a=e.getTables();return a.map((function(t){return t.classList.remove(e.ACTIVE_TABLE_CLASS)})),a[i].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),e.checkLocale(),!1},null})),this.getInputs().map((function(t){return t.oninput=function(){e.setSubmitStatus()},null})),this.getLabels().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1},null})),this.editLabelInput.onblur=function(){e.saveLabel()},this.editLabelInput.onkeyup=function(t){"Escape"===t.key&&e.saveLabel(!0),"Enter"===t.key&&e.saveLabel()},this.getPlusButtons().map((function(t){return t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1},null})),this.submitButton.onclick=function(t){return t.preventDefault(),e.saveActiveTable(),!1}}},{key:"editLabel",value:function(e){e.parentNode.insertBefore(this.editLabelInput,e.nextSibling),this.editLabelInput.value=e.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(e){return t(this.getActiveTable().querySelectorAll("label")).reduce((function(t,i){return t&&i.innerHTML!==e}),!0)}},{key:"saveLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var t=this.editLabelInput.value.trim();if(""===t){var i=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),i.parentNode.removeChild(i),void this.setSubmitStatus()}var n=this.editLabelInput.parentNode.querySelector("label");if(e||t===n.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(t)){var a=this.editLabelInput.nextElementSibling;this.hideEditLabelInput(),n.innerHTML=t,this.replaceName(a,t),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(e,t){e.name=e.name.replace(/(.+\[.+])\[.*]/g,"$1["+t+"]")}},{key:"clearMessage",value:function(e){e.innerHTML="",e.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(e,t){var i=this;e.innerHTML=t,e.classList.add("active"),this.msgTimer=setTimeout((function(){i.clearMessages()}),5e3)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const r=s;document.addEventListener("DOMContentLoaded",(function(){new r}))})();1 (()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var i=function(t,i){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i||"default");if("object"!=e(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==e(i)?i:i+""}var s=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.OPTIONS_FORM_SELECTOR="#ctl-options",this.HEADER_SELECTOR=this.OPTIONS_FORM_SELECTOR+" h2",this.TABLE_SELECTOR=this.OPTIONS_FORM_SELECTOR+" table",this.SUBMIT_SELECTOR=this.OPTIONS_FORM_SELECTOR+" #submit",this.CURRENT_STUB_ID="ctl-current",this.CURRENT_NAV_TAB_CLASS="nav-tab-current",this.ACTIVE_NAV_TAB_CLASS="nav-tab-active",this.ACTIVE_TABLE_CLASS="active",this.EDIT_LABEL_ID="ctl-edit-label",this.EDIT_LABEL_ERROR_CLASS="ctl-edit-label-error",this.plusButton='<button type="button" aria-haspopup="true" aria-expanded="false" class="components-button block-editor-inserter__toggle has-icon" aria-label="Добавить блок"><svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" role="img" aria-hidden="true" focusable="false"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg></button>',this.PLUS_CLASS="ctl-plus",this.optionsForm=document.querySelector(this.OPTIONS_FORM_SELECTOR),this.tablesData=this.getTablesData(),this.submitButton=document.querySelector(this.SUBMIT_SELECTOR),this.addWrapper(),this.addMessageLines(),this.moveTabs(),this.addEditLabelInput(),this.hideTables(),this.bindEvents(),this.setSubmitStatus(),this.checkLocale()},i=[{key:"getHeaders",value:function(){return t(document.querySelectorAll(this.HEADER_SELECTOR))}},{key:"getActiveHeader",value:function(){return document.querySelector(this.HEADER_SELECTOR+"."+this.ACTIVE_NAV_TAB_CLASS)}},{key:"getActiveIndex",value:function(){return this.getActiveHeader().dataset.index}},{key:"getTables",value:function(){return t(document.querySelectorAll(this.TABLE_SELECTOR))}},{key:"getActiveTable",value:function(){return document.querySelector(this.TABLE_SELECTOR+"."+this.ACTIVE_TABLE_CLASS)}},{key:"getInputs",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" input"))}},{key:"getLabels",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" label"))}},{key:"getPlusButtons",value:function(){return t(document.querySelectorAll(this.OPTIONS_FORM_SELECTOR+" ."+this.PLUS_CLASS))}},{key:"isActiveTableChanged",value:function(){var e=this.getActiveIndex();return JSON.stringify(this.getActiveTableData())!==JSON.stringify(this.tablesData[e])}},{key:"setSubmitStatus",value:function(){this.submitButton.disabled=!this.isActiveTableChanged()}},{key:"checkLocale",value:function(){var e=Cyr2LatTablesObject.ctlLocale;e="ru_RU"===e?"ISO9":e;var t=this.getActiveTableLocale();t!==e?this.showMessage(this.warningMessage,Cyr2LatTablesObject.localeWarning.replace("{active_table}",t)):this.clearMessage(this.warningMessage)}},{key:"saveActiveTable",value:function(){var e=this;if(this.isActiveTableChanged()){var i=this.getActiveTable(),n=document.createElement("form");n.action=this.optionsForm.getAttribute("action"),n.method=this.optionsForm.method,n.appendChild(i.cloneNode(!0)),t(i.querySelectorAll("input")).map(function(e){return n.querySelector("#"+e.id).value=e.value}),t(this.optionsForm.querySelectorAll('input[type="hidden"]')).map(function(e){return n.appendChild(e.cloneNode(!0))}),document.body.appendChild(n);var a=new URLSearchParams(t(new FormData(n)));return a.append("action",Cyr2LatTablesObject.action),a.append("nonce",Cyr2LatTablesObject.nonce),fetch(Cyr2LatTablesObject.ajaxUrl,{method:"POST",body:a}).then(function(e){if(!e.ok)throw new Error(e.statusText);return e.json()}).then(function(t){t.success?(e.showMessage(e.successMessage,t.data),e.tablesData=e.getTablesData()):e.showMessage(e.errorMessage,t.data)}).catch(function(t){return e.showMessage(e.errorMessage,t),{}}).finally(function(){n.parentNode.removeChild(n),e.setSubmitStatus()})}}},{key:"getTableData",value:function(e){var i=this,n=t(e.querySelectorAll("input")),a={};return n.forEach(function(e){var t=document.querySelector(i.OPTIONS_FORM_SELECTOR+' label[for="'+e.id+'"]');a[t.innerHTML]=e.value}),a}},{key:"getTablesData",value:function(){var e=this;return this.getTables().map(function(t){return e.getTableData(t)})}},{key:"getActiveTableData",value:function(){return this.getTableData(this.getActiveTable())}},{key:"getActiveTableLocale",value:function(){return this.getActiveTable().querySelector("tr").classList[0].replace("cyr-to-lat-tables-","").replace("-","_")}},{key:"addWrapper",value:function(){this.wrapper=document.createElement("ul"),this.wrapper.classList.add("nav-tab-wrapper"),this.optionsForm.insertBefore(this.wrapper,this.optionsForm.firstChild)}},{key:"addMessageLine",value:function(e){var t=document.createElement("div");return t.id=e,this.optionsForm.insertBefore(t,this.optionsForm.firstChild),t}},{key:"addMessageLines",value:function(){this.successMessage=this.addMessageLine("ctl-success"),this.errorMessage=this.addMessageLine("ctl-error"),this.warningMessage=this.addMessageLine("ctl-warning")}},{key:"moveTabs",value:function(){var e=document.querySelector(".ctl-settings-tabs");e&&this.optionsForm.insertBefore(e,this.optionsForm.firstChild)}},{key:"addEditLabelInput",value:function(){this.editLabelInput=document.createElement("input"),this.editLabelInput.id=this.EDIT_LABEL_ID,this.editLabelInput.style.display="none",document.body.appendChild(this.editLabelInput)}},{key:"hideEditLabelInput",value:function(){this.editLabelInput.style.display="none",this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),document.body.appendChild(this.editLabelInput)}},{key:"getLastCell",value:function(){return document.querySelector(this.OPTIONS_FORM_SELECTOR+" ."+this.ACTIVE_TABLE_CLASS+" ."+this.PLUS_CLASS).previousElementSibling}},{key:"addCell",value:function(){var e=this.getLastCell();e.parentElement.insertBefore(e.cloneNode(!0),e.nextElementSibling);var t=(e=this.getLastCell()).querySelector("label"),i=e.querySelector("input"),n=i.id.split("-"),a=n[0]+"-"+(parseInt(n[1])+1);t.htmlFor=a,t.innerHTML="",i.id=a,i.value="",i.setAttribute("value",""),this.replaceName(i,""),this.bindEvents(),this.editLabel(t)}},{key:"hideTables",value:function(){var e=this,t=0;this.getTables().map(function(i,n){i.classList.add("ctl-table"),e.CURRENT_STUB_ID===i.previousElementSibling.id&&(t=n,i.classList.add(e.ACTIVE_TABLE_CLASS));var a=document.createElement("div");return a.classList.add(e.PLUS_CLASS),a.innerHTML=e.plusButton,i.querySelector("td fieldset").appendChild(a),null}),this.getHeaders().map(function(i,n){return i.classList.add("nav-tab"),i.dataset.index=n.toString(),e.wrapper.appendChild(i),n===t&&(i.classList.add(e.CURRENT_NAV_TAB_CLASS),i.classList.add(e.ACTIVE_NAV_TAB_CLASS)),null})}},{key:"bindEvents",value:function(){var e=this;this.getHeaders().map(function(t,i,n){return t.onclick=function(t){t.preventDefault();var i=t.target.dataset.index;if(i===e.getActiveIndex())return!1;e.saveActiveTable(),n.map(function(t){return t.classList.remove(e.ACTIVE_NAV_TAB_CLASS)}),n[i].classList.add(e.ACTIVE_NAV_TAB_CLASS);var a=e.getTables();return a.map(function(t){return t.classList.remove(e.ACTIVE_TABLE_CLASS)}),a[i].classList.add(e.ACTIVE_TABLE_CLASS),e.setSubmitStatus(),e.checkLocale(),!1},null}),this.getInputs().map(function(t){return t.oninput=function(){e.setSubmitStatus()},null}),this.getLabels().map(function(t){return t.onclick=function(t){return t.preventDefault(),e.editLabel(t.target),!1},null}),this.editLabelInput.onblur=function(){e.saveLabel()},this.editLabelInput.onkeyup=function(t){"Escape"===t.key&&e.saveLabel(!0),"Enter"===t.key&&e.saveLabel()},this.getPlusButtons().map(function(t){return t.onclick=function(t){return t.preventDefault(),e.addCell(t.target),!1},null}),this.submitButton.onclick=function(t){return t.preventDefault(),e.saveActiveTable(),!1}}},{key:"editLabel",value:function(e){e.parentNode.insertBefore(this.editLabelInput,e.nextSibling),this.editLabelInput.value=e.innerHTML,this.editLabelInput.classList.remove(this.EDIT_LABEL_ERROR_CLASS),this.editLabelInput.style.display="block",this.editLabelInput.focus()}},{key:"isUniqueLabel",value:function(e){return t(this.getActiveTable().querySelectorAll("label")).reduce(function(t,i){return t&&i.innerHTML!==e},!0)}},{key:"saveLabel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("none"!==this.editLabelInput.style.display){var t=this.editLabelInput.value.trim();if(""===t){var i=document.getElementById(this.EDIT_LABEL_ID).parentElement;return this.hideEditLabelInput(),i.parentNode.removeChild(i),void this.setSubmitStatus()}var n=this.editLabelInput.parentNode.querySelector("label");if(e||t===n.innerHTML)this.hideEditLabelInput();else if(this.isUniqueLabel(t)){var a=this.editLabelInput.nextElementSibling;this.hideEditLabelInput(),n.innerHTML=t,this.replaceName(a,t),this.setSubmitStatus()}else this.editLabelInput.classList.add(this.EDIT_LABEL_ERROR_CLASS)}}},{key:"replaceName",value:function(e,t){e.name=e.name.replace(/(.+\[.+])\[.*]/g,"$1["+t+"]")}},{key:"clearMessage",value:function(e){e.innerHTML="",e.classList.remove("active")}},{key:"clearMessages",value:function(){this.clearMessage(this.successMessage),this.clearMessage(this.errorMessage),clearTimeout(this.msgTimer)}},{key:"showMessage",value:function(e,t){var i=this;e.innerHTML=t,e.classList.add("active"),this.msgTimer=setTimeout(function(){i.clearMessages()},5e3)}}],i&&n(e.prototype,i),a&&n(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const r=s;document.addEventListener("DOMContentLoaded",function(){new r})})(); -
cyr2lat/trunk/assets/js/system-info.min.js
r2943272 r3384222 1 document.addEventListener("DOMContentLoaded", (function(){document.querySelector("#ctl-system-info-wrap .helper").addEventListener("click",(function(){var e=document.getElementById("ctl-system-info");navigator.clipboard.writeText(e.value).then((function(){}),(function(){}));var t=Cyr2LatSystemInfoObject.copiedMsg;alert(t)}))}));1 document.addEventListener("DOMContentLoaded",function(){document.querySelector("#ctl-system-info-wrap .helper").addEventListener("click",function(){var e=document.getElementById("ctl-system-info");navigator.clipboard.writeText(e.value).then(function(){},function(){});var t=Cyr2LatSystemInfoObject.copiedMsg;alert(t)})}); -
cyr2lat/trunk/changelog.txt
r3211834 r3384222 1 = 6.5.0 (24.10.2025) = 2 * Fixed transliteration of tags during editing. 3 4 = 6.4.1 (03.05.2025) = 5 * Fixed the layout of messages on the Tables page. 6 * Tested with WordPress 6.8. 7 * Tested with WooCommerce 9.8. 8 9 = 6.3.0 (22.12.2024) = 10 * Added a warning message on the Tables page when the active table does not match the site locale. 11 * Removed fix for translation after WordPress 6.5+ due to performance issues. 12 1 13 = 6.2.3 (24.11.2024) = 2 14 * Fixed deprecation error with PHP 8.4. … … 21 33 * Tested with WordPress 6.5. 22 34 * Tested with WooCommerce 8.6. 23 * Fixed error on System Info tab when post types or post statuses are not set.35 * Fixed error on the System Info tab when post types or post statuses are not set. 24 36 25 37 = 6.0.8 (14.02.2024) = … … 32 44 * Added description of post types and post statuses on the Converter page. 33 45 * Fixed displaying all file descriptions in the Theme Editor in the current locale. 34 * Fixed PHP warning in SettingsBase.35 * Fixed output of variable product attributes.46 * Fixed PHP warning in the SettingsBase. 47 * Fixed the output of variable product attributes. 36 48 37 49 = 6.0.6 (14.01.2024) = … … 40 52 * Tested with PHP 8.3. 41 53 * Fixed documentation on ctl_allow filter. 42 * Fixed improper display of the "rate plugin" message on options.php.54 * Fixed the improper display of the "rate plugin" message on options.php. 43 55 44 56 = 6.0.5 (09.10.2023) = -
cyr2lat/trunk/cyr-to-lat.php
r3286669 r3384222 11 11 * Plugin URI: https://kagg.eu/cyr-to-lat/ 12 12 * Description: Convert Non-Latin characters in post and term slugs to Latin characters. Useful for creating human-readable URLs. Based on the original plugin by Anton Skorobogatov. 13 * Version: 6. 4.113 * Version: 6.5.0 14 14 * Requires at least: 5.3 15 15 * Requires PHP: 7.2 … … 42 42 * Plugin version. 43 43 */ 44 define( 'CYR_TO_LAT_VERSION', '6. 4.1' );44 define( 'CYR_TO_LAT_VERSION', '6.5.0' ); 45 45 46 46 /** -
cyr2lat/trunk/readme.txt
r3382917 r3384222 4 4 Requires at least: 5.3 5 5 Tested up to: 6.8 6 Stable tag: 6.4.17 6 Requires PHP: 7.2 7 Stable tag: 6.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 17 17 = Features = 18 * The only plugin with fully editable transliteration table. Allows to add/remove and edit pairs like 'Я' => 'Ya', or even 'Пиво' => 'Beer'18 * The only plugin with a fully editable transliteration table. Allows to add/remove and edit pairs like 'Я' => 'Ya', or even 'Пиво' => 'Beer' 19 19 * Converts any number of existing post, page and term slugs in background processes 20 20 * Saves existing post and page permalinks integrity … … 46 46 == Installation == 47 47 48 1. Upload `cyr2lat` folder to the `/wp-content/plugins/` directory.48 1. Upload the ` cyr2lat ` folder to the `/wp-content/plugins/` directory. 49 49 2. Activate the plugin through the 'Plugins' menu in WordPress. 50 50 … … 207 207 Regeneration of thumbnails with the command `wp media regenerate` can break links in old posts as file names become transliterated. 208 208 209 To avoid it, deactivate cyr2lat plugin during regeneration:209 To avoid it, deactivate the cyr2lat plugin during regeneration: 210 210 211 211 ` … … 225 225 226 226 == Changelog == 227 228 = 6.5.0 (24.10.2025) = 229 * Fixed transliteration of tags during editing. 227 230 228 231 = 6.4.1 (03.05.2025) = … … 232 235 233 236 = 6.3.0 (22.12.2024) = 234 * Added warning message on the Tables page whenactive table does not match the site locale.237 * Added a warning message on the Tables page when the active table does not match the site locale. 235 238 * Removed fix for translation after WordPress 6.5+ due to performance issues. 236 239 … … 257 260 * Tested with WordPress 6.5. 258 261 * Tested with WooCommerce 8.6. 259 * Fixed error on System Info tab when post types or post statuses are not set.262 * Fixed error on the System Info tab when post types or post statuses are not set. 260 263 261 264 = 6.0.8 (14.02.2024) = … … 268 271 * Added description of post types and post statuses on the Converter page. 269 272 * Fixed displaying all file descriptions in the Theme Editor in the current locale. 270 * Fixed PHP warning in SettingsBase.271 * Fixed output of variable product attributes.273 * Fixed PHP warning in the SettingsBase. 274 * Fixed the output of variable product attributes. 272 275 273 276 = 6.0.6 (14.01.2024) = … … 276 279 * Tested with PHP 8.3. 277 280 * Fixed documentation on ctl_allow filter. 278 * Fixed improper display of the "rate plugin" message on options.php.281 * Fixed the improper display of the "rate plugin" message on options.php. 279 282 280 283 = 6.0.5 (09.10.2023) = -
cyr2lat/trunk/src/php/ConversionTables.php
r3211834 r3384222 21 21 22 22 /** 23 * Get conversion table by locale.23 * Get a conversion table by locale. 24 24 * 25 25 * @link https://ru.wikipedia.org/wiki/ISO_9 … … 29 29 * @return array 30 30 */ 31 public static function get( string $locale = '' ): array { 31 public static function get( string $locale = '' ): array { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh 32 32 switch ( $locale ) { 33 33 // Belorussian. … … 1204 1204 /** 1205 1205 * Get fix table for macOS. 1206 * On macOS, files containing characters in the table ,are sometimes encoded improperly.1206 * On macOS, files containing characters in the table are sometimes encoded improperly. 1207 1207 * 1208 1208 * @return array -
cyr2lat/trunk/src/php/ErrorHandler.php
r3211834 r3384222 19 19 20 20 /** 21 * Text domain in the just_in_time error message. 22 */ 23 private const TEXT_DOMAIN_IN_JIT_ERROR = '<code>cyr2lat</code>'; 24 25 /** 21 26 * Initialize the class. 22 27 * … … 33 38 */ 34 39 private function init_hooks(): void { 35 36 40 // Suppress the _load_textdomain_just_in_time() notices related the plugin for WP 6.7+. 37 41 if ( version_compare( $GLOBALS['wp_version'], '6.7', '>=' ) ) { … … 53 57 */ 54 58 public function action_doing_it_wrong_run( $function_name, $message, $version ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed 55 56 59 global $wp_filter; 57 60 … … 96 99 */ 97 100 public function filter_doing_it_wrong_trigger_error( $trigger, $function_name, $message, $version ): bool { 98 99 101 $trigger = (bool) $trigger; 100 102 $function_name = (string) $function_name; … … 113 115 */ 114 116 protected function is_just_in_time_for_plugin_domain( string $function_name, string $message ): bool { 115 return '_load_textdomain_just_in_time' === $function_name && false !== strpos( $message, '<code>cyr2lat</code>');117 return '_load_textdomain_just_in_time' === $function_name && false !== strpos( $message, self::TEXT_DOMAIN_IN_JIT_ERROR ); 116 118 } 117 119 } -
cyr2lat/trunk/src/php/Main.php
r3189796 r3384222 245 245 try { 246 246 /** 247 * Method WP_CLI::add_command() accepts class as callable.247 * Method WP_CLI::add_command() accepts a class as callable. 248 248 * 249 249 * @noinspection PhpParamsInspection … … 307 307 if ( 308 308 ! $title || 309 // Fix edbug with `_wp_old_slug` redirect.309 // Fix the bug with `_wp_old_slug` redirect. 310 310 'query' === $context || 311 // Transliterate on pre_term_slug with Polylang and WPML only. 312 ( 313 doing_filter( 'pre_term_slug' ) && 314 ! ( class_exists( 'Polylang' ) || class_exists( 'SitePress' ) ) 315 ) 311 ! $this->transliterate_on_pre_term_slug_filter( (string) $title ) 316 312 ) { 317 313 return $title; … … 360 356 /** 361 357 * WC before template part filter. 362 * Add sanitize_title filter to support transliteration of WC attributes onfrontend.358 * Add the sanitize_title filter to support transliteration of WC attributes on the frontend. 363 359 * 364 360 * @return void … … 369 365 370 366 /** 371 * WC after t emplate part filter.372 * Remove sanitize_title filter after supporting transliteration of WC attributes onfrontend.367 * WC after the template part filter. 368 * Remove the sanitize_title filter after supporting transliteration of WC attributes on the frontend. 373 369 * 374 370 * @return void … … 546 542 /** 547 543 * Check if the Block Editor is active. 548 * Must only be used after plugins_loaded action is fired.544 * Must only be used after the plugins_loaded action is fired. 549 545 * 550 546 * @return bool … … 715 711 716 712 /** 717 * Locale filter for Polylang with classic editor.713 * Locale filter for Polylang with the classic editor. 718 714 * 719 715 * @return bool|string … … 880 876 881 877 /** 882 * Changes a rray of items into string of items, separated by comma and sql-escaped878 * Changes an array of items into a string of items, separated by comma and sql-escaped. 883 879 * 884 880 * @see https://coderwall.com/p/zepnaw … … 888 884 * @param string $format %s or %d. 889 885 * 890 * @return string Items separated by comma and sql-escaped 886 * @return string Items separated by comma and sql-escaped. 891 887 */ 892 888 public function prepare_in( $items, string $format = '%s' ): string { … … 906 902 return $prepared_in; 907 903 } 904 905 /** 906 * Check if we should transliterate the tag on pre_term_slug filter. 907 * 908 * @param string $title Title. 909 * 910 * @return bool 911 */ 912 protected function transliterate_on_pre_term_slug_filter( string $title ): bool { 913 global $wp_query; 914 915 $tag_var = $wp_query->query_vars['tag'] ?? null; 916 917 return ! ( 918 $tag_var === $title && 919 doing_filter( 'pre_term_slug' ) && 920 // Transliterate on pre_term_slug with Polylang and WPML only. 921 ! ( class_exists( 'Polylang' ) || class_exists( 'SitePress' ) ) 922 ); 923 } 908 924 } -
cyr2lat/trunk/src/php/Settings/SystemInfo.php
r3211834 r3384222 222 222 $data .= $this->data( 'Show On Front', get_option( 'show_on_front' ) ); 223 223 224 // Only show page specs if front page is set to 'page'.224 // Only show page specs if the front page is set to 'page'. 225 225 if ( get_option( 'show_on_front' ) === 'page' ) { 226 226 $front_page_id = get_option( 'page_on_front' ); … … 389 389 * @return string 390 390 */ 391 private function server_info(): string { 391 private function server_info(): string { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh 392 392 global $wpdb; 393 393 … … 420 420 $data .= $this->data( 'Session', isset( $_SESSION ) ? 'Enabled' : 'Disabled' ); 421 421 422 // The rest of this is only relevant if session is enabled.422 // The rest of this is only relevant if the session is enabled. 423 423 if ( isset( $_SESSION ) ) { 424 424 $data .= $this->data( 'Session Name', esc_html( ini_get( 'session.name' ) ) ); -
cyr2lat/trunk/vendor/autoload.php
r3286663 r3384222 20 20 require_once __DIR__ . '/composer/autoload_real.php'; 21 21 22 return ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724::getLoader();22 return ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe::getLoader(); -
cyr2lat/trunk/vendor/composer/autoload_real.php
r3286663 r3384222 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit cb805c9fadce0583c03c04522eed97245 class ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit cb805c9fadce0583c03c04522eed9724', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit73b92d31f74139c8a6c2782bb16651fe', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit cb805c9fadce0583c03c04522eed9724::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); 33 33 $loader->register(true); 34 34 35 $filesToLoad = \Composer\Autoload\ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$files;35 $filesToLoad = \Composer\Autoload\ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$files; 36 36 $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { 37 37 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
cyr2lat/trunk/vendor/composer/autoload_static.php
r3286663 r3384222 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit cb805c9fadce0583c03c04522eed97247 class ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe 8 8 { 9 9 public static $files = array ( … … 54 54 { 55 55 return \Closure::bind(function () use ($loader) { 56 $loader->prefixLengthsPsr4 = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$prefixLengthsPsr4;57 $loader->prefixDirsPsr4 = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$prefixDirsPsr4;58 $loader->classMap = ComposerStaticInit cb805c9fadce0583c03c04522eed9724::$classMap;56 $loader->prefixLengthsPsr4 = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$prefixLengthsPsr4; 57 $loader->prefixDirsPsr4 = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$prefixDirsPsr4; 58 $loader->classMap = ComposerStaticInit73b92d31f74139c8a6c2782bb16651fe::$classMap; 59 59 60 60 }, null, ClassLoader::class); -
cyr2lat/trunk/vendor/composer/installed.php
r3286669 r3384222 2 2 'root' => array( 3 3 'name' => 'mihdan/cyr2lat', 4 'pretty_version' => '6. 4.1',5 'version' => '6. 4.1.0',6 'reference' => ' 234cab87aaacc62fd651746e36febd959b193b79',4 'pretty_version' => '6.5.0', 5 'version' => '6.5.0.0', 6 'reference' => '92def392f578ed659765fe52016f357b267abe05', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'mihdan/cyr2lat' => array( 14 'pretty_version' => '6. 4.1',15 'version' => '6. 4.1.0',16 'reference' => ' 234cab87aaacc62fd651746e36febd959b193b79',14 'pretty_version' => '6.5.0', 15 'version' => '6.5.0.0', 16 'reference' => '92def392f578ed659765fe52016f357b267abe05', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.