Skip to content

Commit

Permalink
Version 2.4.1 prep-work
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Jun 22, 2024
1 parent bef456b commit 5aefc27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions MslsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,18 @@ public function display( array $args ) {
$types = lloc\Msls\MslsLink::get_types_description();
$display = $this->options->mslsmenu_display ?? '0';

/**
* Backward compatibility
*/
if ( ! class_exists( lloc\Msls\Component\Input\Select::class ) ) {
// @codeCoverageIgnoreStart
echo $args['msls_admin']->render_select( 'mslsmenu_display', $types, $display );
echo $args['msls_admin']->render_select( 'mslsmenu_display', $types, $display ); // XSS ok

return;
// @codeCoverageIgnoreEnd
}

echo ( new lloc\Msls\Component\Input\Select( 'mslsmenu_display', $types, $display ) )->render();
echo ( new lloc\Msls\Component\Input\Select( 'mslsmenu_display', $types, $display ) )->render(); // XSS ok
}

/**
Expand All @@ -197,9 +200,12 @@ public function display( array $args ) {
* @param array $args
*/
public function input( array $args ) {
/**
* Backward compatibility
*/
if ( ! class_exists( 'lloc\Msls\Component\Input\Text' ) ) {
// @codeCoverageIgnoreStart
echo $args['msls_admin']->render_input( $args['mslsmenu_input'] );
echo $args['msls_admin']->render_input( $args['mslsmenu_input'] ); // XSS ok

return;
// @codeCoverageIgnoreEnd
Expand All @@ -208,7 +214,7 @@ public function input( array $args ) {
$key = $args['mslsmenu_input'] ?? '';
$value = $this->options->$key ?? '';

echo ( new lloc\Msls\Component\Input\Text( $key, $value ) )->render();
echo ( new lloc\Msls\Component\Input\Text( $key, $value ) )->render(); // XSS ok
}

}
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, menu
Requires at least: 5.3
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 2.4.0
Stable tag: 2.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down

0 comments on commit 5aefc27

Please sign in to comment.