szepeviktor/composer-theme-fusion

Composer plugin for ThemeFusion

v0.2.0 2020-04-16 14:34 UTC

This package is auto-updated.

Last update: 2022-01-02 10:50:36 UTC


README

Packagist Packagist stats PHPStan

A Composer plugin to load WordPress plugins from ThemeFusion.

💡 Always the latest version is installed, as ThemeFusion does not make other versions available. Package version locking can only be achieved by local persistent cache, not across hosts or users.

Installation

This Composer plugin must be installed globally as it adds a virtual package repository.

composer global require --update-no-dev szepeviktor/composer-theme-fusion

Configuration

Add your token and theme version to your config.json (in $COMPOSER_HOME).

You find the token in WordPress option fusion_registration_data. Get its value with e.g. WP-CLI wp option get fusion_registration_data.

{
  "config": {
    "theme-fusion": {
      "token": "YOUR THEME-FUSION TOKEN",
      "themeVersion": "YOUR AVADA THEME VERSION, EG. '6.2.2'"
    }
  }
}

Usage

Once the plugin is installed and configured, you can simply install any of the premium plugins (e.g. theme-fusion/fusion-core) as Composer packages. You find the list plugin slugs in this JSON:
https://updates.theme-fusion.com/?avada_action=get_plugins&avada_version=

💡 Use the vendor name theme-fusion.

Behind the scenes

  1. This package is a Composer plugin
  2. In the activate method it creates an ArrayRepository with package data from ThemeFusion API
  3. Package version is queried from ThemeFusion API
  4. When installing a package its URL is also queried from ThemeFusion API