Closed LucasDemea closed 3 years ago
There isn't a setting for that, but you could replace the whitelist repository with the plugins repository. You wouldn't be able to remove plugins going this route, though.
add_action( 'satispress_compose', function( $plugin, $container ) {
$container['repository.whitelist'] = $container['repository.plugins'];
}, 10, 2 );
Thank you, this solution could cover my needs. Otherwise is there a filter or something that could be a starting point to add this feature by code ?
You can create your own repository with your own rules and replace it in the same way. Or use the satispress_plugins filter. The whitelist repository actually starts with all installed plugins and themes and filters out ones that haven't been enabled.
Thanks, will have a look at that !
Just for reference, I ended up adding a mu-plugin with :
function satispress_plugin_filter() {
return array_keys( get_plugins() );
}
add_filter( 'satispress_plugins', 'satispress_plugin_filter' );
This way, all newly added plugin are automatically satispress-enabled.
Hi, Is there a way to enabled satispress by default for each new installed plugin ?