Download the PHP package kitaris/module-theme-skin-switcher without Composer

On this page you can find all versions of the php package kitaris/module-theme-skin-switcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-theme-skin-switcher

Kitaris Theme Skin Switcher

A WordPress library for block themes that need more than core style variations: packaged design skins (tokens, CSS, section patterns, dividers) with a Site Editor switcher and optional CLI provisioning.

Use it in any theme or child theme that defines a design-skins/ directory. No proprietary stack required.

Features

Requirements

Installation

Register the autoloader in your theme, then boot once from functions.php:

Public assets (editor bundle)

The package ships compiled JavaScript and CSS under build/. Your theme or host must expose that directory at a URL WordPress can enqueue (for example by vendoring the package under the theme’s vendor/ directory, or via a documented symlink in local development).

Theme structure

Place skins on the theme that should own them (usually a child theme):

variation.json — Same general shape as a WordPress global style variation (settings, styles, presets). The package merges it into the active theme layer.

build/design-skins/{slug}/style.css — Enqueued on the front end and in the editor canvas when that skin is active.

Slugs are derived from directory names under design-skins/ (lowercase, hyphenated). No manual registry is required.

Site Editor

After boot, editors with edit_theme_options see a Design skin control in the Global Styles experience. Choosing a skin:

  1. Applies preview CSS and tokens client-side
  2. Marks the Site Editor as dirty so the user can save
  3. On save, persists theme_skin_switcher_active_style in theme mods

The editor script handle is theme-skin-switcher-editor.

Active skin storage

Item Value
Theme mod theme_skin_switcher_active_style
Body class theme-skin-{slug} (front end and admin editor screens)
Block editor settings themeSkinSwitcherActiveSlug, themeSkinSwitcherActiveClass

Older sites that stored the active slug under a different theme mod key are migrated automatically on read.

WP-CLI

Use CLI for installs, imports, and automation. It is the supported way to set a skin outside the Site Editor.

REST API

Read-only endpoint for editor boot data (styles list, switch payloads, active slug). Requires siratik/rest-access.

Requirement Detail
Authentication Logged-in user
Capability edit_theme_options
Methods GET only
Discovery Omitted from the public REST route index

There is no REST endpoint to change the active skin. Use WP-CLI, theme mods, or Site Editor save.

Clients should send the standard WordPress REST nonce (X-WP-Nonce / wp_rest), as with other block editor requests.

Hooks

Hook When Use
theme_skin_switcher_register After auto-registration of the theme pack Register a custom pack path with SkinPackRegistry::register()
theme_skin_switcher_client_switch_payload Building editor switch payload Adjust URLs, classes, or metadata per skin
theme_skin_switcher_client_custom_theme_properties Client-side token preview Filter flattened --wp--custom--* variables
theme_skin_switcher_editor_experience_data Editor experience config array Point pattern/divider pickers at skin subdirectories
theme_skin_switcher_section_pattern_base_directories Resolving section pattern SVG paths Add filesystem base directories

Example — force a custom pack root:

Development

From the package root:

PHP classes live under inc/classes/ with namespace KitarisModule\ThemeSkinSwitcher\.

License

GPL-3.0-or-later — see LICENSE.

Disclaimer

This software is provided "as is", without warranty of any kind, express or implied, including the warranties of merchantability and fitness for a particular purpose. To the extent permitted by applicable law, the authors and copyright holders, together with their parent, subsidiary, and affiliated companies and contributors, are not liable for any direct, indirect, incidental, or consequential damages arising from its use or inability to use it, including loss of data, revenue, or site availability.

The software does not guarantee that your site is secure, ranks in search results, or complies with privacy or other laws; that remains the site owner's responsibility. AI-generated content can be inaccurate and should be reviewed before publishing. Third-party services the software connects to are governed by their own terms.

Keep a current backup and test changes on a staging site before applying them to a live site. See sections 15 and 16 of the GNU General Public License, version 3, for the full terms.


All versions of module-theme-skin-switcher with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
siratik/package-loader Version ^0.1
siratik/rest-access Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kitaris/module-theme-skin-switcher contains the following files

Loading the files please wait ...