PHPackages                             soberwp/bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. soberwp/bundle

AbandonedArchivedWordpress-muplugin[Utility &amp; Helpers](/categories/utility)

soberwp/bundle
==============

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

1.0.2-p(7y ago)254.1k4MITPHPPHP &gt;=5.4.0

Since Jan 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/soberwp/bundle)[ Packagist](https://packagist.org/packages/soberwp/bundle)[ Docs](https://github.com/soberwp)[ RSS](/packages/soberwp-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (4)Versions (7)Used By (0)

Bundle
======

[](#bundle)

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

Installation
------------

[](#installation)

#### Composer:

[](#composer)

Recommended method/s;

[Roots Bedrock](https://roots.io/bedrock/) and [WP-CLI](http://wp-cli.org/)

```
$ composer require soberwp/bundle
$ wp plugin activate bundle
```

[Roots Sage](https://roots.io/sage/)

```
$ composer require soberwp/bundle:1.0.2-p
```

#### Manual:

[](#manual)

- Download the [zip file](https://github.com/soberwp/themer/archive/master.zip)
- Unzip to your sites plugin folder
- Activate via WordPress

#### Requirements:

[](#requirements)

- [PHP](http://php.net/manual/en/install.php) &gt;= 5.6.x

Setup
-----

[](#setup)

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';
});
```

Usage
-----

[](#usage)

Themes often require plugins in order to work — bundle leverages the popular [tgmpa](http://tgmpluginactivation.com/) class to achieve plugin activation nags and actions.

#### Examples:

[](#examples)

[bundle.json](.github/bundle.json)

```
[
  {
    "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](.github/bundle.yaml)

```
---
- 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](.github/bundle.php)

```
