Skip to content

Commit

Permalink
Merge 626b340 into 2d9de12
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 15, 2023
2 parents 2d9de12 + 626b340 commit 0c7df29
Show file tree
Hide file tree
Showing 8 changed files with 2,338 additions and 2,291 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -62,10 +62,10 @@
"roave/security-advisories": "dev-latest",
"10up/wp_mock": "0.2 - 0.5",
"lucatume/function-mocker": "dev-master",
"phpunit/phpunit": "5.7 - 9.5",
"phpunit/phpunit": "5.7 - 10.2",
"squizlabs/php_codesniffer": "^3.7.2",
"phpcompatibility/php-compatibility": "^9.3.5",
"phpcompatibility/phpcompatibility-wp": "^2.1.3",
"phpcompatibility/phpcompatibility-wp": "^2.1.4",
"wp-coding-standards/wpcs": "^2.3.0",
"php-coveralls/php-coveralls": "^v2.5.3"
},
Expand Down
6 changes: 3 additions & 3 deletions cyr-to-lat.php
Expand Up @@ -10,7 +10,7 @@
* Plugin Name: Cyr-To-Lat
* Plugin URI: https://wordpress.org/plugins/cyr2lat/
* 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.
* Version: 5.5.2
* Version: 5.5.3
* Requires at least: 5.1
* Requires PHP: 5.6.20
* Author: Sergey Biryukov, Mikhail Kobzarev, Igor Gergel
Expand All @@ -22,7 +22,7 @@
*
*
* WC requires at least: 3.0
* WC tested up to: 7.5
* WC tested up to: 7.8
*/

// phpcs:ignore Generic.Commenting.DocComment.MissingShort
Expand All @@ -43,7 +43,7 @@
/**
* Plugin version.
*/
define( 'CYR_TO_LAT_VERSION', '5.5.2' );
define( 'CYR_TO_LAT_VERSION', '5.5.3' );

/**
* Path to the plugin dir.
Expand Down
32 changes: 16 additions & 16 deletions package.json
Expand Up @@ -47,24 +47,24 @@
}
},
"devDependencies": {
"@babel/core": "^7.21.3",
"@babel/preset-env": "^7.20.2",
"@wordpress/eslint-plugin": "^14.2.0",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@wordpress/eslint-plugin": "^14.10.0",
"autoprefixer": "^10.4.14",
"babel-loader": "^9.1.2",
"babel-loader": "^9.1.3",
"coveralls": "^3.1.1",
"css-loader": "^6.7.3",
"css-minimizer-webpack-plugin": "^4.2.2",
"eslint": "^8.36.0",
"glob": "^9.3.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"eslint": "^8.45.0",
"glob": "^9.3.5",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
"jest-fetch-mock": "^3.0.3",
"mini-css-extract-plugin": "^2.7.3",
"terser-webpack-plugin": "^5.3.7",
"webpack": "^5.76.2",
"webpack-cli": "^5.0.1",
"webpack-remove-empty-scripts": "^1.0.1"
"mini-css-extract-plugin": "^2.7.6",
"terser-webpack-plugin": "^5.3.9",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
"webpack-remove-empty-scripts": "^1.0.3"
},
"packageManager": "yarn@3.4.1"
"packageManager": "yarn@3.6.1"
}
6 changes: 5 additions & 1 deletion readme.txt
Expand Up @@ -3,7 +3,7 @@ Contributors: SergeyBiryukov, mihdan, karevn, webvitaly, kaggdesign
Tags: cyrillic, belorussian, ukrainian, bulgarian, macedonian, georgian, kazakh, latin, l10n, russian, cyr-to-lat, cyr2lat, rustolat, slugs, translations, transliteration
Requires at least: 5.1
Tested up to: 6.2
Stable tag: 5.5.2
Stable tag: 5.5.3
Requires PHP: 5.6.20
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -194,6 +194,10 @@ Yes you can!

== Changelog ==

= 5.5.3 (15.07.2023)
* Tested with WooCommerce 7.8.
* Fixed deprecation error "strpos(): Passing null to parameter" appeared in debug.log.

= 5.5.2 (31.03.2023) =
* Fixed transliteration of tags with Polylang and WPML.

Expand Down
4 changes: 2 additions & 2 deletions src/php/class-request.php
Expand Up @@ -94,8 +94,8 @@ public function is_rest() {
* @return string
*/
protected function get_rest_route() {
$current_path = wp_parse_url( add_query_arg( [] ), PHP_URL_PATH );
$rest_path = wp_parse_url( trailingslashit( rest_url() ), PHP_URL_PATH );
$current_path = (string) wp_parse_url( trailingslashit( add_query_arg( [] ) ), PHP_URL_PATH );
$rest_path = (string) wp_parse_url( trailingslashit( rest_url() ), PHP_URL_PATH );

$is_rest = 0 === strpos( $current_path, $rest_path );

Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/bootstrap.php
Expand Up @@ -39,7 +39,7 @@
/**
* Plugin version.
*/
const CYR_TO_LAT_TEST_VERSION = '5.5.2';
const CYR_TO_LAT_TEST_VERSION = '5.5.3';

/**
* Path to the plugin dir.
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/tests/class-test-request.php
Expand Up @@ -251,7 +251,7 @@ public function test_get_rest_route( $current_path, $expected ) {
$rest_url = 'https://test.test' . $rest_path . '/';

WP_Mock::userFunction( 'add_query_arg' )->with( [] )->andReturn( $current_url );
WP_Mock::userFunction( 'wp_parse_url' )->with( $current_url, PHP_URL_PATH )->andReturn( $current_path );
WP_Mock::userFunction( 'wp_parse_url' )->with( $current_url . '/', PHP_URL_PATH )->andReturn( $current_path );

WP_Mock::userFunction( 'rest_url' )->andReturn( $rest_url );
WP_Mock::userFunction( 'trailingslashit' )->andReturnUsing(
Expand Down

0 comments on commit 0c7df29

Please sign in to comment.