Skip to content

Commit

Permalink
Remove enhanced-distribution as default jp module (#5308)
Browse files Browse the repository at this point in the history
  • Loading branch information
WPprodigy authored Mar 5, 2024
1 parent 0d3ba0a commit 1c1a8d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vip-jetpack/jetpack-mandatory.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,19 @@ public function filter_pre_update_option_jetpack_active_modules( $modules ) {

/**
* Hooks the JP jetpack_get_default_modules filter to add
* in our mandatory modules to the array.
* in our mandatory modules to the array and remove unwanted defaults.
*
* @param array $modules An array of Jetpack module slugs
*
* @return array An array of Jetpack module slugs
*/
public function filter_jetpack_get_default_modules( $modules ) {
foreach ( $modules as $index => $module_name ) {
if ( 'enhanced-distribution' === $module_name ) {
unset( $modules[ $index ] );
}
}

return $this->add_mandatory_modules( $modules );
}

Expand Down

0 comments on commit 1c1a8d6

Please sign in to comment.