Skip to content

Commit 285b095

Browse files
committed
Version 2.7.0
1 parent 0fe70c3 commit 285b095

File tree

5 files changed

+26
-20
lines changed

5 files changed

+26
-20
lines changed

Changelog.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.7.0
2+
3+
- Block reorganized
4+
- WordPress' compatibility changed to min 6.1
5+
- PHP code-beautifier added
6+
17
## 2.6.4
28

39
- WordPress 6.5 tested

MultisiteLanguageSwitcher.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @wordpress-plugin
88
*
99
* Plugin Name: Multisite Language Switcher
10-
* Version: 2.6.4
10+
* Version: 2.7.0
1111
* Plugin URI: http://msls.co/
1212
* Description: A simple but powerful plugin that will help you to manage the relations of your contents in a multilingual multisite-installation.
1313
* Author: Dennis Ploetner
@@ -30,7 +30,7 @@
3030
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
3131
*/
3232

33-
if ( file_exists(__DIR__ . '/vendor/autoload.php' ) ) {
33+
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
3434
require __DIR__ . '/vendor/autoload.php';
3535
}
3636

@@ -40,7 +40,7 @@
4040
* @author Dennis Ploetner <[email protected]>
4141
*/
4242
if ( ! defined( 'MSLS_PLUGIN_VERSION' ) ) {
43-
define( 'MSLS_PLUGIN_VERSION', '2.6.4' );
43+
define( 'MSLS_PLUGIN_VERSION', '2.7.0' );
4444
define( 'MSLS_PLUGIN_PATH', plugin_basename( __FILE__ ) );
4545
define( 'MSLS_PLUGIN__FILE__', __FILE__ );
4646

@@ -54,7 +54,7 @@
5454
* @return string
5555
*/
5656
function get_the_msls( $attr ): string {
57-
$arr = is_array( $attr ) ? $attr : [];
57+
$arr = is_array( $attr ) ? $attr : array();
5858
$obj = apply_filters( 'msls_get_output', null );
5959

6060
return ! is_null( $obj ) ? strval( $obj->set_tags( $arr ) ) : '';
@@ -77,7 +77,7 @@ function get_the_msls( $attr ): string {
7777
*
7878
* @param string[] $arr
7979
*/
80-
function the_msls( array $arr = [] ): void {
80+
function the_msls( array $arr = array() ): void {
8181
echo get_the_msls( $arr );
8282
}
8383

@@ -89,7 +89,7 @@ function the_msls( array $arr = [] ): void {
8989
* @return string
9090
*/
9191
function get_msls_flag_url( string $locale ): string {
92-
return ( new \lloc\Msls\MslsOptions )->get_flag_url( $locale );
92+
return ( new \lloc\Msls\MslsOptions() )->get_flag_url( $locale );
9393
}
9494

9595
/**
@@ -126,8 +126,8 @@ function get_msls_permalink( string $locale, string $default = '' ): string {
126126
}
127127

128128
/**
129-
* Looks for the MslsBlog instance for a specific locale
130-
*
129+
* Looks for the MslsBlog instance for a specific locale
130+
*
131131
* @param string $locale
132132
*
133133
* @return \lloc\Msls\MslsBlog|null
@@ -145,14 +145,14 @@ function msls_blog_collection(): \lloc\Msls\MslsBlogCollection {
145145
return \lloc\Msls\MslsBlogCollection::instance();
146146
}
147147

148-
/**
149-
* Gets the MslsOptions instance
150-
*
151-
* @return \lloc\Msls\MslsOptions
152-
*/
153-
function msls_options(): \lloc\Msls\MslsOptions {
154-
return \lloc\Msls\MslsOptions::instance();
155-
}
148+
/**
149+
* Gets the MslsOptions instance
150+
*
151+
* @return \lloc\Msls\MslsOptions
152+
*/
153+
function msls_options(): \lloc\Msls\MslsOptions {
154+
return \lloc\Msls\MslsOptions::instance();
155+
}
156156

157-
lloc\Msls\MslsPlugin::init();
157+
lloc\Msls\MslsPlugin::init();
158158
}

js/msls-widget-block/block.json

+1-1
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.6.4",
8+
"version": "2.7.0",
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": {

readme.txt

+1-1
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.5
88
Requires PHP: 7.4
9-
Stable tag: 2.6.4
9+
Stable tag: 2.7.0
1010
License: GPLv2 or later
1111
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1212

src/msls-widget-block/block.json

+1-1
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.6.4",
8+
"version": "2.7.0",
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)