Cyr-To-Lat - Version 4.1

Version Description

(21.05.2019) = * Added he_IL Table * Added plugin translation to Ukrainian * Added plugin translation to Swedish * Added phpunit tests. All plugin classes are 100% covered * Added js tests. All plugin js code is 100% covered * Fixed bug with Jetpack sync * Fixed empty slug bug while using characters outside of locale

Download this release

Release Info

Developer mihdan
Plugin Icon 128x128 Cyr-To-Lat
Version 4.1
Comparing to
See all releases

Code changes from version 4.0 to 4.1

cyr-to-lat.php CHANGED
@@ -9,8 +9,8 @@
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 2.3
11
  * Tested up to: 5.2
12
- * Version: 4.0
13
- * Stable tag: 4.0
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
26
  /**
27
  * Plugin version.
28
  */
29
- define( 'CYR_TO_LAT_VERSION', '4.0' );
30
 
31
  /**
32
  * Path to the plugin dir.
9
  * Author URI: https://profiles.wordpress.org/sergeybiryukov/
10
  * Requires at least: 2.3
11
  * Tested up to: 5.2
12
+ * Version: 4.1
13
+ * Stable tag: 4.1
14
  *
15
  * Text Domain: cyr2lat
16
  * Domain Path: /languages/
26
  /**
27
  * Plugin version.
28
  */
29
+ define( 'CYR_TO_LAT_VERSION', '4.1' );
30
 
31
  /**
32
  * Path to the plugin dir.
dist/js/settings/app.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hideTables(),this.bindEvents()}return n(t,[{key:"hideTables",value:function(){[].concat(o(document.querySelectorAll("#ctl-options table"))).map(function(t,e){if(t.classList.add("ctl-table"),0===e){t.classList.add("active");var r=document.createElement("ul");r.classList.add("nav-tab-wrapper"),t.parentNode.insertBefore(r,t)}}),[].concat(o(document.querySelectorAll("#ctl-options h2"))).map(function(t,e){t.classList.add("nav-tab"),t.dataset.index=e,document.querySelector("#ctl-options ul").appendChild(t),0===e&&t.classList.add("nav-tab-active")})}},{key:"bindEvents",value:function(){[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map(function(t){t.onclick=function(t){t.preventDefault();var e=t.target.dataset.index;[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map(function(t){t.classList.remove("nav-tab-active")}),t.target.classList.add("nav-tab-active");var r=[].concat(o(document.querySelectorAll(".ctl-table")));return r.map(function(t){t.classList.remove("active")}),r[e].classList.add("active"),!1}})}}]),t}();e.default=i},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(r(0));document.addEventListener("DOMContentLoaded",function(){new n.default})},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=c,t.Request=b,t.Response=v,t.fetch=function(t,r){return new Promise(function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:function(t){var e=new c;return t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e}(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;n(new v(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function h(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=d(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var r=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return i.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function v(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){r(2),t.exports=r(1)}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=3)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();function o(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}var i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hideTables(),this.bindEvents()}return n(t,[{key:"hideTables",value:function(){[].concat(o(document.querySelectorAll("#ctl-options table"))).map(function(t,e){if(t.classList.add("ctl-table"),0===e){t.classList.add("active");var r=document.createElement("ul");r.classList.add("nav-tab-wrapper"),t.parentNode.insertBefore(r,t)}}),[].concat(o(document.querySelectorAll("#ctl-options h2"))).map(function(t,e){t.classList.add("nav-tab"),t.dataset.index=e,document.querySelector("#ctl-options ul").appendChild(t),0===e&&t.classList.add("nav-tab-active")})}},{key:"bindEvents",value:function(){[].concat(o(document.querySelectorAll("#ctl-options ul h2"))).map(function(t){t.onclick=function(t){t.preventDefault();var e=t.target.dataset.index,r=[].concat(o(document.querySelectorAll("#ctl-options ul h2")));r.map(function(t){t.classList.remove("nav-tab-active")}),r[e].classList.add("nav-tab-active");var n=[].concat(o(document.querySelectorAll(".ctl-table")));return n.map(function(t){t.classList.remove("active")}),n[e].classList.add("active"),!1}})}}]),t}();e.default=i},function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}}(r(0));document.addEventListener("DOMContentLoaded",function(){new n.default})},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},e.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},p.call(b.prototype),p.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=c,t.Request=b,t.Response=v,t.fetch=function(t,r){return new Promise(function(n,o){var i=new b(t,r),s=new XMLHttpRequest;s.onload=function(){var t={status:s.status,statusText:s.statusText,headers:function(t){var e=new c;return t.split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e}(s.getAllResponseHeaders()||"")};t.url="responseURL"in s?s.responseURL:t.headers.get("X-Request-URL");var e="response"in s?s.response:s.responseText;n(new v(e,t))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.open(i.method,i.url,!0),"include"===i.credentials&&(s.withCredentials=!0),"responseType"in s&&e.blob&&(s.responseType="blob"),i.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var r={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(r[Symbol.iterator]=function(){return r}),r}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function h(t){var e=new FileReader,r=d(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&n(t))this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!o(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=y(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(h)}),this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=d(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}function b(t,e){var r=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return i.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function m(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function v(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e,r){r(2),t.exports=r(1)}]);
includes/background-processes/class-cyr-to-lat-conversion-process.php CHANGED
@@ -89,7 +89,7 @@ class Cyr_To_Lat_Conversion_Process extends WP_Background_Process {
89
  * @param string $message Message to log.
90
  */
91
  protected function log( $message ) {
92
- if ( WP_DEBUG_LOG ) {
93
  // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_error_log
94
  error_log( 'Cyr-To-Lat: ' . $message );
95
  // @phpcs:enable WordPress.PHP.DevelopmentFunctions.error_log_error_log
89
  * @param string $message Message to log.
90
  */
91
  protected function log( $message ) {
92
+ if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
93
  // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_error_log
94
  error_log( 'Cyr-To-Lat: ' . $message );
95
  // @phpcs:enable WordPress.PHP.DevelopmentFunctions.error_log_error_log
includes/class-cyr-to-lat-admin-notices.php CHANGED
@@ -48,9 +48,9 @@ class Cyr_To_Lat_Admin_Notices {
48
  ?>
49
  <div class="<?php echo esc_attr( $notice['class'] ); ?>">
50
  <p>
51
- <strong>
52
- <?php echo wp_kses( $notice['message'], wp_kses_allowed_html( 'post' ) ); ?>
53
- </strong>
54
  </p>
55
  </div>
56
  <?php
48
  ?>
49
  <div class="<?php echo esc_attr( $notice['class'] ); ?>">
50
  <p>
51
+ <strong>
52
+ <?php echo wp_kses_post( $notice['message'] ); ?>
53
+ </strong>
54
  </p>
55
  </div>
56
  <?php
includes/class-cyr-to-lat-conversion-tables.php CHANGED
@@ -16,6 +16,7 @@ class Cyr_To_Lat_Conversion_Tables {
16
  * Get conversion table by locale.
17
  *
18
  * @link https://ru.wikipedia.org/wiki/ISO_9
 
19
  * @param string $locale WordPress locale.
20
  *
21
  * @return array
@@ -287,9 +288,73 @@ class Cyr_To_Lat_Conversion_Tables {
287
  $table['Ý'] = 'O';
288
  $table['ý'] = 'o';
289
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  default:
291
  }
292
 
293
  return $table;
294
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
295
  }
16
  * Get conversion table by locale.
17
  *
18
  * @link https://ru.wikipedia.org/wiki/ISO_9
19
+ *
20
  * @param string $locale WordPress locale.
21
  *
22
  * @return array
288
  $table['Ý'] = 'O';
289
  $table['ý'] = 'o';
290
  break;
291
+ case 'he_IL':
292
+ $table = array(
293
+ 'א' => '',
294
+ 'ב' => 'b',
295
+ 'ג' => 'g',
296
+ 'ד' => 'd',
297
+ 'ה' => 'h',
298
+ 'ו' => 'w',
299
+ 'ז' => 'z',
300
+ 'ח' => 'x',
301
+ 'ט' => 't',
302
+ 'י' => 'y',
303
+ 'ך' => '',
304
+ 'כ' => 'kh',
305
+ 'ל' => 'l',
306
+ 'ם' => '',
307
+ 'מ' => 'm',
308
+ 'ן' => '',
309
+ 'נ' => 'n',
310
+ 'ס' => 's',
311
+ 'ע' => '',
312
+ 'ף' => '',
313
+ 'פ' => 'ph',
314
+ 'ץ' => '',
315
+ 'צ' => 's',
316
+ 'ק' => 'k',
317
+ 'ר' => 'r',
318
+ 'ש' => 'sh',
319
+ 'ת' => 'th',
320
+ );
321
+ for ( $code = 0x0590; $code <= 0x05CF; $code ++ ) {
322
+ $table[ self::mb_chr( $code ) ] = '';
323
+ }
324
+ for ( $code = 0x05F0; $code <= 0x05F5; $code ++ ) {
325
+ $table[ self::mb_chr( $code ) ] = '';
326
+ }
327
+ for ( $code = 0xFB1D; $code <= 0xFB4F; $code ++ ) {
328
+ $table[ self::mb_chr( $code ) ] = '';
329
+ }
330
+ break;
331
  default:
332
  }
333
 
334
  return $table;
335
  }
336
+
337
+ /**
338
+ * Simplified polyfill of mb_chr() function, to be used without mbstring extension.
339
+ *
340
+ * @link https://github.com/symfony/polyfill-mbstring/blob/master/Mbstring.php
341
+ *
342
+ * @param int $code Character code.
343
+ *
344
+ * @return string
345
+ */
346
+ public static function mb_chr( $code ) {
347
+ $code = $code % 0x200000;
348
+ if ( 0x80 > $code ) {
349
+ $s = \chr( $code );
350
+ } elseif ( 0x800 > $code ) {
351
+ $s = \chr( 0xC0 | $code >> 6 ) . \chr( 0x80 | $code & 0x3F );
352
+ } elseif ( 0x10000 > $code ) {
353
+ $s = \chr( 0xE0 | $code >> 12 ) . \chr( 0x80 | $code >> 6 & 0x3F ) . \chr( 0x80 | $code & 0x3F );
354
+ } else {
355
+ $s = \chr( 0xF0 | $code >> 18 ) . \chr( 0x80 | $code >> 12 & 0x3F ) . \chr( 0x80 | $code >> 6 & 0x3F ) . \chr( 0x80 | $code & 0x3F );
356
+ }
357
+
358
+ return $s;
359
+ }
360
  }
includes/class-cyr-to-lat-converter.php CHANGED
@@ -52,18 +52,44 @@ class Cyr_To_Lat_Converter {
52
  */
53
  private $admin_notices;
54
 
 
 
 
 
 
 
 
55
  /**
56
  * Cyr_To_Lat_Converter constructor.
57
  *
58
- * @param Cyr_To_Lat_Main $main Plugin main class.
59
- * @param Cyr_To_Lat_Settings $settings Plugin settings.
 
 
 
60
  */
61
- public function __construct( Cyr_To_Lat_Main $main, Cyr_To_Lat_Settings $settings ) {
62
- $this->main = $main;
63
- $this->settings = $settings;
64
- $this->process_all_posts = new Cyr_To_Lat_Post_Conversion_Process( $main );
65
- $this->process_all_terms = new Cyr_To_Lat_Term_Conversion_Process( $main );
66
- $this->admin_notices = new Cyr_To_Lat_Admin_Notices();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  $this->init_hooks();
68
  }
69
 
@@ -146,10 +172,7 @@ class Cyr_To_Lat_Converter {
146
  if ( ! isset( $_POST['cyr2lat-convert'] ) ) {
147
  return;
148
  }
149
-
150
- $settings = $this->settings;
151
- check_admin_referer( $settings::OPTION_GROUP . '-options' );
152
-
153
  $this->convert_existing_slugs();
154
  }
155
 
@@ -190,8 +213,7 @@ class Cyr_To_Lat_Converter {
190
  $posts = $wpdb->get_results(
191
  $wpdb->prepare(
192
  "SELECT ID, post_name FROM $wpdb->posts WHERE post_name REGEXP(%s) AND post_status IN (" .
193
- $this->main->ctl_prepare_in( $args['post_status'] ) .
194
- ') AND post_type IN (' .
195
  $this->main->ctl_prepare_in( $args['post_type'] ) . ')',
196
  $regexp
197
  )
@@ -245,91 +267,13 @@ class Cyr_To_Lat_Converter {
245
  }
246
  }
247
 
248
- /**
249
- * Filter WP_Background_Process::memory_exceeded() result.
250
- * This function expects memory limit coded in php.ini only in megabytes ( as '128M', for instance).
251
- * Thus, it returns wrong result when memory limit is encoded in other way.
252
- *
253
- * Filter does this job again.
254
- *
255
- * @param bool $return If memory is exceeded.
256
- *
257
- * @return mixed
258
- */
259
- public function memory_exceeded_filter( $return ) {
260
- $memory_limit = $this->get_memory_limit() * 0.9; // 90% of max memory
261
- $current_memory = memory_get_usage( true );
262
-
263
- return $current_memory >= $memory_limit;
264
- }
265
-
266
- /**
267
- * Get memory limit in bytes.
268
- *
269
- * @return int
270
- */
271
- protected function get_memory_limit() {
272
- if ( function_exists( 'ini_get' ) ) {
273
- $memory_limit = ini_get( 'memory_limit' );
274
- } else {
275
- // Sensible default.
276
- $memory_limit = '128M';
277
- }
278
-
279
- if ( ! $memory_limit || - 1 === intval( $memory_limit ) ) {
280
- // Unlimited, set to 32GB.
281
- $memory_limit = '32000M';
282
- }
283
-
284
- return $this->convert_shorthand_to_bytes( $memory_limit );
285
- }
286
-
287
- /**
288
- * Converts a shorthand byte value to an integer byte value.
289
- *
290
- * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
291
- *
292
- * @return int An integer byte value.
293
- */
294
- protected function convert_shorthand_to_bytes( $value ) {
295
- $value = strtolower( trim( $value ) );
296
- $bytes = (int) $value;
297
-
298
- if ( false !== strpos( $value, 'g' ) ) {
299
- $bytes *= 1024 * 1024 * 1024;
300
- } elseif ( false !== strpos( $value, 'm' ) ) {
301
- $bytes *= 1024 * 1024;
302
- } elseif ( false !== strpos( $value, 'k' ) ) {
303
- $bytes *= 1024;
304
- }
305
-
306
- // Deal with large (float) values which run into the maximum integer size.
307
- return min( $bytes, PHP_INT_MAX );
308
- }
309
-
310
- /**
311
- * Filter WP_Background_Process::time_exceeded() result.
312
- * Return false with WP_CLI.
313
- *
314
- * @param bool $return If memory is exceeded.
315
- *
316
- * @return mixed
317
- */
318
- public function time_exceeded_filter( $return ) {
319
- if ( defined( 'WP_CLI' ) && WP_CLI ) {
320
- return false;
321
- }
322
-
323
- return $return;
324
- }
325
-
326
  /**
327
  * Log
328
  *
329
  * @param string $message Message to log.
330
  */
331
  protected function log( $message ) {
332
- if ( WP_DEBUG_LOG ) {
333
  // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_error_log
334
  error_log( 'Cyr-To-Lat: ' . $message );
335
  // @phpcs:enable WordPress.PHP.DevelopmentFunctions.error_log_error_log
52
  */
53
  private $admin_notices;
54
 
55
+ /**
56
+ * Option group.
57
+ *
58
+ * @var string
59
+ */
60
+ private $option_group = '';
61
+
62
  /**
63
  * Cyr_To_Lat_Converter constructor.
64
  *
65
+ * @param Cyr_To_Lat_Main $main Plugin main class.
66
+ * @param Cyr_To_Lat_Settings $settings Plugin settings.
67
+ * @param Cyr_To_Lat_Post_Conversion_Process $process_all_posts Plugin settings.
68
+ * @param Cyr_To_Lat_Term_Conversion_Process $process_all_terms Plugin settings.
69
+ * @param Cyr_To_Lat_Admin_Notices $admin_notices Plugin settings.
70
  */
71
+ public function __construct(
72
+ $main, $settings, $process_all_posts = null, $process_all_terms = null, $admin_notices = null
73
+ ) {
74
+ $this->main = $main;
75
+ $this->settings = $settings;
76
+ $this->option_group = $this->settings::OPTION_GROUP;
77
+
78
+ $this->process_all_posts = $process_all_posts;
79
+ if ( ! $this->process_all_posts ) {
80
+ $this->process_all_posts = new Cyr_To_Lat_Post_Conversion_Process( $main );
81
+ }
82
+
83
+ $this->process_all_terms = $process_all_terms;
84
+ if ( ! $this->process_all_terms ) {
85
+ $this->process_all_terms = new Cyr_To_Lat_Term_Conversion_Process( $main );
86
+ }
87
+
88
+ $this->admin_notices = $admin_notices;
89
+ if ( ! $this->admin_notices ) {
90
+ $this->admin_notices = new Cyr_To_Lat_Admin_Notices();
91
+ }
92
+
93
  $this->init_hooks();
94
  }
95
 
172
  if ( ! isset( $_POST['cyr2lat-convert'] ) ) {
173
  return;
174
  }
175
+ check_admin_referer( $this->option_group . '-options' );
 
 
 
176
  $this->convert_existing_slugs();
177
  }
178
 
213
  $posts = $wpdb->get_results(
214
  $wpdb->prepare(
215
  "SELECT ID, post_name FROM $wpdb->posts WHERE post_name REGEXP(%s) AND post_status IN (" .
216
+ $this->main->ctl_prepare_in( $args['post_status'] ) . ') AND post_type IN (' .
 
217
  $this->main->ctl_prepare_in( $args['post_type'] ) . ')',
218
  $regexp
219
  )
267
  }
268
  }
269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  /**
271
  * Log
272
  *
273
  * @param string $message Message to log.
274
  */
275
  protected function log( $message ) {
276
+ if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
277
  // @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_error_log
278
  error_log( 'Cyr-To-Lat: ' . $message );
279
  // @phpcs:enable WordPress.PHP.DevelopmentFunctions.error_log_error_log
includes/class-cyr-to-lat-main.php CHANGED
@@ -120,10 +120,10 @@ class Cyr_To_Lat_Main {
120
  return $pre;
121
  }
122
 
123
- // Locales list - https://make.wordpress.org/polyglots/teams/.
124
- $locale = get_locale();
125
- $iso9_table = $this->settings->get_option( $locale );
126
- $iso9_table = ! empty( $iso9_table ) ? $iso9_table : $this->settings->get_option( 'iso9' );
127
 
128
  $is_term = false;
129
  // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
@@ -143,15 +143,11 @@ class Cyr_To_Lat_Main {
143
  if ( ! empty( $term ) ) {
144
  $title = $term;
145
  } else {
146
- $title = strtr( $title, apply_filters( 'ctl_table', $iso9_table ) );
147
 
148
  if ( function_exists( 'iconv' ) ) {
149
  $title = iconv( 'UTF-8', 'UTF-8//TRANSLIT//IGNORE', $title );
150
  }
151
-
152
- $title = preg_replace( '/' . self::PROHIBITED_CHARS_REGEX . '/', '-', $title );
153
- $title = preg_replace( '/\-+/', '-', $title );
154
- $title = trim( $title, '-' );
155
  }
156
 
157
  return $title;
120
  return $pre;
121
  }
122
 
123
+ // List of locales: https://make.wordpress.org/polyglots/teams/.
124
+ $locale = get_locale();
125
+ $table = $this->settings->get_option( $locale );
126
+ $table = ! empty( $table ) ? $table : $this->settings->get_option( 'iso9' );
127
 
128
  $is_term = false;
129
  // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
143
  if ( ! empty( $term ) ) {
144
  $title = $term;
145
  } else {
146
+ $title = strtr( $title, apply_filters( 'ctl_table', $table ) );
147
 
148
  if ( function_exists( 'iconv' ) ) {
149
  $title = iconv( 'UTF-8', 'UTF-8//TRANSLIT//IGNORE', $title );
150
  }
 
 
 
 
151
  }
152
 
153
  return $title;
includes/class-cyr-to-lat-settings.php CHANGED
@@ -193,6 +193,15 @@ class Cyr_To_Lat_Settings {
193
  'supplemental' => '',
194
  'default' => Cyr_To_Lat_Conversion_Tables::get( 'kk' ),
195
  ),
 
 
 
 
 
 
 
 
 
196
  );
197
  }
198
 
@@ -324,6 +333,10 @@ class Cyr_To_Lat_Settings {
324
  * Setup settings sections.
325
  */
326
  public function setup_sections() {
 
 
 
 
327
  add_settings_section(
328
  'iso9_section',
329
  __( 'ISO9 Table', 'cyr2lat' ),
@@ -366,6 +379,12 @@ class Cyr_To_Lat_Settings {
366
  array( $this, 'cyr_to_lat_section' ),
367
  self::PAGE
368
  );
 
 
 
 
 
 
369
  }
370
 
371
  /**
@@ -409,6 +428,10 @@ class Cyr_To_Lat_Settings {
409
  * @param array $arguments Field arguments.
410
  */
411
  public function field_callback( $arguments ) {
 
 
 
 
412
  $value = $this->get_option( $arguments['field_id'] );
413
 
414
  // Check which type of field we want.
@@ -566,6 +589,7 @@ class Cyr_To_Lat_Settings {
566
  }
567
  break;
568
  default:
 
569
  }
570
 
571
  // If there is help text.
@@ -656,6 +680,7 @@ class Cyr_To_Lat_Settings {
656
  $value[ $key ] = $form_field_value;
657
  break;
658
  default:
 
659
  }
660
  }
661
 
193
  'supplemental' => '',
194
  'default' => Cyr_To_Lat_Conversion_Tables::get( 'kk' ),
195
  ),
196
+ 'he_IL' => array(
197
+ 'label' => __( 'he_IL Table', 'cyr2lat' ),
198
+ 'section' => 'he_IL_section',
199
+ 'type' => 'table',
200
+ 'placeholder' => '',
201
+ 'helper' => '',
202
+ 'supplemental' => '',
203
+ 'default' => Cyr_To_Lat_Conversion_Tables::get( 'he_IL' ),
204
+ ),
205
  );
206
  }
207
 
333
  * Setup settings sections.
334
  */
335
  public function setup_sections() {
336
+ if ( ! $this->is_ctl_options_screen() ) {
337
+ return;
338
+ }
339
+
340
  add_settings_section(
341
  'iso9_section',
342
  __( 'ISO9 Table', 'cyr2lat' ),
379
  array( $this, 'cyr_to_lat_section' ),
380
  self::PAGE
381
  );
382
+ add_settings_section(
383
+ 'he_IL_section',
384
+ __( 'he_IL Table', 'cyr2lat' ),
385
+ array( $this, 'cyr_to_lat_section' ),
386
+ self::PAGE
387
+ );
388
  }
389
 
390
  /**
428
  * @param array $arguments Field arguments.
429
  */
430
  public function field_callback( $arguments ) {
431
+ if ( ! isset( $arguments['field_id'] ) ) {
432
+ return;
433
+ }
434
+
435
  $value = $this->get_option( $arguments['field_id'] );
436
 
437
  // Check which type of field we want.
589
  }
590
  break;
591
  default:
592
+ break;
593
  }
594
 
595
  // If there is help text.
680
  $value[ $key ] = $form_field_value;
681
  break;
682
  default:
683
+ break;
684
  }
685
  }
686
 
includes/class-cyr-to-lat-wp-cli.php CHANGED
@@ -50,16 +50,18 @@ class Cyr_To_Lat_WP_CLI extends WP_CLI_Command {
50
  *
51
  * @var \cli\progress\Bar $notify
52
  */
53
- $notify = \WP_CLI\Utils\make_progress_bar( 'Regenerate old slugs', 1 );
54
 
55
  $result = array();
56
 
57
  if ( ! empty( $assoc_args['post_status'] ) ) {
58
  $result['post_status'] = explode( ',', $assoc_args['post_status'] );
 
59
  }
60
 
61
  if ( ! empty( $assoc_args['post_type'] ) ) {
62
  $result['post_type'] = explode( ',', $assoc_args['post_type'] );
 
63
  }
64
 
65
  $this->converter->convert_existing_slugs( $result );
@@ -68,4 +70,13 @@ class Cyr_To_Lat_WP_CLI extends WP_CLI_Command {
68
 
69
  WP_CLI::success( 'Regenerate Completed.' );
70
  }
 
 
 
 
 
 
 
 
 
71
  }
50
  *
51
  * @var \cli\progress\Bar $notify
52
  */
53
+ $notify = $this->make_progress_bar();
54
 
55
  $result = array();
56
 
57
  if ( ! empty( $assoc_args['post_status'] ) ) {
58
  $result['post_status'] = explode( ',', $assoc_args['post_status'] );
59
+ $result['post_status'] = array_values( array_filter( array_map( 'trim', $result['post_status'] ) ) );
60
  }
61
 
62
  if ( ! empty( $assoc_args['post_type'] ) ) {
63
  $result['post_type'] = explode( ',', $assoc_args['post_type'] );
64
+ $result['post_type'] = array_values( array_filter( array_map( 'trim', $result['post_type'] ) ) );
65
  }
66
 
67
  $this->converter->convert_existing_slugs( $result );
70
 
71
  WP_CLI::success( 'Regenerate Completed.' );
72
  }
73
+
74
+ /**
75
+ * Make progress bar.
76
+ *
77
+ * @return \cli\progress\Bar|\WP_CLI\NoOp
78
+ */
79
+ protected function make_progress_bar() {
80
+ return \WP_CLI\Utils\make_progress_bar( 'Regenerate existing slugs', 1 );
81
+ }
82
  }
languages/cyr2lat-ru_RU.mo CHANGED
Binary file
languages/cyr2lat-ru_RU.po CHANGED
@@ -1,27 +1,30 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
- "POT-Creation-Date: 2019-04-21 15:42+0300\n"
5
- "PO-Revision-Date: 2019-04-21 15:43+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 2.2.1\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
- "X-Poedit-SearchPath-1: src\n"
20
  "X-Poedit-SearchPathExcluded-0: vendor\n"
21
  "X-Poedit-SearchPathExcluded-1: dist\n"
22
  "X-Poedit-SearchPathExcluded-2: src\n"
23
 
24
- #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:52
 
 
 
 
25
  msgid "Post slugs conversion completed."
26
  msgstr "Конвертация ярлыков постов завершена."
27
 
@@ -33,44 +36,44 @@ msgstr "Ярлык термина сконвертирован:"
33
  msgid "Term slugs conversion completed."
34
  msgstr "Конвертация ярлыков терминов завершена."
35
 
36
- #: includes/class-cyr-to-lat-converter.php:108
37
  msgid "Cyr To Lat converts existing post slugs in the background process."
38
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
39
 
40
- #: includes/class-cyr-to-lat-converter.php:115
41
  msgid "Cyr To Lat converts existing term slugs in the background process."
42
  msgstr ""
43
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
44
 
45
- #: includes/class-cyr-to-lat-converter.php:122
46
  msgid "Cyr To Lat completed conversion of existing post slugs."
47
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
48
 
49
- #: includes/class-cyr-to-lat-converter.php:129
50
  msgid "Cyr To Lat completed conversion of existing term slugs."
51
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
52
 
53
- #: includes/class-cyr-to-lat-converter.php:194
54
  msgid "Post slugs conversion started."
55
  msgstr "Начата конвертация ярлыков постов."
56
 
57
- #: includes/class-cyr-to-lat-converter.php:196
58
  msgid "Cyr To Lat started conversion of existing post slugs."
59
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
60
 
61
- #: includes/class-cyr-to-lat-converter.php:201
62
  msgid "Cyr To Lat has not found existing post slugs for conversion."
63
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
64
 
65
- #: includes/class-cyr-to-lat-converter.php:221
66
  msgid "Term slugs conversion started."
67
  msgstr "Начата конвертация ярлыков терминов."
68
 
69
- #: includes/class-cyr-to-lat-converter.php:223
70
  msgid "Cyr To Lat started conversion of existing term slugs."
71
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
72
 
73
- #: includes/class-cyr-to-lat-converter.php:228
74
  msgid "Cyr To Lat has not found existing term slugs for conversion."
75
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
76
 
@@ -83,72 +86,74 @@ msgid "Settings"
83
  msgstr "Настройки"
84
 
85
  #: includes/class-cyr-to-lat-settings.php:134
86
- #: includes/class-cyr-to-lat-settings.php:329
87
  msgid "ISO9 Table"
88
  msgstr "Таблица ISO9"
89
 
90
  #: includes/class-cyr-to-lat-settings.php:143
91
- #: includes/class-cyr-to-lat-settings.php:335
92
  msgid "bel Table"
93
  msgstr "Таблица bel"
94
 
95
  #: includes/class-cyr-to-lat-settings.php:152
96
- #: includes/class-cyr-to-lat-settings.php:341
97
  msgid "uk Table"
98
  msgstr "Таблица uk"
99
 
100
  #: includes/class-cyr-to-lat-settings.php:161
101
- #: includes/class-cyr-to-lat-settings.php:347
102
  msgid "bg_BG Table"
103
  msgstr "Таблица bg_BG"
104
 
105
  #: includes/class-cyr-to-lat-settings.php:170
106
- #: includes/class-cyr-to-lat-settings.php:353
107
  msgid "mk_MK Table"
108
  msgstr "Таблица mk_MK"
109
 
110
  #: includes/class-cyr-to-lat-settings.php:179
111
- #: includes/class-cyr-to-lat-settings.php:359
112
  msgid "ka_GE Table"
113
  msgstr "Таблица ka_GE"
114
 
115
  #: includes/class-cyr-to-lat-settings.php:188
116
- #: includes/class-cyr-to-lat-settings.php:365
117
  msgid "kk Table"
118
  msgstr "Таблица kk"
119
 
120
- #: includes/class-cyr-to-lat-settings.php:252
121
- #: includes/class-cyr-to-lat-settings.php:253
 
 
 
 
 
122
  msgid "Cyr To Lat"
123
  msgstr "Cyr To Lat"
124
 
125
  #. Admin panel title.
126
- #: includes/class-cyr-to-lat-settings.php:273
127
  msgid "Cyr To Lat Plugin Options"
128
  msgstr "Опции плагина Cyr To Lat"
129
 
130
- #: includes/class-cyr-to-lat-settings.php:288
131
  msgid "Convert Existing Slugs"
132
  msgstr "Конвертировать существующие ярлыки"
133
 
134
- #: includes/class-cyr-to-lat-settings.php:294
135
  msgid "Donate"
136
  msgstr "Пожертвовать"
137
 
138
- #: includes/class-cyr-to-lat-settings.php:297
139
  msgid "Would you like to support the advancement of this plugin?"
140
  msgstr "Хотите поддержать развитие этого плагина?"
141
 
142
- #: includes/class-cyr-to-lat-settings.php:311
143
  msgid "Your appreciation"
144
  msgstr "Ваша оценка"
145
 
146
- #: includes/class-cyr-to-lat-settings.php:316
147
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
148
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
149
 
150
- #~ msgid "Post slug converted:"
151
- #~ msgstr "Ярлык поста сконвертирован:"
152
-
153
  #~ msgid "General Options"
154
  #~ msgstr "Общие настройки"
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Cyr To Lat\n"
4
+ "POT-Creation-Date: 2019-05-18 11:23+0300\n"
5
+ "PO-Revision-Date: 2019-05-18 11:31+0300\n"
6
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
  "Language-Team: KAGG Design\n"
8
  "Language: ru_RU\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2.2\n"
13
  "X-Poedit-Basepath: ..\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
16
  "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
  "X-Poedit-Flags-xgettext: --add-comments\n"
18
  "X-Poedit-SearchPath-0: .\n"
 
19
  "X-Poedit-SearchPathExcluded-0: vendor\n"
20
  "X-Poedit-SearchPathExcluded-1: dist\n"
21
  "X-Poedit-SearchPathExcluded-2: src\n"
22
 
23
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:39
24
+ msgid "Post slug converted:"
25
+ msgstr "Ярлык поста сконвертирован:"
26
+
27
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:50
28
  msgid "Post slugs conversion completed."
29
  msgstr "Конвертация ярлыков постов завершена."
30
 
36
  msgid "Term slugs conversion completed."
37
  msgstr "Конвертация ярлыков терминов завершена."
38
 
39
+ #: includes/class-cyr-to-lat-converter.php:141
40
  msgid "Cyr To Lat converts existing post slugs in the background process."
41
  msgstr "Cyr To Lat конвертирует существующие ярлыки постов в фоновом процессе."
42
 
43
+ #: includes/class-cyr-to-lat-converter.php:148
44
  msgid "Cyr To Lat converts existing term slugs in the background process."
45
  msgstr ""
46
  "Cyr To Lat конвертирует существующие ярлыки терминов в фоновом процессе."
47
 
48
+ #: includes/class-cyr-to-lat-converter.php:155
49
  msgid "Cyr To Lat completed conversion of existing post slugs."
50
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков постов."
51
 
52
+ #: includes/class-cyr-to-lat-converter.php:162
53
  msgid "Cyr To Lat completed conversion of existing term slugs."
54
  msgstr "Cyr To Lat завершил конвертацию существующих ярлыков терминов."
55
 
56
+ #: includes/class-cyr-to-lat-converter.php:230
57
  msgid "Post slugs conversion started."
58
  msgstr "Начата конвертация ярлыков постов."
59
 
60
+ #: includes/class-cyr-to-lat-converter.php:232
61
  msgid "Cyr To Lat started conversion of existing post slugs."
62
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков постов."
63
 
64
+ #: includes/class-cyr-to-lat-converter.php:237
65
  msgid "Cyr To Lat has not found existing post slugs for conversion."
66
  msgstr "Cyr To Lat не нашёл существующих ярлыков постов для конвертации."
67
 
68
+ #: includes/class-cyr-to-lat-converter.php:257
69
  msgid "Term slugs conversion started."
70
  msgstr "Начата конвертация ярлыков терминов."
71
 
72
+ #: includes/class-cyr-to-lat-converter.php:259
73
  msgid "Cyr To Lat started conversion of existing term slugs."
74
  msgstr "Cyr To Lat начал конвертацию существующих ярлыков терминов."
75
 
76
+ #: includes/class-cyr-to-lat-converter.php:264
77
  msgid "Cyr To Lat has not found existing term slugs for conversion."
78
  msgstr "Cyr To Lat не нашёл существующих ярлыков терминов для конвертации."
79
 
86
  msgstr "Настройки"
87
 
88
  #: includes/class-cyr-to-lat-settings.php:134
89
+ #: includes/class-cyr-to-lat-settings.php:342
90
  msgid "ISO9 Table"
91
  msgstr "Таблица ISO9"
92
 
93
  #: includes/class-cyr-to-lat-settings.php:143
94
+ #: includes/class-cyr-to-lat-settings.php:348
95
  msgid "bel Table"
96
  msgstr "Таблица bel"
97
 
98
  #: includes/class-cyr-to-lat-settings.php:152
99
+ #: includes/class-cyr-to-lat-settings.php:354
100
  msgid "uk Table"
101
  msgstr "Таблица uk"
102
 
103
  #: includes/class-cyr-to-lat-settings.php:161
104
+ #: includes/class-cyr-to-lat-settings.php:360
105
  msgid "bg_BG Table"
106
  msgstr "Таблица bg_BG"
107
 
108
  #: includes/class-cyr-to-lat-settings.php:170
109
+ #: includes/class-cyr-to-lat-settings.php:366
110
  msgid "mk_MK Table"
111
  msgstr "Таблица mk_MK"
112
 
113
  #: includes/class-cyr-to-lat-settings.php:179
114
+ #: includes/class-cyr-to-lat-settings.php:372
115
  msgid "ka_GE Table"
116
  msgstr "Таблица ka_GE"
117
 
118
  #: includes/class-cyr-to-lat-settings.php:188
119
+ #: includes/class-cyr-to-lat-settings.php:378
120
  msgid "kk Table"
121
  msgstr "Таблица kk"
122
 
123
+ #: includes/class-cyr-to-lat-settings.php:197
124
+ #: includes/class-cyr-to-lat-settings.php:384
125
+ msgid "he_IL Table"
126
+ msgstr "Таблица he_IL"
127
+
128
+ #: includes/class-cyr-to-lat-settings.php:261
129
+ #: includes/class-cyr-to-lat-settings.php:262
130
  msgid "Cyr To Lat"
131
  msgstr "Cyr To Lat"
132
 
133
  #. Admin panel title.
134
+ #: includes/class-cyr-to-lat-settings.php:282
135
  msgid "Cyr To Lat Plugin Options"
136
  msgstr "Опции плагина Cyr To Lat"
137
 
138
+ #: includes/class-cyr-to-lat-settings.php:297
139
  msgid "Convert Existing Slugs"
140
  msgstr "Конвертировать существующие ярлыки"
141
 
142
+ #: includes/class-cyr-to-lat-settings.php:303
143
  msgid "Donate"
144
  msgstr "Пожертвовать"
145
 
146
+ #: includes/class-cyr-to-lat-settings.php:306
147
  msgid "Would you like to support the advancement of this plugin?"
148
  msgstr "Хотите поддержать развитие этого плагина?"
149
 
150
+ #: includes/class-cyr-to-lat-settings.php:320
151
  msgid "Your appreciation"
152
  msgstr "Ваша оценка"
153
 
154
+ #: includes/class-cyr-to-lat-settings.php:325
155
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
156
  msgstr "Оставьте ★★★★★ обзор плагина на WordPress.org"
157
 
 
 
 
158
  #~ msgid "General Options"
159
  #~ msgstr "Общие настройки"
languages/cyr2lat-sv.mo ADDED
Binary file
languages/cyr2lat-sv.po ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
+ "POT-Creation-Date: 2019-05-18 11:37+0300\n"
5
+ "PO-Revision-Date: 2019-05-18 11:37+0300\n"
6
+ "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
+ "Language-Team: \n"
8
+ "Language: sv_SE\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: Poedit 2.2.2\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
16
+ "X-Poedit-Flags-xgettext: --add-comments\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPathExcluded-0: vendor\n"
19
+ "X-Poedit-SearchPathExcluded-1: dist\n"
20
+ "X-Poedit-SearchPathExcluded-2: src\n"
21
+
22
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:39
23
+ msgid "Post slug converted:"
24
+ msgstr "Konverterad inläggs-slug:"
25
+
26
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:50
27
+ msgid "Post slugs conversion completed."
28
+ msgstr "Konvertering av inläggs-sluggar är klar."
29
+
30
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:38
31
+ msgid "Term slug converted:"
32
+ msgstr "Konverterad term-slug:"
33
+
34
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:49
35
+ msgid "Term slugs conversion completed."
36
+ msgstr "Konvertering av term-sluggar är klar."
37
+
38
+ #: includes/class-cyr-to-lat-converter.php:141
39
+ msgid "Cyr To Lat converts existing post slugs in the background process."
40
+ msgstr ""
41
+ "Cyr To Lat konverterar befintliga inläggssluggar i en process som körs i "
42
+ "bakgrunden."
43
+
44
+ #: includes/class-cyr-to-lat-converter.php:148
45
+ msgid "Cyr To Lat converts existing term slugs in the background process."
46
+ msgstr ""
47
+ "Cyr To Lat konverterar befintliga term-sluggar i en process som körs i "
48
+ "bakgrunden."
49
+
50
+ #: includes/class-cyr-to-lat-converter.php:155
51
+ msgid "Cyr To Lat completed conversion of existing post slugs."
52
+ msgstr "Cyr To Lat har genomfört konverteringen av befintliga inläggs-sluggar."
53
+
54
+ #: includes/class-cyr-to-lat-converter.php:162
55
+ msgid "Cyr To Lat completed conversion of existing term slugs."
56
+ msgstr "Cyr To Lat har genomfört konverteringen av befintliga term-sluggar."
57
+
58
+ #: includes/class-cyr-to-lat-converter.php:230
59
+ msgid "Post slugs conversion started."
60
+ msgstr "Konverteringen av inläggs-sluggar har inletts."
61
+
62
+ #: includes/class-cyr-to-lat-converter.php:232
63
+ msgid "Cyr To Lat started conversion of existing post slugs."
64
+ msgstr "Cyr To Lat har inlett konverteringen av befintliga inläggs-sluggar."
65
+
66
+ #: includes/class-cyr-to-lat-converter.php:237
67
+ msgid "Cyr To Lat has not found existing post slugs for conversion."
68
+ msgstr ""
69
+ "Cyr To Lat hittade inga befintliga inläggs-sluggar som behöver konverteras."
70
+
71
+ #: includes/class-cyr-to-lat-converter.php:257
72
+ msgid "Term slugs conversion started."
73
+ msgstr "Konverteringen av term-sluggar har inletts."
74
+
75
+ #: includes/class-cyr-to-lat-converter.php:259
76
+ msgid "Cyr To Lat started conversion of existing term slugs."
77
+ msgstr "Cyr To Lat har inlett konverteringen av befintliga term-sluggar."
78
+
79
+ #: includes/class-cyr-to-lat-converter.php:264
80
+ msgid "Cyr To Lat has not found existing term slugs for conversion."
81
+ msgstr ""
82
+ "Cyr To Lat hittade inga befintliga term-sluggar som behöver konverteras."
83
+
84
+ #: includes/class-cyr-to-lat-settings.php:121
85
+ msgid "View Cyr To Lat settings"
86
+ msgstr "Visa inställningar för Cyr To Lat"
87
+
88
+ #: includes/class-cyr-to-lat-settings.php:122
89
+ msgid "Settings"
90
+ msgstr "Inställningar"
91
+
92
+ #: includes/class-cyr-to-lat-settings.php:134
93
+ #: includes/class-cyr-to-lat-settings.php:342
94
+ msgid "ISO9 Table"
95
+ msgstr "ISO9-tabell"
96
+
97
+ #: includes/class-cyr-to-lat-settings.php:143
98
+ #: includes/class-cyr-to-lat-settings.php:348
99
+ msgid "bel Table"
100
+ msgstr "Tabell för bel"
101
+
102
+ #: includes/class-cyr-to-lat-settings.php:152
103
+ #: includes/class-cyr-to-lat-settings.php:354
104
+ msgid "uk Table"
105
+ msgstr "Tabell för uk"
106
+
107
+ #: includes/class-cyr-to-lat-settings.php:161
108
+ #: includes/class-cyr-to-lat-settings.php:360
109
+ msgid "bg_BG Table"
110
+ msgstr "Tabell för bg_BG"
111
+
112
+ #: includes/class-cyr-to-lat-settings.php:170
113
+ #: includes/class-cyr-to-lat-settings.php:366
114
+ msgid "mk_MK Table"
115
+ msgstr "Tabell för mk_MK"
116
+
117
+ #: includes/class-cyr-to-lat-settings.php:179
118
+ #: includes/class-cyr-to-lat-settings.php:372
119
+ msgid "ka_GE Table"
120
+ msgstr "Tabell för ka_GE"
121
+
122
+ #: includes/class-cyr-to-lat-settings.php:188
123
+ #: includes/class-cyr-to-lat-settings.php:378
124
+ msgid "kk Table"
125
+ msgstr "Tabell för kk"
126
+
127
+ #: includes/class-cyr-to-lat-settings.php:197
128
+ #: includes/class-cyr-to-lat-settings.php:384
129
+ msgid "he_IL Table"
130
+ msgstr "Tabell för he_IL"
131
+
132
+ #: includes/class-cyr-to-lat-settings.php:261
133
+ #: includes/class-cyr-to-lat-settings.php:262
134
+ msgid "Cyr To Lat"
135
+ msgstr "Cyr To Lat"
136
+
137
+ #. Admin panel title.
138
+ #: includes/class-cyr-to-lat-settings.php:282
139
+ msgid "Cyr To Lat Plugin Options"
140
+ msgstr "Alternativ för tillägget Cyr To Lat"
141
+
142
+ #: includes/class-cyr-to-lat-settings.php:297
143
+ msgid "Convert Existing Slugs"
144
+ msgstr "Konvertera befintliga sluggar"
145
+
146
+ #: includes/class-cyr-to-lat-settings.php:303
147
+ msgid "Donate"
148
+ msgstr "Donera"
149
+
150
+ #: includes/class-cyr-to-lat-settings.php:306
151
+ msgid "Would you like to support the advancement of this plugin?"
152
+ msgstr "Vill du stödja den vidare utvecklingen av detta tillägg?"
153
+
154
+ #: includes/class-cyr-to-lat-settings.php:320
155
+ msgid "Your appreciation"
156
+ msgstr "Din uppskattning"
157
+
158
+ #: includes/class-cyr-to-lat-settings.php:325
159
+ msgid "Leave a ★★★★★ plugin review on WordPress.org"
160
+ msgstr "Ge tillägget betyget ★★★★★ på WordPress.org"
161
+
162
+ #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
163
+ #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
164
+
165
+ #~ msgid "Sergey Biryukov, Mikhail Kobzarev, Igor Gergel"
166
+ #~ msgstr "Sergey Biryukov, Mikhail Kobzarev, Igor Gergel"
167
+
168
+ #~ msgid ""
169
+ #~ "Converts Cyrillic characters in post and term slugs to Latin characters. "
170
+ #~ "Useful for creating human-readable URLs. Based on the original plugin by "
171
+ #~ "Anton Skorobogatov."
172
+ #~ msgstr ""
173
+ #~ "Konverterar kyrilliska bokstäver i sluggen för inlägg och termer till "
174
+ #~ "latinska tecken. Användbart för att skapa URL:er som går att läsa. "
175
+ #~ "Baserat på ett ursprungligt tillägg av Anton Skorobogatov."
176
+
177
+ #~ msgid "https://wordpress.org/plugins/cyr2lat/"
178
+ #~ msgstr "https://sv.wordpress.org/plugins/cyr2lat/"
179
+
180
+ #~ msgid "Cyr-To-Lat"
181
+ #~ msgstr "Cyr-To-Lat"
languages/cyr2lat-uk.mo ADDED
Binary file
languages/cyr2lat-uk.po ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Plugins - Cyr-To-Lat - Development (trunk)\n"
4
+ "POT-Creation-Date: 2019-05-18 11:34+0300\n"
5
+ "PO-Revision-Date: 2019-05-18 11:35+0300\n"
6
+ "Last-Translator: KAGG Design <info@kagg.eu>\n"
7
+ "Language-Team: \n"
8
+ "Language: uk_UA\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
13
+ "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
14
+ "X-Generator: Poedit 2.2.2\n"
15
+ "X-Poedit-Basepath: ..\n"
16
+ "X-Poedit-KeywordsList: __;esc_html__;esc_attr__\n"
17
+ "X-Poedit-Flags-xgettext: --add-comments\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPathExcluded-0: vendor\n"
20
+ "X-Poedit-SearchPathExcluded-1: dist\n"
21
+ "X-Poedit-SearchPathExcluded-2: src\n"
22
+
23
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:39
24
+ msgid "Post slug converted:"
25
+ msgstr "Посилання запису конвертовано:"
26
+
27
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:50
28
+ msgid "Post slugs conversion completed."
29
+ msgstr "Конвертація посилань записів завершена."
30
+
31
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:38
32
+ msgid "Term slug converted:"
33
+ msgstr "Посилання терміну конвертовано:"
34
+
35
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:49
36
+ msgid "Term slugs conversion completed."
37
+ msgstr "Конвертація посилань термінів завершена."
38
+
39
+ #: includes/class-cyr-to-lat-converter.php:141
40
+ msgid "Cyr To Lat converts existing post slugs in the background process."
41
+ msgstr "Cyr To Lat конвертує існуючі посилання записів у фоновому процесі."
42
+
43
+ #: includes/class-cyr-to-lat-converter.php:148
44
+ msgid "Cyr To Lat converts existing term slugs in the background process."
45
+ msgstr "Cyr To Lat конвертує існуючі посилання термінів у фоновому процесі."
46
+
47
+ #: includes/class-cyr-to-lat-converter.php:155
48
+ msgid "Cyr To Lat completed conversion of existing post slugs."
49
+ msgstr "Cyr To Lat завершив конвертацію існуючих посилань записів."
50
+
51
+ #: includes/class-cyr-to-lat-converter.php:162
52
+ msgid "Cyr To Lat completed conversion of existing term slugs."
53
+ msgstr "Cyr To Lat завершив конвертацію існуючих посилань термінів."
54
+
55
+ #: includes/class-cyr-to-lat-converter.php:230
56
+ msgid "Post slugs conversion started."
57
+ msgstr "Розпочато конвертація посилань записів."
58
+
59
+ #: includes/class-cyr-to-lat-converter.php:232
60
+ msgid "Cyr To Lat started conversion of existing post slugs."
61
+ msgstr "Cyr To Lat почав конвертацію існуючих посилань записів."
62
+
63
+ #: includes/class-cyr-to-lat-converter.php:237
64
+ msgid "Cyr To Lat has not found existing post slugs for conversion."
65
+ msgstr "Cyr To Lat не знайшов існуючих посилань записів для конвертації."
66
+
67
+ #: includes/class-cyr-to-lat-converter.php:257
68
+ msgid "Term slugs conversion started."
69
+ msgstr "Розпочато конвертацію посилань термінів."
70
+
71
+ #: includes/class-cyr-to-lat-converter.php:259
72
+ msgid "Cyr To Lat started conversion of existing term slugs."
73
+ msgstr "Cyr To Lat почав конвертацію існуючих посилань термінів."
74
+
75
+ #: includes/class-cyr-to-lat-converter.php:264
76
+ msgid "Cyr To Lat has not found existing term slugs for conversion."
77
+ msgstr "Cyr To Lat не знайшов існуючих посилань термінів для конвертації."
78
+
79
+ #: includes/class-cyr-to-lat-settings.php:121
80
+ msgid "View Cyr To Lat settings"
81
+ msgstr "Подивитися налаштування Cyr To Lat"
82
+
83
+ #: includes/class-cyr-to-lat-settings.php:122
84
+ msgid "Settings"
85
+ msgstr "Налаштування"
86
+
87
+ #: includes/class-cyr-to-lat-settings.php:134
88
+ #: includes/class-cyr-to-lat-settings.php:342
89
+ msgid "ISO9 Table"
90
+ msgstr "Таблиця ISO9"
91
+
92
+ #: includes/class-cyr-to-lat-settings.php:143
93
+ #: includes/class-cyr-to-lat-settings.php:348
94
+ msgid "bel Table"
95
+ msgstr "Таблиця bel"
96
+
97
+ #: includes/class-cyr-to-lat-settings.php:152
98
+ #: includes/class-cyr-to-lat-settings.php:354
99
+ msgid "uk Table"
100
+ msgstr "Таблиця uk"
101
+
102
+ #: includes/class-cyr-to-lat-settings.php:161
103
+ #: includes/class-cyr-to-lat-settings.php:360
104
+ msgid "bg_BG Table"
105
+ msgstr "Таблиця bg_BG"
106
+
107
+ #: includes/class-cyr-to-lat-settings.php:170
108
+ #: includes/class-cyr-to-lat-settings.php:366
109
+ msgid "mk_MK Table"
110
+ msgstr "Таблиця mk_MK"
111
+
112
+ #: includes/class-cyr-to-lat-settings.php:179
113
+ #: includes/class-cyr-to-lat-settings.php:372
114
+ msgid "ka_GE Table"
115
+ msgstr "Таблиця ka_GE"
116
+
117
+ #: includes/class-cyr-to-lat-settings.php:188
118
+ #: includes/class-cyr-to-lat-settings.php:378
119
+ msgid "kk Table"
120
+ msgstr "Таблиця kk"
121
+
122
+ #: includes/class-cyr-to-lat-settings.php:197
123
+ #: includes/class-cyr-to-lat-settings.php:384
124
+ msgid "he_IL Table"
125
+ msgstr "Таблиця he_IL"
126
+
127
+ #: includes/class-cyr-to-lat-settings.php:261
128
+ #: includes/class-cyr-to-lat-settings.php:262
129
+ msgid "Cyr To Lat"
130
+ msgstr "Cyr To Lat"
131
+
132
+ #. Admin panel title.
133
+ #: includes/class-cyr-to-lat-settings.php:282
134
+ msgid "Cyr To Lat Plugin Options"
135
+ msgstr "Опції плагіну Cyr To Lat"
136
+
137
+ #: includes/class-cyr-to-lat-settings.php:297
138
+ msgid "Convert Existing Slugs"
139
+ msgstr "Конвертувати існуючі посилання"
140
+
141
+ #: includes/class-cyr-to-lat-settings.php:303
142
+ msgid "Donate"
143
+ msgstr "Пожертвувати"
144
+
145
+ #: includes/class-cyr-to-lat-settings.php:306
146
+ msgid "Would you like to support the advancement of this plugin?"
147
+ msgstr "Хочете підтримати розвиток цього плагіну?"
148
+
149
+ #: includes/class-cyr-to-lat-settings.php:320
150
+ msgid "Your appreciation"
151
+ msgstr "Ваша оцінка"
152
+
153
+ #: includes/class-cyr-to-lat-settings.php:325
154
+ msgid "Leave a ★★★★★ plugin review on WordPress.org"
155
+ msgstr "Залиште ★★★★★ огляд плагіну на WordPress.org"
156
+
157
+ #~ msgid "https://profiles.wordpress.org/sergeybiryukov/"
158
+ #~ msgstr "https://profiles.wordpress.org/sergeybiryukov/"
159
+
160
+ #~ msgid "Sergey Biryukov, Mikhail Kobzarev, Igor Gergel"
161
+ #~ msgstr "Сергій Бірюков, Михайло Кобзаров, Ігор Гергель"
162
+
163
+ #~ msgid ""
164
+ #~ "Converts Cyrillic characters in post and term slugs to Latin characters. "
165
+ #~ "Useful for creating human-readable URLs. Based on the original plugin by "
166
+ #~ "Anton Skorobogatov."
167
+ #~ msgstr ""
168
+ #~ "Перетворює кириличні символи в посиланнях записів, сторінок і рубрик в "
169
+ #~ "латинські. Корисно для створення людинозрозумілих URL. Засноване на "
170
+ #~ "оригінальному плагіні Rus-To-Lat від Антона Скоробогатова."
171
+
172
+ #~ msgid "https://wordpress.org/plugins/cyr2lat/"
173
+ #~ msgstr "https://uk.wordpress.org/plugins/cyr2lat/"
174
+
175
+ #~ msgid "Cyr-To-Lat"
176
+ #~ msgstr "Cyr-To-Lat"
languages/en_US.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cyr To Lat\n"
5
- "POT-Creation-Date: 2019-01-26 17:55+0200\n"
6
  "PO-Revision-Date: 2019-01-25 19:18+0200\n"
7
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
8
  "Language-Team: KAGG Design\n"
@@ -10,7 +10,7 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 2.2.1\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
@@ -22,60 +22,136 @@ msgstr ""
22
  "X-Poedit-SearchPathExcluded-1: dist\n"
23
  "X-Poedit-SearchPathExcluded-2: src\n"
24
 
25
- #: includes/class-ctl-settings.php:77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  msgid "View Cyr To Lat settings"
27
  msgstr ""
28
 
29
- #: includes/class-ctl-settings.php:78
30
  msgid "Settings"
31
  msgstr ""
32
 
33
- #: includes/class-ctl-settings.php:90
34
- msgid "Convert Existing Slugs"
 
35
  msgstr ""
36
 
37
- #: includes/class-ctl-settings.php:98 includes/class-ctl-settings.php:264
38
- msgid "ISO9 Table"
 
 
 
 
 
 
39
  msgstr ""
40
 
41
- #: includes/class-ctl-settings.php:107 includes/class-ctl-settings.php:270
 
42
  msgid "bg_BG Table"
43
  msgstr ""
44
 
45
- #: includes/class-ctl-settings.php:116 includes/class-ctl-settings.php:276
46
- msgid "uk Table"
 
47
  msgstr ""
48
 
49
- #: includes/class-ctl-settings.php:125 includes/class-ctl-settings.php:282
 
50
  msgid "ka_GE Table"
51
  msgstr ""
52
 
53
- #: includes/class-ctl-settings.php:185 includes/class-ctl-settings.php:186
 
 
 
 
 
 
 
 
 
 
 
54
  msgid "Cyr To Lat"
55
  msgstr ""
56
 
57
  #. Admin panel title.
58
- #: includes/class-ctl-settings.php:208
59
  msgid "Cyr To Lat Plugin Options"
60
  msgstr ""
61
 
62
- #: includes/class-ctl-settings.php:222
 
 
 
 
63
  msgid "Donate"
64
  msgstr ""
65
 
66
- #: includes/class-ctl-settings.php:225
67
  msgid "Would you like to support the advancement of this plugin?"
68
  msgstr ""
69
 
70
- #. @todo Change to Sergey's account
71
- #: includes/class-ctl-settings.php:240
72
  msgid "Your appreciation"
73
  msgstr ""
74
 
75
- #: includes/class-ctl-settings.php:245
76
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
77
  msgstr ""
78
-
79
- #: includes/class-ctl-settings.php:258
80
- msgid "General Options"
81
- msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Cyr To Lat\n"
5
+ "POT-Creation-Date: 2019-05-18 11:23+0300\n"
6
  "PO-Revision-Date: 2019-01-25 19:18+0200\n"
7
  "Last-Translator: KAGG Design <info@kagg.eu>\n"
8
  "Language-Team: KAGG Design\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.2.2\n"
14
  "X-Poedit-Basepath: ..\n"
15
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
16
  "%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
22
  "X-Poedit-SearchPathExcluded-1: dist\n"
23
  "X-Poedit-SearchPathExcluded-2: src\n"
24
 
25
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:39
26
+ msgid "Post slug converted:"
27
+ msgstr ""
28
+
29
+ #: includes/background-processes/class-cyr-to-lat-post-conversion-process.php:50
30
+ msgid "Post slugs conversion completed."
31
+ msgstr ""
32
+
33
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:38
34
+ msgid "Term slug converted:"
35
+ msgstr ""
36
+
37
+ #: includes/background-processes/class-cyr-to-lat-term-conversion-process.php:49
38
+ msgid "Term slugs conversion completed."
39
+ msgstr ""
40
+
41
+ #: includes/class-cyr-to-lat-converter.php:141
42
+ msgid "Cyr To Lat converts existing post slugs in the background process."
43
+ msgstr ""
44
+
45
+ #: includes/class-cyr-to-lat-converter.php:148
46
+ msgid "Cyr To Lat converts existing term slugs in the background process."
47
+ msgstr ""
48
+
49
+ #: includes/class-cyr-to-lat-converter.php:155
50
+ msgid "Cyr To Lat completed conversion of existing post slugs."
51
+ msgstr ""
52
+
53
+ #: includes/class-cyr-to-lat-converter.php:162
54
+ msgid "Cyr To Lat completed conversion of existing term slugs."
55
+ msgstr ""
56
+
57
+ #: includes/class-cyr-to-lat-converter.php:230
58
+ msgid "Post slugs conversion started."
59
+ msgstr ""
60
+
61
+ #: includes/class-cyr-to-lat-converter.php:232
62
+ msgid "Cyr To Lat started conversion of existing post slugs."
63
+ msgstr ""
64
+
65
+ #: includes/class-cyr-to-lat-converter.php:237
66
+ msgid "Cyr To Lat has not found existing post slugs for conversion."
67
+ msgstr ""
68
+
69
+ #: includes/class-cyr-to-lat-converter.php:257
70
+ msgid "Term slugs conversion started."
71
+ msgstr ""
72
+
73
+ #: includes/class-cyr-to-lat-converter.php:259
74
+ msgid "Cyr To Lat started conversion of existing term slugs."
75
+ msgstr ""
76
+
77
+ #: includes/class-cyr-to-lat-converter.php:264
78
+ msgid "Cyr To Lat has not found existing term slugs for conversion."
79
+ msgstr ""
80
+
81
+ #: includes/class-cyr-to-lat-settings.php:121
82
  msgid "View Cyr To Lat settings"
83
  msgstr ""
84
 
85
+ #: includes/class-cyr-to-lat-settings.php:122
86
  msgid "Settings"
87
  msgstr ""
88
 
89
+ #: includes/class-cyr-to-lat-settings.php:134
90
+ #: includes/class-cyr-to-lat-settings.php:342
91
+ msgid "ISO9 Table"
92
  msgstr ""
93
 
94
+ #: includes/class-cyr-to-lat-settings.php:143
95
+ #: includes/class-cyr-to-lat-settings.php:348
96
+ msgid "bel Table"
97
+ msgstr ""
98
+
99
+ #: includes/class-cyr-to-lat-settings.php:152
100
+ #: includes/class-cyr-to-lat-settings.php:354
101
+ msgid "uk Table"
102
  msgstr ""
103
 
104
+ #: includes/class-cyr-to-lat-settings.php:161
105
+ #: includes/class-cyr-to-lat-settings.php:360
106
  msgid "bg_BG Table"
107
  msgstr ""
108
 
109
+ #: includes/class-cyr-to-lat-settings.php:170
110
+ #: includes/class-cyr-to-lat-settings.php:366
111
+ msgid "mk_MK Table"
112
  msgstr ""
113
 
114
+ #: includes/class-cyr-to-lat-settings.php:179
115
+ #: includes/class-cyr-to-lat-settings.php:372
116
  msgid "ka_GE Table"
117
  msgstr ""
118
 
119
+ #: includes/class-cyr-to-lat-settings.php:188
120
+ #: includes/class-cyr-to-lat-settings.php:378
121
+ msgid "kk Table"
122
+ msgstr ""
123
+
124
+ #: includes/class-cyr-to-lat-settings.php:197
125
+ #: includes/class-cyr-to-lat-settings.php:384
126
+ msgid "he_IL Table"
127
+ msgstr ""
128
+
129
+ #: includes/class-cyr-to-lat-settings.php:261
130
+ #: includes/class-cyr-to-lat-settings.php:262
131
  msgid "Cyr To Lat"
132
  msgstr ""
133
 
134
  #. Admin panel title.
135
+ #: includes/class-cyr-to-lat-settings.php:282
136
  msgid "Cyr To Lat Plugin Options"
137
  msgstr ""
138
 
139
+ #: includes/class-cyr-to-lat-settings.php:297
140
+ msgid "Convert Existing Slugs"
141
+ msgstr ""
142
+
143
+ #: includes/class-cyr-to-lat-settings.php:303
144
  msgid "Donate"
145
  msgstr ""
146
 
147
+ #: includes/class-cyr-to-lat-settings.php:306
148
  msgid "Would you like to support the advancement of this plugin?"
149
  msgstr ""
150
 
151
+ #: includes/class-cyr-to-lat-settings.php:320
 
152
  msgid "Your appreciation"
153
  msgstr ""
154
 
155
+ #: includes/class-cyr-to-lat-settings.php:325
156
  msgid "Leave a ★★★★★ plugin review on WordPress.org"
157
  msgstr ""
 
 
 
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 2.3
5
  Tested up to: 5.2
6
- Stable tag: 4.0
7
  Requires PHP: 5.2
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
@@ -63,6 +63,15 @@ Yes you can!
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
 
 
 
 
66
  = 4.0 (24.04.2019) =
67
  * Added button to convert existing slugs, instead of checkbox
68
  * Added admin notices during conversion of existing slugs
3
  Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
4
  Requires at least: 2.3
5
  Tested up to: 5.2
6
+ Stable tag: 4.1
7
  Requires PHP: 5.2
8
 
9
  Converts Cyrillic characters in post, page and term slugs to Latin characters.
63
 
64
  == Changelog ==
65
 
66
+ = 4.1 (21.05.2019) =
67
+ * Added he_IL Table
68
+ * Added plugin translation to Ukrainian
69
+ * Added plugin translation to Swedish
70
+ * Added phpunit tests. All plugin classes are 100% covered
71
+ * Added js tests. All plugin js code is 100% covered
72
+ * Fixed bug with Jetpack sync
73
+ * Fixed empty slug bug while using characters outside of locale
74
+
75
  = 4.0 (24.04.2019) =
76
  * Added button to convert existing slugs, instead of checkbox
77
  * Added admin notices during conversion of existing slugs
vendor/a5hleyrich/wp-background-processing/classes/wp-async-request.php CHANGED
@@ -60,6 +60,31 @@ if ( ! class_exists( 'WP_Async_Request' ) ) {
60
 
61
  add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
62
  add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
 
65
  /**
@@ -127,7 +152,7 @@ if ( ! class_exists( 'WP_Async_Request' ) ) {
127
  }
128
 
129
  return array(
130
- 'timeout' => 0.01,
131
  'blocking' => false,
132
  'body' => $this->data,
133
  'cookies' => $_COOKIE,
@@ -141,11 +166,11 @@ if ( ! class_exists( 'WP_Async_Request' ) ) {
141
  * Check for correct nonce and pass to handler.
142
  */
143
  public function maybe_handle() {
144
- // Don't lock up other requests while processing
145
- session_write_close();
146
-
147
  check_ajax_referer( $this->identifier, 'nonce' );
148
 
 
 
 
149
  $this->handle();
150
 
151
  wp_die();
60
 
61
  add_action( 'wp_ajax_' . $this->identifier, array( $this, 'maybe_handle' ) );
62
  add_action( 'wp_ajax_nopriv_' . $this->identifier, array( $this, 'maybe_handle' ) );
63
+
64
+ add_action( 'init', array( $this, 'add_hooks' ) );
65
+ }
66
+
67
+ /**
68
+ * Add hooks.
69
+ */
70
+ public function add_hooks() {
71
+ if ( ! is_user_logged_in() ) {
72
+ if ( ! session_id() ) {
73
+ session_start();
74
+ }
75
+ add_filter( 'nonce_user_logged_out', array( $this, 'nonce_user_logged_out' ) );
76
+ }
77
+ }
78
+
79
+ /**
80
+ * When a user is logged out, ensure they have a unique nonce by using the session ID.
81
+ *
82
+ * @param int $uid User ID.
83
+ *
84
+ * @return string
85
+ */
86
+ public function nonce_user_logged_out( $uid ) {
87
+ return session_id();
88
  }
89
 
90
  /**
152
  }
153
 
154
  return array(
155
+ 'timeout' => 5,
156
  'blocking' => false,
157
  'body' => $this->data,
158
  'cookies' => $_COOKIE,
166
  * Check for correct nonce and pass to handler.
167
  */
168
  public function maybe_handle() {
 
 
 
169
  check_ajax_referer( $this->identifier, 'nonce' );
170
 
171
+ // Don't lock up other requests while processing.
172
+ session_write_close();
173
+
174
  $this->handle();
175
 
176
  wp_die();
vendor/a5hleyrich/wp-background-processing/classes/wp-background-process.php CHANGED
@@ -68,7 +68,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
68
  * Dispatch
69
  *
70
  * @access public
71
- * @return void
72
  */
73
  public function dispatch() {
74
  // Schedule the cron healthcheck.
@@ -109,7 +109,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
109
  /**
110
  * Update queue
111
  *
112
- * @param string $key Key.
113
  * @param array $data Data.
114
  *
115
  * @return $this
@@ -159,7 +159,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
159
  * the process is not already running.
160
  */
161
  public function maybe_handle() {
162
- // Don't lock up other requests while processing
163
  session_write_close();
164
 
165
  if ( $this->is_process_running() ) {
@@ -197,11 +197,12 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
197
 
198
  $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
199
 
200
- $count = $wpdb->get_var( $wpdb->prepare( "
201
- SELECT COUNT(*)
202
- FROM {$table}
203
- WHERE {$column} LIKE %s
204
- ", $key ) );
 
205
 
206
  return ( $count > 0 ) ? false : true;
207
  }
@@ -272,13 +273,12 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
272
 
273
  $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
274
 
275
- $query = $wpdb->get_row( $wpdb->prepare( "
276
- SELECT *
277
- FROM {$table}
278
- WHERE {$column} LIKE %s
279
- ORDER BY {$key_column} ASC
280
- LIMIT 1
281
- ", $key ) );
282
 
283
  $batch = new stdClass();
284
  $batch->key = $query->$column;
@@ -355,7 +355,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
355
  }
356
 
357
  /**
358
- * Get memory limit
359
  *
360
  * @return int
361
  */
@@ -367,12 +367,35 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
367
  $memory_limit = '128M';
368
  }
369
 
370
- if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
371
  // Unlimited, set to 32GB.
372
  $memory_limit = '32000M';
373
  }
374
 
375
- return intval( $memory_limit ) * 1024 * 1024;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
  }
377
 
378
  /**
@@ -391,6 +414,10 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
391
  $return = true;
392
  }
393
 
 
 
 
 
394
  return apply_filters( $this->identifier . '_time_exceeded', $return );
395
  }
396
 
@@ -409,7 +436,9 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
409
  * Schedule cron healthcheck
410
  *
411
  * @access public
 
412
  * @param mixed $schedules Schedules.
 
413
  * @return mixed
414
  */
415
  public function schedule_cron_healthcheck( $schedules ) {
@@ -422,6 +451,7 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
422
  // Adds every 5 minutes to the existing schedules.
423
  $schedules[ $this->identifier . '_cron_interval' ] = array(
424
  'interval' => MINUTE_IN_SECONDS * $interval,
 
425
  'display' => sprintf( __( 'Every %d Minutes' ), $interval ),
426
  );
427
 
@@ -475,7 +505,6 @@ if ( ! class_exists( 'WP_Background_Process' ) ) {
475
  * Cancel Process
476
  *
477
  * Stop processing queue items, clear cronjob and delete batch.
478
- *
479
  */
480
  public function cancel_process() {
481
  if ( ! $this->is_queue_empty() ) {
68
  * Dispatch
69
  *
70
  * @access public
71
+ * @return array|WP_Error
72
  */
73
  public function dispatch() {
74
  // Schedule the cron healthcheck.
109
  /**
110
  * Update queue
111
  *
112
+ * @param string $key Key.
113
  * @param array $data Data.
114
  *
115
  * @return $this
159
  * the process is not already running.
160
  */
161
  public function maybe_handle() {
162
+ // Don't lock up other requests while processing.
163
  session_write_close();
164
 
165
  if ( $this->is_process_running() ) {
197
 
198
  $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
199
 
200
+ $count = $wpdb->get_var(
201
+ $wpdb->prepare(
202
+ "SELECT COUNT(*) FROM {$table} WHERE {$column} LIKE %s ",
203
+ $key
204
+ )
205
+ );
206
 
207
  return ( $count > 0 ) ? false : true;
208
  }
273
 
274
  $key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
275
 
276
+ $query = $wpdb->get_row(
277
+ $wpdb->prepare(
278
+ "SELECT * FROM {$table} WHERE {$column} LIKE %s ORDER BY {$key_column} ASC LIMIT 1",
279
+ $key
280
+ )
281
+ );
 
282
 
283
  $batch = new stdClass();
284
  $batch->key = $query->$column;
355
  }
356
 
357
  /**
358
+ * Get memory limit in bytes.
359
  *
360
  * @return int
361
  */
367
  $memory_limit = '128M';
368
  }
369
 
370
+ if ( ! $memory_limit || - 1 === intval( $memory_limit ) ) {
371
  // Unlimited, set to 32GB.
372
  $memory_limit = '32000M';
373
  }
374
 
375
+ return $this->convert_shorthand_to_bytes( $memory_limit );
376
+ }
377
+
378
+ /**
379
+ * Converts a shorthand byte value to an integer byte value.
380
+ *
381
+ * @param string $value A (PHP ini) byte value, either shorthand or ordinary.
382
+ *
383
+ * @return int An integer byte value.
384
+ */
385
+ protected function convert_shorthand_to_bytes( $value ) {
386
+ $value = strtolower( trim( $value ) );
387
+ $bytes = (int) $value;
388
+
389
+ if ( false !== strpos( $value, 'g' ) ) {
390
+ $bytes *= 1024 * 1024 * 1024;
391
+ } elseif ( false !== strpos( $value, 'm' ) ) {
392
+ $bytes *= 1024 * 1024;
393
+ } elseif ( false !== strpos( $value, 'k' ) ) {
394
+ $bytes *= 1024;
395
+ }
396
+
397
+ // Deal with large (float) values which run into the maximum integer size.
398
+ return min( $bytes, PHP_INT_MAX );
399
  }
400
 
401
  /**
414
  $return = true;
415
  }
416
 
417
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
418
+ return false;
419
+ }
420
+
421
  return apply_filters( $this->identifier . '_time_exceeded', $return );
422
  }
423
 
436
  * Schedule cron healthcheck
437
  *
438
  * @access public
439
+ *
440
  * @param mixed $schedules Schedules.
441
+ *
442
  * @return mixed
443
  */
444
  public function schedule_cron_healthcheck( $schedules ) {
451
  // Adds every 5 minutes to the existing schedules.
452
  $schedules[ $this->identifier . '_cron_interval' ] = array(
453
  'interval' => MINUTE_IN_SECONDS * $interval,
454
+ /* translators: %d: cron interval */
455
  'display' => sprintf( __( 'Every %d Minutes' ), $interval ),
456
  );
457
 
505
  * Cancel Process
506
  *
507
  * Stop processing queue items, clear cronjob and delete batch.
 
508
  */
509
  public function cancel_process() {
510
  if ( ! $this->is_queue_empty() ) {
vendor/a5hleyrich/wp-background-processing/wp-background-processing.php CHANGED
@@ -5,16 +5,16 @@
5
  * @package WP-Background-Processing
6
  */
7
 
8
- /*
9
- Plugin Name: WP Background Processing
10
- Plugin URI: https://github.com/A5hleyRich/wp-background-processing
11
- Description: Asynchronous requests and background processing in WordPress.
12
- Author: Delicious Brains Inc.
13
- Version: 1.0
14
- Author URI: https://deliciousbrains.com/
15
- GitHub Plugin URI: https://github.com/A5hleyRich/wp-background-processing
16
- GitHub Branch: master
17
- */
18
 
19
  require_once plugin_dir_path( __FILE__ ) . 'classes/wp-async-request.php';
20
  require_once plugin_dir_path( __FILE__ ) . 'classes/wp-background-process.php';
5
  * @package WP-Background-Processing
6
  */
7
 
8
+ /**
9
+ * Plugin Name: WP Background Processing
10
+ * Plugin URI: https://github.com/A5hleyRich/wp-background-processing
11
+ * Description: Asynchronous requests and background processing in WordPress.
12
+ * Author: Delicious Brains Inc., forked by KAGG Design
13
+ * Version: 1.0.1
14
+ * Author URI: https://deliciousbrains.com/
15
+ * GitHub Plugin URI: https://github.com/A5hleyRich/wp-background-processing
16
+ * GitHub Branch: master
17
+ */
18
 
19
  require_once plugin_dir_path( __FILE__ ) . 'classes/wp-async-request.php';
20
  require_once plugin_dir_path( __FILE__ ) . 'classes/wp-background-process.php';
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitb7c5f930ec4fa1c83689fac301fc90e8::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb2cb5b42293de8241d0b75cfc42e5a6f::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit5dcf7a98b032f1c0e3482e43ab2c5865::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitf48b252460a056718de79bcea58d9f8a::getLoader();
vendor/composer/ClassLoader.php CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
282
- $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
  }
284
 
285
  /**
@@ -377,7 +377,7 @@ class ClassLoader
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath . '\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
  $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
  }
284
 
285
  /**
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath.'\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
  $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
vendor/composer/LICENSE CHANGED
@@ -1,56 +1,21 @@
1
- Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2
- Upstream-Name: Composer
3
- Upstream-Contact: Jordi Boggiano <j.boggiano@seld.be>
4
- Source: https://github.com/composer/composer
5
 
6
- Files: *
7
- Copyright: 2016, Nils Adermann <naderman@naderman.de>
8
- 2016, Jordi Boggiano <j.boggiano@seld.be>
9
- License: Expat
10
 
11
- Files: src/Composer/Util/TlsHelper.php
12
- Copyright: 2016, Nils Adermann <naderman@naderman.de>
13
- 2016, Jordi Boggiano <j.boggiano@seld.be>
14
- 2013, Evan Coury <me@evancoury.com>
15
- License: Expat and BSD-2-Clause
 
16
 
17
- License: BSD-2-Clause
18
- Redistribution and use in source and binary forms, with or without modification,
19
- are permitted provided that the following conditions are met:
20
- .
21
- * Redistributions of source code must retain the above copyright notice,
22
- this list of conditions and the following disclaimer.
23
- .
24
- * Redistributions in binary form must reproduce the above copyright notice,
25
- this list of conditions and the following disclaimer in the documentation
26
- and/or other materials provided with the distribution.
27
- .
28
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
29
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
32
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
33
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
35
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
37
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
 
39
- License: Expat
40
- Permission is hereby granted, free of charge, to any person obtaining a copy
41
- of this software and associated documentation files (the "Software"), to deal
42
- in the Software without restriction, including without limitation the rights
43
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
44
- copies of the Software, and to permit persons to whom the Software is furnished
45
- to do so, subject to the following conditions:
46
- .
47
- The above copyright notice and this permission notice shall be included in all
48
- copies or substantial portions of the Software.
49
- .
50
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
51
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
52
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
53
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
54
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
55
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
56
- THE SOFTWARE.
 
 
 
 
1
 
2
+ Copyright (c) Nils Adermann, Jordi Boggiano
 
 
 
3
 
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished
9
+ to do so, subject to the following conditions:
10
 
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
+ THE SOFTWARE.