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
12 changes: 11 additions & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@ name: Unit Tests
on: [push]
jobs:
unit-tests:
name: Unit Tests (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer
coverage: none
- name: Composer dependencies
run: composer install
run: composer install --no-interaction --no-progress --prefer-dist
- name: PHPUnit Tests
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<ruleset name="CS">
<description>PHPCS example</description>
<config name="testVersion" value="7.4-"/>
<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>

<arg value="ps"/>
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"wp-coding-standards/wpcs": "^3.0",
"szepeviktor/phpstan-wordpress": "^2.0",
"phpstan/extension-installer": "^1.4",
"yoast/phpunit-polyfills": "^3.1",
"phpunit/phpunit": "^9.6",
"brain/monkey": "^2.0@dev",
"phpstan/phpstan-mockery": "^2.0"
Expand Down
1 change: 1 addition & 0 deletions modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ This plugin provides various improvements for WordPress multisite installations.
| [Introduce `get_site_by()` function for multisite](./GetSiteBy/README.md) | Provides a utility function to retrieve a site object from the multisite network using a specific field such as ID, slug, domain, path, or full URL. This makes it easier to locate subsites without relying on raw SQL or manual loops. | [#40180](https://core.trac.wordpress.org/ticket/40180) |
| [Last User login](./LastUserLogin/README.md) | This module enhances the Network Admin Users screen in WordPress Multisite by adding a “Last Login” column. It automatically records the timestamp each time a user logs in and displays it in a readable, timezone-aware format. | [#11](https://github.com/inpsyde/multisyde/issues/11) |
| [Site Active Theme](./SiteActiveTheme/README.md) | Displays the active theme (and its version) for each site in the Network Admin > Sites dashboard. This makes it easy for network administrators to quickly audit which themes are used across the network. | [#56458](https://core.trac.wordpress.org/ticket/56458) |
| [Permalink Cleanup](./PermalinkCleanup/README.md) | Automatically removes the `/blog` prefix from the main site's permalink structure in multisite installations to deliver cleaner primary site URLs. | [#24](https://github.com/inpsyde/multisyde/issues/24) |

_Made with ❤️ by [Syde](https://syde.com)._
2 changes: 1 addition & 1 deletion multisyde.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: MultiSyde
* Plugin URI: https://github.com/inpsyde/multisyde
* Description: A WordPress plugin that explores potential improvements for WordPress Multisite.
* Version: 1.1.1
* Version: 1.2.0
* Requires at least: 6.8
* Requires PHP: 7.4
* Author: Syde
Expand Down
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: multisite, network admin, enhancements, usability, admin tools
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.1.1
Stable tag: 1.2.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -29,6 +29,8 @@ MultiSyde follows a modular architecture where each feature addresses specific p

**Site Active Theme** - Displays the active theme for each site in the Network Admin dashboard, making it easier to manage themes across the network (addresses Trac [#56458](https://core.trac.wordpress.org/ticket/56458/ "WordPress Trac Ticket #56458"))

**Permalink Cleanup** - Automatically removes the `/blog` prefix from the main site's permalink structure in multisite networks for cleaner URLs (addresses GitHub issue [#24](https://github.com/inpsyde/multisyde/issues/24 "MultiSyde GitHub Issue #24"))

The feature set continues to expand based on community contributions and real-world needs.

== Installation ==
Expand Down Expand Up @@ -136,6 +138,9 @@ Update for the latest enhancements and improvements. MultiSyde evolves continuou

== Changelog ==

= 1.2.0 =
* Enhancement: Added [Permalink Cleanup](https://github.com/inpsyde/multisyde/blob/main/modules/PermalinkCleanup/README.md "MultiSyde Permalink Cleanup Module") to automatically remove the `/blog` prefix from the main site's permalink structure in multisite networks.

= 1.1.1 =
* MultiSyde is now network-wide activatable only.

Expand Down
22 changes: 22 additions & 0 deletions tests/php/unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,25 @@
*
* @package multisyde-unit-tests
*/

if ( ! function_exists( 'str_starts_with' ) ) {
/**
* Polyfill for `str_starts_with()` function added in PHP 8.0.
*
* Performs a case-sensitive check indicating if
* the haystack begins with needle.
*
* @since 5.9.0
*
* @param string $haystack The string to search in.
* @param string $needle The substring to search for in the `$haystack`.
* @return bool True if `$haystack` starts with `$needle`, otherwise false.
*/
function str_starts_with( $haystack, $needle ) {
if ( '' === $needle ) {
return true;
}

return 0 === strpos( $haystack, $needle );
}
}