WordPress plugin to enable plugin activation using a JSON, YAML or PHP file.
Recommended method/s;
Roots Bedrock and WP-CLI
$ composer require soberwp/bundle
$ wp plugin activate bundle
$ composer require soberwp/bundle:1.0.2-p
- Download the zip file
- Unzip to your sites plugin folder
- Activate via WordPress
- PHP >= 5.6.x
By default either bundle.json
, bundle.yaml
or bundle.php
is used.
You can use a custom file for each using the filters below within your themes functions.php
file;
add_filter('sober/bundle/file', function () {
return get_stylesheet_directory() . '/plugin-dependencies.yaml';
});
Themes often require plugins in order to work — bundle leverages the popular tgmpa class to achieve plugin activation nags and actions.
[
{
"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
}
]
---
- 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
<?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.
- Change the composer.json version to ^1.0.2**
- Check CHANGELOG.md for any breaking changes before updating.
$ composer update
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
- For updates follow @withjacoby
- You can also hire me for WordPress or frontend work