Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/webdevstudios/wds-required-plugins
- Owner: WebDevStudios
- Created: 2014-08-12T13:44:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-18T15:43:40.000Z (about 1 year ago)
- Last Synced: 2024-12-10T18:48:20.242Z (18 days ago)
- Topics: mu-plugins, plugins, require, wordpress
- Language: PHP
- Homepage:
- Size: 96.7 KB
- Stars: 76
- Watchers: 47
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
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 requiredTo 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:
## 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.