2017 © Pedro Peláez
 

composer-plugin mu-plugin-installer

A Composer Installer for WordPress MU plugins

image

devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  • PHP
  • 10 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 12 % Grown

The README.md

A Composer Installer for WordPress MU Plugins

Latest Stable Version Latest Unstable Version License ![Build Status][travis-image] ![Coverage Status][coveralls-image], (*1)

This is a Composer Installer for WordPress MU Plugins., (*2)

The Installer is basically based on/compatible with A Multi-Framework Composer Library Installer but it also supports the loader script installation of your MU plugin., (*3)

The loader script is installed into mu-plugins directory by default so that you can provide your MU plugin including sub directory as a Composer package., (*4)

Example

A package:, (*5)

  • your-package-root, (*6)

    • mu-plugins/ (loader directory: mu-plugins by default), (*7)

      • your-plugin.php (loader script: same as your package name by default)
    • foo/, (*8)

      • bar.php
    • baz.php, (*9)

will be installed as:, (*10)

  • wp-content/mu-plugins/, (*11)

    • your-plugin.php (loader script), (*12)

    • your-plugin/ (same as your package name by default), (*13)

      • mu-plugins/ (original loader directory remains), (*14)

        • your-plugin.php (original loader script remains)
      • foo/, (*15)

        • bar.php
      • baz.php, (*16)

Example composer.json File (for MU plugin package)

composer.json becomes almost the same as A Multi-Framework Composer Library Installer's., (*17)

Package Type and Dependency (type and require)

{
    "name": "you/your-plugin-name",
    "type": "devaloka-muplugin",
    "require": {
        "devaloka/mu-plugin-installer": "~0.2.0"
    }
}

Custom Loader File (installer-loader)

installer-loader key is available for your custom loader file, which is the relative path from your package root., (*18)

{
    "extra": {
        "installer-loader": "loader/your-loader.php"
    }
}

You can check out a real world composer.json example., (*19)

Example composer.json File (for root package)

The root package means your project's composer.json., (*20)

Custom Loader Path (installer-loader-paths)

installer-loader-paths key is available for your custom install path for loader(s)., (*21)

This is almost the same as as A Multi-Framework Composer Library Installer's installer-paths but it is for the loader file., (*22)

{
    "extra": {
        "installer-loader-paths": {
            "your-custom-path/{$name}/": ["vendor/package"]
        }
    }
}

With a type: prefix:, (*23)

{
    "extra": {
        "installer-loader-paths": {
            "your-custom-path/{$name}/": ["type:devaloka-muplugin"]
        }
    }
}

{$vendor}, {$name} and {$type} variables are available., (*24)

In addition, {$loader} variable is available, which is the relative path to the loader file., (*25)

The Versions

12/06 2017

dev-master

9999999-dev https://github.com/devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • composer-plugin-api ~1.1.0

 

The Development Requires

plugin wordpress composer installer mu-plugin

07/06 2016

0.2.0

0.2.0.0 https://github.com/devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • composer-plugin-api ~1.1.0

 

The Development Requires

plugin wordpress composer installer mu-plugin

20/12 2015

0.1.2

0.1.2.0 https://github.com/devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • composer-plugin-api ~1.0.0

 

The Development Requires

plugin wordpress composer installer mu-plugin

19/12 2015

0.1.1

0.1.1.0 https://github.com/devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • composer-plugin-api ~1.0.0

 

The Development Requires

plugin wordpress composer installer mu-plugin

19/12 2015

0.1.0

0.1.0.0 https://github.com/devaloka/mu-plugin-installer

A Composer Installer for WordPress MU plugins

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • composer-plugin-api ~1.0.0

 

The Development Requires

plugin wordpress composer installer mu-plugin