Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,46 @@ jobs:
run: composer install --no-dev --no-interaction --optimize-autoloader
- name: Composer build
run: composer run-script build
# "composer build" leaves the ready-to-ship distribution in ./multisite-language-switcher
# (bin/git-release.sh rsyncs the repository through .distignore). Everything after that
# point - including the "composer update" that restores the require-dev packages for
# local development - only touches the working tree, never the build directory.
- name: Verify the build directory
run: |
BUILD_DIR=multisite-language-switcher
test -d "$BUILD_DIR" || { echo "::error::$BUILD_DIR was not created by composer build"; exit 1; }
for required in MultisiteLanguageSwitcher.php readme.txt vendor/autoload.php; do
test -e "$BUILD_DIR/$required" || { echo "::error::$BUILD_DIR/$required is missing"; exit 1; }
done
for forbidden in .git .github docs src tests node_modules composer.lock package.json; do
test ! -e "$BUILD_DIR/$forbidden" || { echo "::error::$BUILD_DIR/$forbidden must not be shipped"; exit 1; }
done
php -r '
$lock = json_decode(file_get_contents("composer.lock"), true);
$found = [];
foreach ($lock["packages-dev"] as $package) {
if (is_dir("multisite-language-switcher/vendor/" . $package["name"])) {
$found[] = $package["name"];
}
}
if ($found) {
fwrite(STDERR, "::error::require-dev packages in the build directory: " . implode(", ", $found) . PHP_EOL);
exit(1);
}
'
echo "Build directory holds $(find "$BUILD_DIR" -type f | wc -l) files, production dependencies only."
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
id: deploy
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: multisite-language-switcher
# Deploy only the built distribution. Without this the action falls back to
# rsyncing the whole workspace through .distignore - which cannot exclude vendor/,
# so the require-dev packages restored by "composer build" ended up in the SVN
# transaction and broke the 3.0.0 release.
BUILD_DIR: multisite-language-switcher
with:
generate-zip: true
- name: Attest build provenance
Expand Down
6 changes: 4 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## 3.0.0
## 3.0.1
* Fix: the WordPress.org deploy pushed the whole workspace instead of the built distribution.
* No changes to the plugin itself - the shipped code is identical to 3.0.0.

## 3.0.0
* Add Quick Create for translations: create the translated post straight from the editor metabox, or pick a source post on the new "Add from Translation" submenu (single and bulk), backed by a REST endpoint and switchable in the settings.
* Add `msls_quick_create_capability` so integrations can override the Quick Create permission checks, plus filters for the post data, the inserted post, the response, the untranslated-posts list, and the mapped taxonomy terms.
* Add filter hooks for the AJAX suggest results of the post and term metaboxes.
Expand All @@ -22,7 +25,6 @@
* Documentation: update README.md code snippets to reflect new function names.

## 2.10.0

* Add prefixed public helper functions (msls_get_*, msls_the_switcher) with deprecation shims for legacy names to satisfy WPCS while staying backward compatible.
* Expose action hook names as constants for safer programmatic use.
* Accessibility: add aria-current="page" on the active language link.
Expand Down
4 changes: 2 additions & 2 deletions MultisiteLanguageSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Multisite Language Switcher Plugin
*
* Plugin Name: Multisite Language Switcher
* Version: 3.0.0
* Version: 3.0.1
* 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 Down Expand Up @@ -42,7 +42,7 @@
* @author Dennis Ploetner <re@lloc.de>
*/
if ( ! defined( 'MSLS_PLUGIN_VERSION' ) ) {
define( 'MSLS_PLUGIN_VERSION', '3.0.0' );
define( 'MSLS_PLUGIN_VERSION', '3.0.1' );
define( 'MSLS_PLUGIN_PATH', plugin_basename( __FILE__ ) );
define( 'MSLS_PLUGIN__FILE__', __FILE__ );

Expand Down
17 changes: 13 additions & 4 deletions 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: 7.1
Requires PHP: 7.4
Stable tag: 3.0.0
Stable tag: 3.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -57,9 +57,7 @@ It's up to you - of course. But yes, if you want to use the Multisite Language S

= How can I automatically redirect users based on the browser language? =

The Multisite Language Switcher does not redirect the users automatically. I'm not sure if the plugin should do that. You might check out this [jQuery plugin](
https://github.com/danieledesantis/jquery-language-detection) or [this approach with a theme](https://github.com/oncleben31/Multisite-Language-Switcher-Theme)
if you need such functionality.
The Multisite Language Switcher does not redirect the users automatically. I'm not sure if the plugin should do that.

= How can I add the Multisite Language Switcher to the nav menu of my blog? =

Expand Down Expand Up @@ -95,6 +93,11 @@ Please visit the [MSLS website](https://msls.co/) or use the [WordPress support

== Changelog ==

= 3.0.1 =

* Fixed: 3.0.0 could not be published on WordPress.org
* The plugin code is identical to 3.0.0.

= 3.0.0 =

* New: Quick Create - create the translated post straight from the editor metabox, or pick a source post on the new `Add from Translation` submenu (single and bulk). Backed by a REST endpoint and switchable in the settings.
Expand Down Expand Up @@ -126,6 +129,12 @@ The full history is kept in the separate [Changelog](https://github.com/lloc/Mul

== Upgrade Notice ==

= 3.0.1 =

Republishes 3.0.0, whose upload to WordPress.org failed. The plugin code is unchanged
against 3.0.0 - only the release pipeline was fixed. See the 3.0.0 notice below for what
the major release brings.

= 3.0.0 =

Major release. The class structure moved into sub-namespaces, but every pre-3.0 class name
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": "3.0.0",
"version": "3.0.1",
"description": "Review the settings for the Multisite Language Switcher plugin, as the block utilizes the API function `msls_the_switcher()` for its output.",
"example": {},
"supports": {
Expand Down