Version Description
(07.09.2021) = * Fix issue with WP Foro plugin - transliterate topic slug when created on frontend. * Fix bug with Polylang on REST request.
Download this release
Release Info
Developer | mihdan |
Plugin | Cyr-To-Lat |
Version | 5.2.3 |
Comparing to | |
See all releases |
Code changes from version 5.2.2 to 5.2.3
- auth.json +1 -1
- cyr-to-lat.php +2 -2
- readme.txt +6 -2
- src/php/class-main.php +3 -3
- src/php/class-request.php +23 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +6 -6
auth.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
"github-oauth": {
|
3 |
-
"github.com": "
|
4 |
}
|
5 |
}
|
1 |
{
|
2 |
"github-oauth": {
|
3 |
+
"github.com": "ghs_CuZ06oKLqUCaAItddkclQwl7YhhUJk1fW8PL"
|
4 |
}
|
5 |
}
|
cyr-to-lat.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Cyr-To-Lat
|
11 |
* Plugin URI: https://wordpress.org/plugins/cyr2lat/
|
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: 5.2.
|
14 |
* Requires at least: 5.1
|
15 |
* Requires PHP: 5.6.20
|
16 |
* Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
|
@@ -36,7 +36,7 @@ if ( defined( 'CYR_TO_LAT_VERSION' ) ) {
|
|
36 |
/**
|
37 |
* Plugin version.
|
38 |
*/
|
39 |
-
define( 'CYR_TO_LAT_VERSION', '5.2.
|
40 |
|
41 |
/**
|
42 |
* Path to the plugin dir.
|
10 |
* Plugin Name: Cyr-To-Lat
|
11 |
* Plugin URI: https://wordpress.org/plugins/cyr2lat/
|
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: 5.2.3
|
14 |
* Requires at least: 5.1
|
15 |
* Requires PHP: 5.6.20
|
16 |
* Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
|
36 |
/**
|
37 |
* Plugin version.
|
38 |
*/
|
39 |
+
define( 'CYR_TO_LAT_VERSION', '5.2.3' );
|
40 |
|
41 |
/**
|
42 |
* Path to the plugin dir.
|
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: 5.1
|
5 |
Tested up to: 5.8
|
6 |
-
Stable tag: 5.2.
|
7 |
Requires PHP: 5.6.20
|
8 |
|
9 |
Convert Non-Latin characters in post, page and term slugs to Latin characters.
|
@@ -188,7 +188,11 @@ Yes you can!
|
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
-
= 5.2.
|
|
|
|
|
|
|
|
|
192 |
* Fix issue caused by the bug in Jetpack sync.
|
193 |
* Optimize code related to WPML locale filtering.
|
194 |
* Fix endless loading of a taxonomy page with WPML.
|
3 |
Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
|
4 |
Requires at least: 5.1
|
5 |
Tested up to: 5.8
|
6 |
+
Stable tag: 5.2.3
|
7 |
Requires PHP: 5.6.20
|
8 |
|
9 |
Convert Non-Latin characters in post, page and term slugs to Latin characters.
|
188 |
|
189 |
== Changelog ==
|
190 |
|
191 |
+
= 5.2.3 (07.09.2021) =
|
192 |
+
* Fix issue with WP Foro plugin - transliterate topic slug when created on frontend.
|
193 |
+
* Fix bug with Polylang on REST request.
|
194 |
+
|
195 |
+
= 5.2.2 (06.09.2021) =
|
196 |
* Fix issue caused by the bug in Jetpack sync.
|
197 |
* Optimize code related to WPML locale filtering.
|
198 |
* Fix endless loading of a taxonomy page with WPML.
|
src/php/class-main.php
CHANGED
@@ -114,7 +114,7 @@ class Main {
|
|
114 |
public function __construct() {
|
115 |
$this->request = new Request();
|
116 |
|
117 |
-
if ( $this->request->
|
118 |
return;
|
119 |
}
|
120 |
|
@@ -149,7 +149,7 @@ class Main {
|
|
149 |
* @noinspection PhpUndefinedClassInspection
|
150 |
*/
|
151 |
public function init() {
|
152 |
-
if ( $this->request->
|
153 |
return;
|
154 |
}
|
155 |
|
@@ -533,7 +533,7 @@ class Main {
|
|
533 |
* @return false|null|string
|
534 |
*/
|
535 |
private function pll_locale_filter_with_rest() {
|
536 |
-
if ( !
|
537 |
return null;
|
538 |
}
|
539 |
|
114 |
public function __construct() {
|
115 |
$this->request = new Request();
|
116 |
|
117 |
+
if ( ! $this->request->is_allowed() ) {
|
118 |
return;
|
119 |
}
|
120 |
|
149 |
* @noinspection PhpUndefinedClassInspection
|
150 |
*/
|
151 |
public function init() {
|
152 |
+
if ( ! $this->request->is_allowed() ) {
|
153 |
return;
|
154 |
}
|
155 |
|
533 |
* @return false|null|string
|
534 |
*/
|
535 |
private function pll_locale_filter_with_rest() {
|
536 |
+
if ( ! defined( 'REST_REQUEST' ) || ! constant( 'REST_REQUEST' ) ) {
|
537 |
return null;
|
538 |
}
|
539 |
|
src/php/class-request.php
CHANGED
@@ -14,6 +14,15 @@ use WP_Rewrite;
|
|
14 |
*/
|
15 |
class Request {
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/**
|
18 |
* Is frontend.
|
19 |
*
|
@@ -88,4 +97,18 @@ class Request {
|
|
88 |
|
89 |
return $is_rest ? substr( $current_path, strlen( $rest_path ) ) : '';
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
14 |
*/
|
15 |
class Request {
|
16 |
|
17 |
+
/**
|
18 |
+
* Is allowed request for plugin to work.
|
19 |
+
*
|
20 |
+
* @return bool
|
21 |
+
*/
|
22 |
+
public function is_allowed() {
|
23 |
+
return ! $this->is_frontend() || ( $this->is_frontend() && $this->is_post() );
|
24 |
+
}
|
25 |
+
|
26 |
/**
|
27 |
* Is frontend.
|
28 |
*
|
97 |
|
98 |
return $is_rest ? substr( $current_path, strlen( $rest_path ) ) : '';
|
99 |
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* If current request is POST.
|
103 |
+
*
|
104 |
+
* @return bool
|
105 |
+
*/
|
106 |
+
public function is_post() {
|
107 |
+
$request_method = filter_var(
|
108 |
+
isset( $_SERVER['REQUEST_METHOD'] ) ? wp_unslash( $_SERVER['REQUEST_METHOD'] ) : '',
|
109 |
+
FILTER_SANITIZE_STRING
|
110 |
+
);
|
111 |
+
|
112 |
+
return 'POST' === $request_method;
|
113 |
+
}
|
114 |
}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit200ed858b85e7f58bdada4cb2f7139e9::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit142942602aa33b47ce333db417cc30c6
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit142942602aa33b47ce333db417cc30c6
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit200ed858b85e7f58bdada4cb2f7139e9
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit200ed858b85e7f58bdada4cb2f7139e9', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit200ed858b85e7f58bdada4cb2f7139e9', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit200ed858b85e7f58bdada4cb2f7139e9::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit200ed858b85e7f58bdada4cb2f7139e9::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire200ed858b85e7f58bdada4cb2f7139e9($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire200ed858b85e7f58bdada4cb2f7139e9($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
|
@@ -37,7 +37,7 @@ class ComposerStaticInit142942602aa33b47ce333db417cc30c6
|
|
37 |
public static function getInitializer(ClassLoader $loader)
|
38 |
{
|
39 |
return \Closure::bind(function () use ($loader) {
|
40 |
-
$loader->classMap =
|
41 |
|
42 |
}, null, ClassLoader::class);
|
43 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit200ed858b85e7f58bdada4cb2f7139e9
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'344a0f93a05b8ca362c22e39586db500' => __DIR__ . '/../..' . '/lib/polyfill-mbstring/bootstrap.php',
|
37 |
public static function getInitializer(ClassLoader $loader)
|
38 |
{
|
39 |
return \Closure::bind(function () use ($loader) {
|
40 |
+
$loader->classMap = ComposerStaticInit200ed858b85e7f58bdada4cb2f7139e9::$classMap;
|
41 |
|
42 |
}, null, ClassLoader::class);
|
43 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
-
'pretty_version' => '5.2.
|
4 |
-
'version' => '5.2.
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'mihdan/cyr2lat',
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'mihdan/cyr2lat' => array(
|
14 |
-
'pretty_version' => '5.2.
|
15 |
-
'version' => '5.2.
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
+
'pretty_version' => '5.2.3',
|
4 |
+
'version' => '5.2.3.0',
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '06c64978b72b42ab29890563960c65378737cab1',
|
9 |
'name' => 'mihdan/cyr2lat',
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'mihdan/cyr2lat' => array(
|
14 |
+
'pretty_version' => '5.2.3',
|
15 |
+
'version' => '5.2.3.0',
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '06c64978b72b42ab29890563960c65378737cab1',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|