PHP code example of androlax2 / wp-plugin-activation-manifest

1. Go to this page and download the library: Download androlax2/wp-plugin-activation-manifest library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

androlax2 / wp-plugin-activation-manifest example snippets



// ...
// after WordPress is loaded - eg: within an mu-plugin
// ..
\Androlax2\WordPress\PluginManifest\Activation::set('path/to/plugin-manifest.yml', getenv('WP_ENV'));
yml
# 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