2017 © Pedro Peláez
 

wordpress-muplugin bundle

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

image

soberwp/bundle

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

  • Tuesday, February 6, 2018
  • by soberwp
  • Repository
  • 4 Watchers
  • 20 Stars
  • 616 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 81 % Grown

The README.md

Bundle

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file., (*1)

Installation

Composer:

Recommended method/s;, (*2)

Roots Bedrock and WP-CLI, (*3)

$ composer require soberwp/bundle
$ wp plugin activate bundle

Roots Sage, (*4)

$ composer require soberwp/bundle:1.0.2-p

Manual:

  • Download the zip file
  • Unzip to your sites plugin folder
  • Activate via WordPress

Requirements:

Setup

By default either bundle.json, bundle.yaml or bundle.php is used., (*5)

You can use a custom file for each using the filters below within your themes functions.php file;, (*6)

add_filter('sober/bundle/file', function () {
    return get_stylesheet_directory() . '/plugin-dependencies.yaml';
});

Usage

Themes often require plugins in order to work — bundle leverages the popular tgmpa class to achieve plugin activation nags and actions., (*7)

Examples:

bundle.json, (*8)

[
  {
    "name": "Disable Comments",
    "slug": "disable-comments",
    "required": false,
    "force_activation": true
  },
  {
    "name": "Models",
    "slug": "models",
    "source": "https://github.com/soberwp/models/archive/master.zip",
    "external_url": "https://github.com/models/intervention",
    "required": true,
    "force_activation": true,
    "force_deactivation": false
  }
]

bundle.yaml, (*9)

---
- name: Disable Comments
  slug: disable-comments
  required: false
  force_activation: true
- name: Models
  slug: models
  source: https://github.com/soberwp/models/archive/master.zip
  external_url: https://github.com/models/intervention
  required: true
  force_activation: true
  force_deactivation: false

bundle.php, (*10)

<?php
return [
    [
        'name' => 'Disable Comments',
        'slug' => 'disable-comments',
        'required' => false,
        'force_activation' => true
    ],
    [
        'name' => 'Models',
        'slug' => 'models',
        'source' => 'https://github.com/soberwp/models/archive/master.zip',
        'external_url' => 'https://github.com/models/intervention',
        'required' => true,
        'force_activation' => true,
        'force_deactivation' => false
    ]
];

You can read tgmpa documentation for plugin activation options., (*11)

Updates

Composer:

  • Change the composer.json version to ^1.0.2**
  • Check CHANGELOG.md for any breaking changes before updating.
$ composer update

WordPress:

Includes support for github-updater to keep track on updates through the WordPress backend. * Download github-updater * Clone github-updater to your sites plugins/ folder * Activate via WordPress, (*12)

Other

The Versions

06/02 2018

dev-master

9999999-dev https://github.com/soberwp

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress

27/08 2017

dev-package

dev-package https://github.com/soberwp

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress

27/08 2017

1.0.1-p

1.0.1.0-patch https://github.com/soberwp

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress

11/03 2017

1.0.1

1.0.1.0 https://github.com/soberwp

WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress

07/01 2017

1.0.0

1.0.0.0 https://github.com/soberwp

Simple WordPress plugin for themeing using JSON.

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress