Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webdevstudios/wds-required-plugins

Make certain plugins required so that they cannot be (easily) deactivated. | Gatekeeper: @aubreypwd
https://github.com/webdevstudios/wds-required-plugins

mu-plugins plugins require wordpress

Last synced: 9 days ago
JSON representation

Make certain plugins required so that they cannot be (easily) deactivated. | Gatekeeper: @aubreypwd

Awesome Lists containing this project

README

        

# WDS Required Plugins

A library you can use to make any plugins required and auto-activate.

* Nobody can de-activate the plugin from the WordPress Admin
* They are auto-activated when required

To use, place this library in your `mu-plugins/` directory (if you don't have one, create one in `wp-content/`), then use the example below:

WebDevStudios. WordPress for big brands.

## Installation & Update

### With Composer

Add the following to your `composer.json`

```json
{
"extra": {
"installer-paths": {
"mu-plugins/{$name}/": ["type:wordpress-muplugin"]
}
}
}
```

Then use:

```bash
composer require webdevstudios/wds-required-plugins
```

This will install the `mu-plugin`, e.g. `mu-plugins/wds-required-plugins` in `wp-content` based projects.

You will have to require it in e.g. `mu-plugins/wds-required-plugins-list.php`:

```php
%s', $label_text );

return $label;
}
add_filter( 'wds_required_plugins_text', 'change_wds_required_plugins_text' );
```

### Hide Required Plugins (off by default)

To hide your required plugins from the plugins list, use the following filter/code:

```php
add_filter( 'wds_required_plugins_remove_from_list', '__return_true' );
```

This will make any plugin that is required simply not show in the plugins list.