The Another Multi-Brand Global Styles releases
Multi-Brand Global Styles lets administrators define Brands on a single WordPress installation
by The Another · github.com/the-another/multi-brand-global-styles · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/the-another/multi-brand-global-styles/releases/download/v0.6.0/the-another-multi-brand-global-styles-0.6.0.zipReadme
The Another Multi-Brand Global Styles
Define Brands — URL match rules with per-Brand global-style overrides and content variables — on a single WordPress installation serving multiple domains and/or path sections.
- Requires: WordPress 6.9+, PHP 8.3+
- License: GPL-2.0-or-later
- Homepage: https://theanother.org/plugin/multi-brand-global-styles/
For the WordPress.org listing, see
readme.txt. For development setup, architecture, testing, and how to contribute, seeCONTRIBUTORS.md.
What it does
A Brand bundles the following and applies them wherever its URL rules match the incoming request — without touching the theme's theme.json or creating a child theme:
- URL match rules — whole domains (
auctionbill.com,beta.auctionbill.com) or path sections of one or more sites (site.com/farm/*,site2.com/farm/*). Most-specific rule wins: host+path beats host-only, longer path prefix beats shorter, and prefixes match on path-segment boundaries. - Global style overrides — each Brand carries its own theme.json-shaped styles (colors, typography, spacing, per-element and per-block), merged over the active theme at render time via the
wp_theme_json_data_userfilter. - Content variables — tokens like
%%brand.name%%in post content, template parts, widgets, or menus are substituted with the matched Brand's values. Two passes cover this: the rendered HTML, and a block's attributes before its render callback runs — the latter is what makes a token usable in a navigation link's URL, which core escapes withesc_url()on the way out. Tokens stay literal in the admin and in the editor's block previews, so authors edit the token rather than one Brand's resolved value. - Brand identity — an optional per-Brand logo, site title, tagline, and favicon.
- Image replacements — swap any image for a per-Brand replacement, from a central meta box on the Brand or from the Image block's inspector panel.
- Editor preview — a block-editor Brand preview sidebar (canvas image/identity swap) plus a frontend preview link for admins.
An optional default Brand acts as the fallback for requests that match no rule. This is not WP Multisite and not separate installs — it's one install, one database, many Brands.
Only users with the edit_theme_options capability (admins/theme editors) can create or edit Brands.
Public API
-
mbgs_request_home_url( mixed $url ): mixed(function) — server-side code that builds URLs outside the rendered page (emails, API payloads) can ask for the home URL as seen from the domain being browsed:$origin = function_exists( 'mbgs_request_home_url' ) ? mbgs_request_home_url( home_url() ) : home_url();The URL's scheme and host are swapped to the browsed domain (path, query and fragment preserved) when all of the following hold:
- the request's Host+path explicitly matched a configured Brand URL rule — the default-Brand fallback and the admin preview override never trigger a swap;
- that Brand has URL rewrite enabled;
- the passed URL's host is the site's own
home/siteurlhost. This is a home-URL bridge, not a general URL rewriter — pass it anything else (a CDN asset, an external callback) and you get it back untouched.
The scheme honors the Brand's force-https setting and the current request, but is never downgraded below the passed URL's own: an
https://home URL always comes backhttps://. In every other case — no rule match, rewrite off, a non-home URL, a non-string value — the passed value is returned unchanged (and with this plugin inactive the function does not exist, hence thefunction_exists()guard). The substituted authority derives from the client-supplied Host header; it is only ever a host that explicitly matched a configured Brand URL rule, but consumers must still treat it as untrusted for anything beyond link/branding selection. -
mbgs_request_home_url(filter) — extension point applied inside the function to its computed result:apply_filters( 'mbgs_request_home_url', $brand_aware, $original ). Third-party code canadd_filterhere to override the Brand-aware value; the substitution itself has already happened (or been declined) by the time it runs. Consumers wanting the value call the function above — they do not apply this filter themselves.
Contributing
Contributor guidelines, the code architecture, and all development/testing commands live in CONTRIBUTORS.md. Release history is in CHANGELOG.md.
License
GPL-2.0-or-later. See https://www.gnu.org/licenses/gpl-2.0.html.
Read the full README on GitHub →
Releases
| Tag | Published | Asset | Downloads |
|---|---|---|---|
| v0.6.0 | Aug 30, 2026 | the-another-multi-brand-global-styles-0.6.0.zip | 14 |
| v0.5.1 | Aug 16, 2026 | the-another-multi-brand-global-styles-0.5.1.zip | 49 |
| v0.5.0 | Aug 13, 2026 | the-another-multi-brand-global-styles-0.5.0.zip | 39 |
| v0.4.0 | Jul 25, 2026 | the-another-multi-brand-global-styles-0.4.0.zip | 21 |
| v0.3.4 | Jul 17, 2026 | the-another-multi-brand-global-styles-0.3.4.zip | 12 |
| v0.3.3 | Jul 7, 2026 | the-another-multi-brand-global-styles-0.3.3.zip | 35 |
| v0.3.2 | Jul 6, 2026 | the-another-multi-brand-global-styles-0.3.2.zip | 3 |
| v0.3.1 | Jul 6, 2026 | the-another-multi-brand-global-styles-0.3.1.zip | 8 |
| v0.3.0 | Jul 6, 2026 | the-another-multi-brand-global-styles-0.3.0.zip | 3 |
| v0.2.0 | Jul 5, 2026 | the-another-multi-brand-global-styles-0.2.0.zip | 0 |
| v0.1.1 | Jul 5, 2026 | the-another-multi-brand-global-styles-0.1.1.zip | 0 |
| v0.1.0 | Jul 4, 2026 | the-another-multi-brand-global-styles-0.1.0.zip | 13 |
Active-site estimate ≈40 comes from the median of recent superseded releases. Method.