Skip to content

Commit

Permalink
Version 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed May 19, 2024
1 parent 0fe70c3 commit 285b095
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.7.0

- Block reorganized
- WordPress' compatibility changed to min 6.1
- PHP code-beautifier added

## 2.6.4

- WordPress 6.5 tested
Expand Down
34 changes: 17 additions & 17 deletions MultisiteLanguageSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @wordpress-plugin
*
* Plugin Name: Multisite Language Switcher
* Version: 2.6.4
* Version: 2.7.0
* Plugin URI: http://msls.co/
* Description: A simple but powerful plugin that will help you to manage the relations of your contents in a multilingual multisite-installation.
* Author: Dennis Ploetner
Expand All @@ -30,7 +30,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

if ( file_exists(__DIR__ . '/vendor/autoload.php' ) ) {
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}

Expand All @@ -40,7 +40,7 @@
* @author Dennis Ploetner <[email protected]>
*/
if ( ! defined( 'MSLS_PLUGIN_VERSION' ) ) {
define( 'MSLS_PLUGIN_VERSION', '2.6.4' );
define( 'MSLS_PLUGIN_VERSION', '2.7.0' );
define( 'MSLS_PLUGIN_PATH', plugin_basename( __FILE__ ) );
define( 'MSLS_PLUGIN__FILE__', __FILE__ );

Expand All @@ -54,7 +54,7 @@
* @return string
*/
function get_the_msls( $attr ): string {
$arr = is_array( $attr ) ? $attr : [];
$arr = is_array( $attr ) ? $attr : array();
$obj = apply_filters( 'msls_get_output', null );

return ! is_null( $obj ) ? strval( $obj->set_tags( $arr ) ) : '';
Expand All @@ -77,7 +77,7 @@ function get_the_msls( $attr ): string {
*
* @param string[] $arr
*/
function the_msls( array $arr = [] ): void {
function the_msls( array $arr = array() ): void {
echo get_the_msls( $arr );
}

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

/**
Expand Down Expand Up @@ -126,8 +126,8 @@ function get_msls_permalink( string $locale, string $default = '' ): string {
}

/**
* Looks for the MslsBlog instance for a specific locale
*
* Looks for the MslsBlog instance for a specific locale
*
* @param string $locale
*
* @return \lloc\Msls\MslsBlog|null
Expand All @@ -145,14 +145,14 @@ function msls_blog_collection(): \lloc\Msls\MslsBlogCollection {
return \lloc\Msls\MslsBlogCollection::instance();
}

/**
* Gets the MslsOptions instance
*
* @return \lloc\Msls\MslsOptions
*/
function msls_options(): \lloc\Msls\MslsOptions {
return \lloc\Msls\MslsOptions::instance();
}
/**
* Gets the MslsOptions instance
*
* @return \lloc\Msls\MslsOptions
*/
function msls_options(): \lloc\Msls\MslsOptions {
return \lloc\Msls\MslsOptions::instance();
}

lloc\Msls\MslsPlugin::init();
lloc\Msls\MslsPlugin::init();
}
2 changes: 1 addition & 1 deletion js/msls-widget-block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "translation",
"category": "widgets",
"name": "lloc/msls-widget-block",
"version": "2.6.4",
"version": "2.7.0",
"description": "Review the settings for the Multisite Language Switcher plugin, as the block utilizes the API function `the_msls()` for its output.",
"example": {},
"supports": {
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Tags: multilingual, multisite, language, switcher, localization
Requires at least: 6.1
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 2.6.4
Stable tag: 2.7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down
2 changes: 1 addition & 1 deletion src/msls-widget-block/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "translation",
"category": "widgets",
"name": "lloc/msls-widget-block",
"version": "2.6.4",
"version": "2.7.0",
"description": "Review the settings for the Multisite Language Switcher plugin, as the block utilizes the API function `the_msls()` for its output.",
"example": {},
"supports": {
Expand Down

0 comments on commit 285b095

Please sign in to comment.