diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a96abd9..1d04cc0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,6 +40,11 @@ jobs: test ! -e "$BUILD_DIR/$forbidden" || { echo "::error::$BUILD_DIR/$forbidden must not be shipped"; exit 1; } done echo "Build directory holds $(find "$BUILD_DIR" -type f | wc -l) files." + # composer build also leaves a mslsmenu.zip here. The deploy action below runs + # "zip -r" on that very path, which merges into an existing archive instead of + # replacing it - the attestation would then compare a zip that still carries + # entries from the local build. Drop it so the action starts from scratch. + rm -f "$BUILD_DIR.zip" - name: WordPress Plugin Deploy uses: 10up/action-wordpress-plugin-deploy@stable id: deploy @@ -56,4 +61,6 @@ jobs: - name: Attest build provenance uses: johnbillion/action-wordpress-plugin-attestation@0.7.3 with: + # Defaults to the repository name ("MslsMenu"); the wp.org slug is lowercase. + plugin: mslsmenu zip-path: ${{ steps.deploy.outputs.zip-path }} diff --git a/AGENTS.md b/AGENTS.md index 69a3047..d34591f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,4 +35,6 @@ ## Release Packaging Tips - Bump the plugin header version in `MslsMenu.php` and the `Stable tag` in `readme.txt` to the same value, and add the matching `= x.y.z =` entry to the `readme.txt` changelog. WordPress.org rejects the release if header and stable tag disagree. - Run `composer build` locally only to inspect the result. The shipped artifact is built in CI: `.github/workflows/deploy.yml` runs the same `composer build`, verifies the contents and deploys them through `BUILD_DIR: mslsmenu`. -- Tag without a `v` prefix (`3.0.1`) and push the tag — that push is what triggers the deploy workflow. +- Tag without a `v` prefix (`3.0.2`) and push the tag — that push is what triggers the deploy workflow. +- **Never move a tag that has already been pushed.** WordPress.org refuses to overwrite an existing `tags/` directory (`deploy.sh` logs "was already published" and skips the SVN write), so a re-pointed tag silently leaves the wrong code online. This is how 3.0.1 ended up shipping the 3.0.0 code. A botched release needs a new version number, not a corrected tag. +- Tag the merge commit on `master`, never a branch head, and check that its `Version:` header is the one you intend to release. diff --git a/MslsMenu.php b/MslsMenu.php index 286402a..3a7fb8c 100644 --- a/MslsMenu.php +++ b/MslsMenu.php @@ -9,7 +9,7 @@ * * Plugin Name: MslsMenu * Requires Plugins: multisite-language-switcher - * Version: 3.0.1 + * Version: 3.0.2 * Plugin URI: https://wordpress.org/plugins/mslsmenu/ * Description: Adds the Multisite Language Switcher to the primary-nav-menu * Author: Dennis Ploetner @@ -82,10 +82,6 @@ public static function init( $options ): MslsMenu { return $obj; } - private function get_msls_output(): lloc\Msls\Frontend\Output { - return msls_output(); - } - /** * Callback for wp_nav_menu_items * @@ -101,7 +97,7 @@ public function nav_item( string $items, \stdClass $args ): string { if ( is_array( $menu_locations ) && in_array( $theme_location, $menu_locations, true ) ) { $menu = ''; - $obj = $this->get_msls_output(); + $obj = msls_output(); foreach ( $obj->get( (int) $this->options->mslsmenu_display, false, (bool) $this->options->only_with_translation ) as $item ) { $menu .= $this->options->mslsmenu_before_item . $item . $this->options->mslsmenu_after_item; } @@ -206,6 +202,24 @@ public function input( array $args ) { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo ( new lloc\Msls\Component\Input\Text( $key, $value ) )->render(); } + + /** + * Callback for admin_notices, telling the administrator why MslsMenu does nothing. + * + * "Requires Plugins" cannot express a minimum version, so without this notice an + * outdated Multisite Language Switcher would make the menu links disappear without + * any explanation. + */ + public static function requirements_notice(): void { + if ( ! current_user_can( 'activate_plugins' ) ) { + return; + } + + printf( + '

%s

', + esc_html__( 'MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer.', 'mslsmenu' ) + ); + } } // @codeCoverageIgnoreStart @@ -213,10 +227,16 @@ public function input( array $args ) { add_action( 'plugins_loaded', function () { - // The namespaced class only exists from MSLS 3.0 on. Against an older MSLS the - // null object keeps every hook unregistered instead of fataling on a missing type. - $options = class_exists( lloc\Msls\Options\Options::class ) ? msls_options() : null; - MslsMenu::init( $options ); + // The namespaced class exists from MSLS 3.0 on, the api.php helpers only once the + // MSLS plugin file itself was loaded - being autoloadable is not enough. Both have + // to hold, otherwise the null object keeps every hook unregistered. + $ready = class_exists( lloc\Msls\Options\Options::class ) && function_exists( 'msls_options' ); + + if ( ! $ready ) { + add_action( 'admin_notices', array( MslsMenu::class, 'requirements_notice' ) ); + } + + MslsMenu::init( $ready ? msls_options() : null ); } ); } diff --git a/languages/mslsmenu-de_DE.l10n.php b/languages/mslsmenu-de_DE.l10n.php index 0478ec6..19890e9 100644 --- a/languages/mslsmenu-de_DE.l10n.php +++ b/languages/mslsmenu-de_DE.l10n.php @@ -3,17 +3,20 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'German (de_DE)', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:04+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:06+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( 'Menu Settings' => 'Menü-Einstellungen', + 'Theme Location' => 'Position im Theme', 'Display' => 'Anzeige', 'Text/HTML before the list' => 'Text/HTML vor der Liste', 'Text/HTML after the list' => 'Text/HTML nach der Liste', 'Text/HTML before each item' => 'Text/HTML vor jedem Element', 'Text/HTML after each item' => 'Text/HTML nach jedem Element', '-- empty --' => '-- leer --', + 'Adds the Multisite Language Switcher to the primary-nav-menu' => 'Fügt den Multisite Language Switcher zum Hauptmenü hinzu', + 'MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer.' => 'MslsMenu ist inaktiv: Es benötigt den Multisite Language Switcher 3.0 oder neuer.', ), ); diff --git a/languages/mslsmenu-de_DE.mo b/languages/mslsmenu-de_DE.mo index 00a8765..c375a3d 100644 Binary files a/languages/mslsmenu-de_DE.mo and b/languages/mslsmenu-de_DE.mo differ diff --git a/languages/mslsmenu-de_DE.po b/languages/mslsmenu-de_DE.po index 5c5d5e4..e5443f7 100644 --- a/languages/mslsmenu-de_DE.po +++ b/languages/mslsmenu-de_DE.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: Dennis Ploetner \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:04+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:06+0100\n" "Language: German (de_DE)\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "Menü-Einstellungen" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" -msgstr "" +msgstr "Position im Theme" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Anzeige" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Text/HTML vor der Liste" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Text/HTML nach der Liste" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Text/HTML vor jedem Element" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Text/HTML nach jedem Element" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "-- leer --" @@ -71,7 +63,7 @@ msgstr "" #. Description of the plugin #: MslsMenu.php msgid "Adds the Multisite Language Switcher to the primary-nav-menu" -msgstr "" +msgstr "Fügt den Multisite Language Switcher zum Hauptmenü hinzu" #. Author of the plugin #: MslsMenu.php @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "MslsMenu ist inaktiv: Es benötigt den Multisite Language Switcher 3.0 oder neuer." diff --git a/languages/mslsmenu-es_ES.l10n.php b/languages/mslsmenu-es_ES.l10n.php index 6d628ab..4fc06e1 100644 --- a/languages/mslsmenu-es_ES.l10n.php +++ b/languages/mslsmenu-es_ES.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'Spanish (es_ES)', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:07+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:07+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( diff --git a/languages/mslsmenu-es_ES.mo b/languages/mslsmenu-es_ES.mo index edb9ed1..fa34a58 100644 Binary files a/languages/mslsmenu-es_ES.mo and b/languages/mslsmenu-es_ES.mo differ diff --git a/languages/mslsmenu-es_ES.po b/languages/mslsmenu-es_ES.po index eaecbe5..61972e9 100644 --- a/languages/mslsmenu-es_ES.po +++ b/languages/mslsmenu-es_ES.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: Andreas Breitschopp \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:07+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:07+0100\n" "Language: Spanish (es_ES)\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Aspecto" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Texto/HTML antes de la lista" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Texto/HTML después de la lista" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Texto/HTML antes de cada ítem" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Texto/HTML después de cada ítem" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu-fr_FR.l10n.php b/languages/mslsmenu-fr_FR.l10n.php index e170ca3..71bad31 100644 --- a/languages/mslsmenu-fr_FR.l10n.php +++ b/languages/mslsmenu-fr_FR.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'French (fr_FR)', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:07+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:07+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( diff --git a/languages/mslsmenu-fr_FR.mo b/languages/mslsmenu-fr_FR.mo index d2a5501..8e1b188 100644 Binary files a/languages/mslsmenu-fr_FR.mo and b/languages/mslsmenu-fr_FR.mo differ diff --git a/languages/mslsmenu-fr_FR.po b/languages/mslsmenu-fr_FR.po index 96a8145..3e26210 100644 --- a/languages/mslsmenu-fr_FR.po +++ b/languages/mslsmenu-fr_FR.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: Andreas Breitschopp \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:07+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:07+0100\n" "Language: French (fr_FR)\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Affichage" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Texte/HTML avant la liste" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Texte/HTML après la liste" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Texte/HTML avant chaque article" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Texte/HTML après chaque article" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu-it_IT.l10n.php b/languages/mslsmenu-it_IT.l10n.php index c09f693..bf00ccc 100644 --- a/languages/mslsmenu-it_IT.l10n.php +++ b/languages/mslsmenu-it_IT.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'Italian (it_IT)', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:07+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:07+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( diff --git a/languages/mslsmenu-it_IT.mo b/languages/mslsmenu-it_IT.mo index 2942a2a..a8d87af 100644 Binary files a/languages/mslsmenu-it_IT.mo and b/languages/mslsmenu-it_IT.mo differ diff --git a/languages/mslsmenu-it_IT.po b/languages/mslsmenu-it_IT.po index 20dca73..aa9b471 100644 --- a/languages/mslsmenu-it_IT.po +++ b/languages/mslsmenu-it_IT.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: Antonella Cucinelli \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:07+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:07+0100\n" "Language: Italian (it_IT)\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "Impostazioni menu" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Mostra" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Testo/HTML davanti alla lista" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Testo/HTML dietro alla lista" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Testo/HTML davanti a ogni elemento" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Testo/HTML dietro a ogni elemento" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "-- vuoto --" @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu-nl_NL.l10n.php b/languages/mslsmenu-nl_NL.l10n.php index de5013f..b095c28 100644 --- a/languages/mslsmenu-nl_NL.l10n.php +++ b/languages/mslsmenu-nl_NL.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'nl_NL', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:06+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:06+0100', 'x-generator' => 'Poedit 1.5.7', 'messages' => array( diff --git a/languages/mslsmenu-nl_NL.mo b/languages/mslsmenu-nl_NL.mo index 5410219..56a0bd1 100644 Binary files a/languages/mslsmenu-nl_NL.mo and b/languages/mslsmenu-nl_NL.mo differ diff --git a/languages/mslsmenu-nl_NL.po b/languages/mslsmenu-nl_NL.po index 1870e59..e09c166 100644 --- a/languages/mslsmenu-nl_NL.po +++ b/languages/mslsmenu-nl_NL.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: Alexandra Kleijn \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:06+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:06+0100\n" "Language: nl_NL\n" "X-Generator: Poedit 1.5.7\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Weergave" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Tekst/HTML voor de lijst" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Tekst/HTML na de lijst" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Tekst/HTML voor elk item" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Tekst/HTML na elk item" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu-ru_RU.l10n.php b/languages/mslsmenu-ru_RU.l10n.php index 6649a66..da53af1 100644 --- a/languages/mslsmenu-ru_RU.l10n.php +++ b/languages/mslsmenu-ru_RU.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=n != 1;', 'language' => 'ru_RU', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:06+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:06+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( diff --git a/languages/mslsmenu-ru_RU.mo b/languages/mslsmenu-ru_RU.mo index 22bc874..980fe8b 100644 Binary files a/languages/mslsmenu-ru_RU.mo and b/languages/mslsmenu-ru_RU.mo differ diff --git a/languages/mslsmenu-ru_RU.po b/languages/mslsmenu-ru_RU.po index 15ed533..b60b908 100644 --- a/languages/mslsmenu-ru_RU.po +++ b/languages/mslsmenu-ru_RU.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: andreyv \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:06+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:06+0100\n" "Language: ru_RU\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" @@ -19,43 +19,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "Показать" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Текст/HTML перед элементом списка" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Текст/HTML после элемента списка" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Текст/HTML перед элементом" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Текст/HTML после элемента" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" @@ -83,3 +75,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu-zh_CN.l10n.php b/languages/mslsmenu-zh_CN.l10n.php index 80aaf97..46fb2fc 100644 --- a/languages/mslsmenu-zh_CN.l10n.php +++ b/languages/mslsmenu-zh_CN.l10n.php @@ -3,8 +3,8 @@ 'domain' => null, 'plural-forms' => 'nplurals=2; plural=(n != 1);', 'language' => 'Simplified Chinese (zh_CN)', - 'project-id-version' => 'MslsMenu 1.0', - 'pot-creation-date' => '2015-05-04 17:06+0100', + 'project-id-version' => 'MslsMenu 3.0.2', + 'pot-creation-date' => '2026-08-23T08:54:39+00:00', 'po-revision-date' => '2015-05-04 17:06+0100', 'x-generator' => 'Poedit 1.5.4', 'messages' => array( diff --git a/languages/mslsmenu-zh_CN.mo b/languages/mslsmenu-zh_CN.mo index 1fdcf84..82a7746 100644 Binary files a/languages/mslsmenu-zh_CN.mo and b/languages/mslsmenu-zh_CN.mo differ diff --git a/languages/mslsmenu-zh_CN.po b/languages/mslsmenu-zh_CN.po index 43fa83d..f23d369 100644 --- a/languages/mslsmenu-zh_CN.po +++ b/languages/mslsmenu-zh_CN.po @@ -1,13 +1,13 @@ msgid "" msgstr "" -"Project-Id-Version: MslsMenu 1.0\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/multisite-language-switcher\n" "Last-Translator: Dennis Ploetner \n" "Language-Team: DrBenson \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2015-05-04 17:06+0100\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: 2015-05-04 17:06+0100\n" "Language: Simplified Chinese (zh_CN)\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -18,43 +18,35 @@ msgstr "" "X-Poedit-SearchPath-0: .\n" "X-Poedit-SearchPath-1: ..\n" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "显示" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "Text/HTML 列表之前" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "Text/HTML 列表之后" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "Text/HTML 每个项目之前" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "Text/HTML 每个项目之后" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" @@ -82,3 +74,7 @@ msgstr "" #: MslsMenu.php msgid "http://lloc.de/" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/languages/mslsmenu.pot b/languages/mslsmenu.pot index b8d22f8..3ab2d8e 100644 --- a/languages/mslsmenu.pot +++ b/languages/mslsmenu.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv2 or later. msgid "" msgstr "" -"Project-Id-Version: MslsMenu 3.0.1\n" +"Project-Id-Version: MslsMenu 3.0.2\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/MslsMenu\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-08-22T14:39:19+00:00\n" +"POT-Creation-Date: 2026-08-23T08:54:39+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: mslsmenu\n" @@ -39,42 +39,38 @@ msgstr "" msgid "http://lloc.de/" msgstr "" -#: MslsMenu.php:121 -#: mslsmenu/MslsMenu.php:121 +#: MslsMenu.php:117 msgid "Menu Settings" msgstr "" -#: MslsMenu.php:134 -#: mslsmenu/MslsMenu.php:134 +#: MslsMenu.php:128 msgid "Theme Location" msgstr "" -#: MslsMenu.php:138 -#: mslsmenu/MslsMenu.php:138 +#: MslsMenu.php:132 msgid "Display" msgstr "" -#: MslsMenu.php:143 -#: mslsmenu/MslsMenu.php:143 +#: MslsMenu.php:137 msgid "Text/HTML before the list" msgstr "" -#: MslsMenu.php:144 -#: mslsmenu/MslsMenu.php:144 +#: MslsMenu.php:138 msgid "Text/HTML after the list" msgstr "" -#: MslsMenu.php:145 -#: mslsmenu/MslsMenu.php:145 +#: MslsMenu.php:139 msgid "Text/HTML before each item" msgstr "" -#: MslsMenu.php:146 -#: mslsmenu/MslsMenu.php:146 +#: MslsMenu.php:140 msgid "Text/HTML after each item" msgstr "" -#: MslsMenu.php:165 -#: mslsmenu/MslsMenu.php:165 +#: MslsMenu.php:159 msgid "-- empty --" msgstr "" + +#: MslsMenu.php:220 +msgid "MslsMenu is inactive: it requires Multisite Language Switcher 3.0 or newer." +msgstr "" diff --git a/readme.txt b/readme.txt index 92b5a24..f4abf22 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Tags: multilingual, multisite, language, switcher, menu Requires at least: 6.1 Tested up to: 7.1 Requires PHP: 7.4 -Stable tag: 3.0.1 +Stable tag: 3.0.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -35,55 +35,30 @@ But this can lead to fatal errors if you don't know much about PHP, or maybe the == Changelog == -= 3.0.1 = -* Changed: the version number now matches Multisite Language Switcher 3.0.1 - this is the add-on release for the new MSLS major version. -* Changed: requires WordPress 6.1 or newer, tested up to 7.1. -* Changed: requires Multisite Language Switcher 3.0 or newer. MslsMenu now calls the namespaced MSLS classes instead of the pre-3.0 compatibility aliases. With an older MSLS it stays inactive instead of raising an error. -* Internal: the release is deployed from the built distribution, the same artifact Plugin Check verifies. Build-only dependencies are no longer shipped. Static analysis now runs against the real MSLS classes instead of test stubs. += 3.0.2 = +* An admin notice explains why MslsMenu is doing nothing when Multisite Language Switcher is older than 3.0. +* The release is built and checked in CI, deployed from the same distribution Plugin Check verifies, and published with a build provenance attestation. +* The translation files were regenerated. = 2.5.1 = * plugin check integration added * missing license problem addressed - -= 2.5.0 = -* WordPress 6.6 tested * MslsOutput class deprecated init in favour of a function = 2.4.1 = * readme.txt tags updated * Plugin check issues fixed - -= 2.4.0 = -* WordPress 6.5 tested * "Requires Plugins" added = 2.3.2 = -* WordPress 6.3 tested - -= 2.3.1 = -* WordPress 6.2.2 tested * Pest as new dev/tester dependency = 2.2.6 = * Unit testing completed -* WordPress 6.1 tested - -= 2.2.5 = * phpstan config excluded -* WordPress 5.8 tested - -= 2.2.4 = * Pest for Unit tests added - -= 2.2.3 = * PHP 7.1 as minimum declared -= 2.2 = -* compatibility con MSLS 2.4 - -= 2.0 = -* compatibility con MSLS 2.0 - = 1.0 = * marked as stable * WordPress Coding Standards @@ -91,5 +66,5 @@ But this can lead to fatal errors if you don't know much about PHP, or maybe the == Upgrade Notice == -= 3.0.1 = -Version alignment with Multisite Language Switcher 3.0.1. Requires MSLS 3.0 or newer and WordPress 6.1 or newer. += 3.0.2 = +Replaces the faulty 3.0.1, which shipped the code of 3.0.0. Requires MSLS 3.0 or newer and WordPress 6.1 or newer. diff --git a/tests/phpstan-bootstrap.php b/tests/phpstan-bootstrap.php index 4f59036..a2f8091 100644 --- a/tests/phpstan-bootstrap.php +++ b/tests/phpstan-bootstrap.php @@ -18,4 +18,14 @@ define( 'ABSPATH', dirname( __DIR__ ) . '/' ); } -require_once dirname( __DIR__ ) . '/vendor/lloc/multisite-language-switcher/includes/aliases.php'; +$msls = dirname( __DIR__ ) . '/vendor/lloc/multisite-language-switcher/includes/aliases.php'; + +// "composer build" runs "composer update --no-dev", which removes MSLS from vendor/. +// Fail with an instruction instead of a "Failed opening required" fatal. +if ( ! file_exists( $msls ) ) { + throw new RuntimeException( + "Multisite Language Switcher is missing from vendor/. Run 'composer install' (a previous 'composer build' stripped the dev dependencies)." + ); +} + +require_once $msls;