Skip to content

Commit

Permalink
New version
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Jul 21, 2021
1 parent f64e174 commit 339a61a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ composer.lock
package.json
package-lock.json
phpdoc.xml
phpstan.neon
phpunit.xml
README.md
10 changes: 6 additions & 4 deletions MslsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: MslsMenu
Plugin URI: https://github.com/lloc/MslsMenu
Description: Adds the Multisite Language Switcher to the primary-nav-menu
Version: 2.2.4
Version: 2.2.5
Author: Dennis Ploetner
Author URI: http://lloc.de/
Text Domain: mslsmenu
Expand Down Expand Up @@ -133,7 +133,7 @@ public function add_settings() {
*
* @param array $args
*/
function theme_location( array $args ) {
public function theme_location( array $args ) {
$locations = get_nav_menu_locations();
$selected = (array) lloc\Msls\MslsOptions::instance()->mslsmenu_theme_location;
$options = [ sprintf( '<option value="" %s>%s</option>', selected( true, in_array( '', $selected ), false ), __( '-- empty --', 'mslsmenu' ) ) ];
Expand All @@ -150,7 +150,7 @@ function theme_location( array $args ) {
*
* @param array $args
*/
function display( array $args ) {
public function display( array $args ) {
$types = lloc\Msls\MslsLink::get_types_description();
$display = lloc\Msls\MslsOptions::instance()->mslsmenu_display;

Expand All @@ -166,7 +166,7 @@ function display( array $args ) {
*
* @param array $args
*/
function input( array $args ) {
public function input( array $args ) {
if ( class_exists( 'lloc\Msls\Component\Input\Text' ) ) {
$key = $args['mslsmenu_input'];
$value = lloc\Msls\MslsOptions::instance()->$key;
Expand All @@ -179,8 +179,10 @@ function input( array $args ) {

}

// @codeCoverageIgnoreStart
if ( function_exists( 'add_action' ) ) {
add_action( 'plugins_loaded', function () {
MslsMenu::init();
} );
}
// @codeCoverageIgnoreEnd
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Contributors: realloc
Donate link: http://www.greenpeace.org/international/
Tags: multilingual, multisite, language, switcher, international, localization, i18n, menu, nav_menu
Requires at least: 3.6.1
Tested up to: 5.7
Tested up to: 5.8
Requires PHP: 7.1
Stable tag: 2.2.4
Stable tag: 2.2.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -35,6 +35,10 @@ But this can lead to fatal errors if you don't know much about PHP, or maybe the

== Changelog ==

= 2.2.5 =
* phpstan config excluded
* WordPress 5.8 tested

= 2.2.4 =
* Unit tests added

Expand Down

0 comments on commit 339a61a

Please sign in to comment.