diff --git a/composer.json b/composer.json index 356f96c65..66b9eb930 100755 --- a/composer.json +++ b/composer.json @@ -66,7 +66,6 @@ "wpackagist-plugin/issuem":"^2.8.7", "wpackagist-plugin/jetpack":"^12.2", "wpackagist-plugin/mathml-block":"^1.2.1", - "wpackagist-plugin/multisite-plugin-manager":"^3.1.6", "wpackagist-plugin/ninja-forms":"^3.6.16", "wpackagist-plugin/participants-database":"^2.1.5", "wpackagist-plugin/pressforward":"^5.2.9", diff --git a/core-plugins/humanities-commons/humanities-commons.php b/core-plugins/humanities-commons/humanities-commons.php index 0b5d4ff38..58a5ab228 100644 --- a/core-plugins/humanities-commons/humanities-commons.php +++ b/core-plugins/humanities-commons/humanities-commons.php @@ -41,6 +41,7 @@ function hcommons_write_error_log( $error_type, $error_message, $info = null ) { require_once ( dirname( __FILE__ ) . '/mailchimp.php' ); require_once ( dirname( __FILE__ ) . '/class-kc-ptc-command.php' ); require_once ( dirname( __FILE__ ) . '/class-kc-command.php' ); +require_once ( dirname( __FILE__ ) . '/manage-plugins.php' ); class Humanities_Commons { diff --git a/core-plugins/humanities-commons/manage-plugins.php b/core-plugins/humanities-commons/manage-plugins.php new file mode 100644 index 000000000..d0a19b493 --- /dev/null +++ b/core-plugins/humanities-commons/manage-plugins.php @@ -0,0 +1,31 @@ + $plugin) { + $plugin_slug = explode('/', $plugin_path)[0]; + if ( + in_array($plugin_slug, $allowed_plugins) || + in_array($plugin_path, $allowed_plugins) || + ( is_plugin_active($plugin_path) && ! is_plugin_active_for_network($plugin_path) ) + ) { + $filtered_plugins[] = $plugin; + } + } + + return $filtered_plugins; +} +add_filter('all_plugins', 'KC\PTC\filter_visible_plugins');