Skip to content

Commit ab0f8a6

Browse files
committed
Version 2.10.1
1 parent 79b5759 commit ab0f8a6

File tree

14 files changed

+106
-29
lines changed

14 files changed

+106
-29
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.10.1
2+
* Fix: Deprecated function warning pointed to non-existent function.
3+
* Documentation: update README.md code snippets to reflect new function names.
4+
15
## 2.10.0
26

37
* Add prefixed public helper functions (msls_get_*, msls_the_msls) with deprecation shims for legacy names to satisfy WPCS while staying backward compatible.

MultisiteLanguageSwitcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Multisite Language Switcher Plugin
44
*
55
* Plugin Name: Multisite Language Switcher
6-
* Version: 2.10.0
6+
* Version: 2.10.1
77
* Plugin URI: http://msls.co/
88
* Description: A simple but powerful plugin that will help you to manage the relations of your contents in a multilingual multisite-installation.
99
* Author: Dennis Ploetner
@@ -41,7 +41,7 @@
4141
* @author Dennis Ploetner <[email protected]>
4242
*/
4343
if ( ! defined( 'MSLS_PLUGIN_VERSION' ) ) {
44-
define( 'MSLS_PLUGIN_VERSION', '2.10.0' );
44+
define( 'MSLS_PLUGIN_VERSION', '2.10.1' );
4545
define( 'MSLS_PLUGIN_PATH', plugin_basename( __FILE__ ) );
4646
define( 'MSLS_PLUGIN__FILE__', __FILE__ );
4747

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ If you plan to use the GitHub repository on a server, don't forget to run `compo
5353
* Optional Theme Integration:
5454
* Insert the following PHP code directly into your theme files to display language switcher links:
5555
```php
56-
if ( function_exists( 'the_msls' ) ) {
57-
the_msls();
56+
if ( function_exists( 'msls_the_switcher' ) ) {
57+
msls_the_switcher();
5858
}
5959
```
6060
Review the [Multisite Language Switcher Website](http://msls.co/) for more information. Some [diagrams](https://github.com/lloc/Multisite-Language-Switcher/blob/master/Diagrams.md) are also available.

assets/css-flags/flags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
'cy' => 'flag-icon-gb-wls',
3333
'da_DK' => 'flag-icon-dk',
3434
'de_AT' => 'flag-icon-at',
35-
'de_CH_informal' => 'flag-icon-ch',
3635
'de_DE' => 'flag-icon-de',
3736
'de_DE_formal' => 'flag-icon-de',
3837
'de_CH' => 'flag-icon-ch',
38+
'de_CH_informal' => 'flag-icon-ch',
3939
'dzo' => 'flag-icon-bt',
4040
'el' => 'flag-icon-gr',
4141
'en_NZ' => 'flag-icon-nz',
@@ -97,8 +97,8 @@
9797
'my_MM' => 'flag-icon-mm',
9898
'nb_NO' => 'flag-icon-no',
9999
'ne_NP' => 'flag-icon-np',
100-
'nl_NL' => 'flag-icon-nl',
101100
'nl_BE' => 'flag-icon-be',
101+
'nl_NL' => 'flag-icon-nl',
102102
'nl_NL_formal' => 'flag-icon-nl',
103103
'nn_NO' => 'flag-icon-no',
104104
'oci' => 'flag-icon-es-ca',

assets/flags/flags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
'cy' => 'wales.png',
3333
'da_DK' => 'dk.png',
3434
'de_AT' => 'at.png',
35-
'de_CH_informal' => 'ch.png',
3635
'de_DE' => 'de.png',
3736
'de_DE_formal' => 'de.png',
3837
'de_CH' => 'ch.png',
38+
'de_CH_informal' => 'ch.png',
3939
'dzo' => 'bt.png',
4040
'el' => 'gr.png',
4141
'en_NZ' => 'nz.png',
@@ -97,8 +97,8 @@
9797
'my_MM' => 'mm.png',
9898
'nb_NO' => 'no.png',
9999
'ne_NP' => 'np.png',
100-
'nl_NL' => 'nl.png',
101100
'nl_BE' => 'be.png',
101+
'nl_NL' => 'nl.png',
102102
'nl_NL_formal' => 'nl.png',
103103
'nn_NO' => 'no.png',
104104
'oci' => 'catalonia.png',

build/translations.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

includes/MslsPlugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ public static function activate(): void {
206206
* The plugin data in all blogs of the current network will be
207207
* deleted after the uninstall procedure.
208208
*
209-
* @return boolean
209+
* @return void
210210
*/
211-
public static function uninstall() {
211+
public static function uninstall(): void {
212212
/**
213213
* We want to be sure that the user has not deactivated the
214214
* multisite because we need to use switch_to_blog and
@@ -225,7 +225,7 @@ public static function uninstall() {
225225
}
226226
}
227227

228-
return self::cleanup();
228+
self::cleanup();
229229
}
230230

231231
/**

includes/deprectated.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,52 @@
55
/**
66
* Deprecated: Get the output for using the links to the translations in your code.
77
*
8-
* @deprecated 2.9.7 Use msls_get_the_msls()
8+
* @deprecated 2.10.1 Use msls_get_switcher()
99
*
1010
* @param mixed $attr
1111
*
1212
* @return string
1313
*/
1414
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
1515
function get_the_msls( $attr ): string {
16-
_deprecated_function( __FUNCTION__, '2.9.7', 'msls_get_the_msls' );
16+
_deprecated_function( __FUNCTION__, '2.10.1', 'msls_get_switcher' );
1717

1818
return msls_get_switcher( $attr );
1919
}
2020

2121
/**
2222
* Deprecated: Output the links to the translations in your template.
2323
*
24-
* @deprecated 2.9.7 Use msls_the_msls()
24+
* @deprecated 2.10.1 Use msls_the_switcher()
2525
*
2626
* @param string[] $arr
2727
*/
2828
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
2929
function the_msls( array $arr = array() ): void {
30-
_deprecated_function( __FUNCTION__, '2.9.7', 'msls_the_msls' );
30+
_deprecated_function( __FUNCTION__, '2.10.1', 'msls_the_switcher' );
3131
msls_the_switcher( $arr );
3232
}
3333

3434
/**
3535
* Deprecated: Gets the URL of the country flag-icon for a specific locale.
3636
*
37-
* @deprecated 2.9.7 Use msls_get_flag_url()
37+
* @deprecated 2.10.1 Use msls_get_flag_url()
3838
*
3939
* @param string $locale
4040
*
4141
* @return string
4242
*/
4343
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
4444
function get_msls_flag_url( string $locale ): string {
45-
_deprecated_function( __FUNCTION__, '2.9.7', 'msls_get_flag_url' );
45+
_deprecated_function( __FUNCTION__, '2.10.1', 'msls_get_flag_url' );
4646

4747
return msls_get_flag_url( $locale );
4848
}
4949

5050
/**
5151
* Deprecated: Gets the description for a blog for a specific locale.
5252
*
53-
* @deprecated 2.9.7 Use msls_get_blog_description()
53+
* @deprecated 2.10.1 Use msls_get_blog_description()
5454
*
5555
* @param string $locale
5656
* @param string $preset
@@ -59,15 +59,15 @@ function get_msls_flag_url( string $locale ): string {
5959
*/
6060
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
6161
function get_msls_blog_description( string $locale, string $preset = '' ): string {
62-
_deprecated_function( __FUNCTION__, '2.9.7', 'msls_get_blog_description' );
62+
_deprecated_function( __FUNCTION__, '2.10.1', 'msls_get_blog_description' );
6363

6464
return msls_get_blog_description( $locale, $preset );
6565
}
6666

6767
/**
6868
* Deprecated: Gets the permalink for a translation of the current post in a given language.
6969
*
70-
* @deprecated 2.9.7 Use msls_get_permalink()
70+
* @deprecated 2.10.1 Use msls_get_permalink()
7171
*
7272
* @param string $locale
7373
* @param string $preset
@@ -76,7 +76,7 @@ function get_msls_blog_description( string $locale, string $preset = '' ): strin
7676
*/
7777
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
7878
function get_msls_permalink( string $locale, string $preset = '' ): string {
79-
_deprecated_function( __FUNCTION__, '2.9.7', 'msls_get_permalink' );
79+
_deprecated_function( __FUNCTION__, '2.10.1', 'msls_get_permalink' );
8080

8181
return msls_get_permalink( $locale, $preset );
8282
}

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Tags: multilingual, multisite, language, switcher, localization
66
Requires at least: 6.1
77
Tested up to: 6.9
88
Requires PHP: 7.4
9-
Stable tag: 2.10.0
9+
Stable tag: 2.10.1
1010
License: GPLv2 or later
1111
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1212

src/msls-widget-block/block.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"icon": "translation",
66
"category": "widgets",
77
"name": "lloc/msls-widget-block",
8-
"version": "2.10.0",
8+
"version": "2.10.1",
99
"description": "Review the settings for the Multisite Language Switcher plugin, as the block utilizes the API function `the_msls()` for its output.",
1010
"example": {},
1111
"supports": {

0 commit comments

Comments
 (0)