I don't think this functionality currently exists, but if it does, close this.
Like this?
function jetpackme_force_deactivate_rp() {
if ( class_exists( 'Jetpack' ) ) {
Jetpack::deactivate_module( 'related-posts' );
}
}
add_action( 'init', 'jetpackme_force_deactivate_rp' );
or something like this:
https://jeremy.hu/customize-the-list-of-modules-available-in-jetpack/
?
I am unsure of the difference, but it needs to be able to disable a module and not just upon activating Jetpack. @jeherve probably has a better idea than me.
something like this:
https://jeremy.hu/customize-the-list-of-modules-available-in-jetpack/
This stops auto-activation, but doesn't actually deactivate modules.
Jetpack::deactivate_module( 'related-posts' );
Something along those lines, yes, but ideally I think such a filter would deactivate the module and stops its auto-activation as well in the future.
I think such a filter would deactivate the module and stops its auto-activation as well in the future.
I think if they're going so far as to write code to filter the module list, they can go the extra (small) steps it takes to deactivate it. Plus, deactivating a module is a one-off event which doesn't need a persistent filter.
Closing as wontfix as the jetpack_get_available_modules filter satisfies the needs of filtering out which modules are available, and there are numerous ways to manually deactivate modules via code, CLI, or UI.
Most helpful comment
I think if they're going so far as to write code to filter the module list, they can go the extra (small) steps it takes to deactivate it. Plus, deactivating a module is a one-off event which doesn't need a persistent filter.
Closing as
wontfixas thejetpack_get_available_modulesfilter satisfies the needs of filtering out which modules are available, and there are numerous ways to manually deactivate modules via code, CLI, or UI.