2017 © Pedro Peláez
 

library wp-plugin-activation-manifest

Simple file-based plugin activation control for WordPress

image

primetime/wp-plugin-activation-manifest

Simple file-based plugin activation control for WordPress

  • Wednesday, July 27, 2016
  • by aaemnnosttv
  • Repository
  • 3 Watchers
  • 1 Stars
  • 790 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 39 % Grown

The README.md

WP Plugin Activation Manifest

Lock down the activation state of individual plugins based on environment with minimal effort., (*1)

Usage

Create a YAML file that defines the plugin activation state you want to enforce. Name it whatever you wish and put it wherever you want (ideally outside of the webroot). Add this file to your project's repository., (*2)

Example manifest file:, (*3)

# top level keys are the environment
some_environment:
  enable:
    - someplugin/someplugin.php
  disable:
    - someotherplugin/someotherplugin.php
  # supports multisite
  network-enable:
    - someplugin/someplugin.php
  network-disable:
    - someplugin/someplugin.php

# 'global' is a special key that you can use to apply to all environments
global:
  enable:
    - woocommerce/woocommerce.php
    - wpmandrill/wpmandrill.php

development:
  disable:
    - wpmandrill/wpmandrill.php

Install composer require primetime/wp-plugin-activation-manifest, (*4)

Execute the mandate, (*5)

require('vendor/autoload.php');
// ...
// after WordPress is loaded - eg: within an mu-plugin
// ..
\PrimeTime\WordPress\PluginManifest\Activation::set('path/to/plugin-manifest.yml', getenv('WP_ENV'));

In the example above, WP_ENV is an environment variable defining the name of the environment (eg: development, staging, production). This environment name should match to a top-level key in the yaml file., (*6)

Environment configuration is applied after the global configuration and will take precedence over it., (*7)

That's it!, (*8)

The Versions

27/07 2016

dev-master

9999999-dev

Simple file-based plugin activation control for WordPress

  Sources   Download

GPL-2.0

The Requires

 

27/07 2016

v0.1

0.1.0.0

Simple file-based plugin activation control for WordPress

  Sources   Download

GPL-2.0

The Requires