Skip to content
This repository was archived by the owner on Jun 11, 2021. It is now read-only.
/ bundle Public archive

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

License

Notifications You must be signed in to change notification settings

soberwp/bundle

Repository files navigation

Bundle

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

Installation

Composer:

Recommended method/s;

Roots Bedrock and WP-CLI

$ composer require soberwp/bundle
$ wp plugin activate bundle

Roots Sage

$ 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.

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

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

Examples:

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

---
- 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

<?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.

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.

Other

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy