There’s a filter called all_plugins
that seems to do the trick for me:
add_filter( 'all_plugins', 'wpse156903_hide_plugins' );
function wpse156903_hide_plugins( (array) $plugins ) {
// let's hide akismet
if( in_array( 'akismet/akismet.php', array_keys( $plugins ) ) ) {
unset( $plugins['akismet/akismet.php'] );
}
// hide multiple plugins
$hidearr = array(
'plugin1/plugin-file.php',
'plugin2/plugin-file2.php',
// and so on
);
foreach( $hidearr as $hide_me ) {
if( in_array( $hide_me, array_keys( $plugins ) ) ) {
unset( $plugins[$hide_me] );
}
}
return $plugins;
}
Of course you’d replace akismet/akismet.php
with the path to your plugin file. (I picked on Akismet because it’s the first plugin in the list on my site.)
This function masks the existence of the plugin in question in both the Network > Plugins and Site > Plugins lists.
Related Posts:
- How to add field for new site-wide option on Network Settings screen?
- Getting Custom Post Type content from main-site of a Multisite
- WordPress network: set themes and plugins for new blog
- Setting up a multilingual wordpress site
- Plugin to list active plugins across networked sites
- Show function to super admin
- why i cannot see some plugins while they are enabled on network admin page?
- Making my plugin multi-site compatible
- How to tell if a plugin is multisite compatible?
- Plugin Development: WPMU or WP?
- How Is Network Activate Different From Activate (by Implementation)?
- Inherit plugin settings to new site in Multisite
- How to install plugins in individual sites on a wordpress network?
- How to Check If A Plugin Is Enabled Through API?
- Fatal error: Call to undefined function wp_get_current_user()
- How to tell if plugin has been network activated
- How does WordPress Multisite know that a Plugin is installed?
- How to run Two WordPress blogs with different themes and with single database and same content
- Prevent multisite sites from using a plugin
- What is the function to get plugin base url in multisite?
- How to install WordPress Multisite with different domains under the same subdirectory?
- How can I get a list of plugins and which blogs are using them?
- Multiple Domains with Single WordPress Install
- Multisite: Activate plugin for subsites only?
- Error Message from W3 Total Cache when .htaccess Rules Cannot Be Modified? [closed]
- Multisite mu-plugins site-specific directory
- How to get popular post from across a network?
- How to make sexy bookmarks plugin work in WPMU
- How to setup a Network Plugin across the network with only my settings?
- WordPress language switcher
- Multisite Backup Plugin [closed]
- Automatically adding post and pages to new blog setups
- Multisite Widget/Content
- Is it possible to set up multistore in Woocommerce? [closed]
- Reset WordPress website
- WordPress Multisite – get_plugin_data()
- Multisite installation but do plugins always have to be multisite compatible?
- Convert existing WordPress Site (with several plugins) into Multisite
- Portfolio + Blog: multisite or plugin?
- WordPress Multisite user activation hook from email
- Best method to upgrade multisite plugin’s numerous database table
- Multiple sites, multiple countries
- How can I disable the multisite feature of WordPress 3.0?
- Generate pages from markdown files in github automatically
- Install (enable) plugins on multisite, on localhost
- How can I copy all users to newly created site on a multisite network in WordPress?
- External Domain on WordPress Multisite
- Setup page on first login on multisite
- Multiple domains issue
- “Master” WordPress Multisite – Database Sync
- Will these plugins work with wp multisite?
- User Signup in Multisite – Need Plugin or Advice
- Redirect to another page using contact form 7? [closed]
- Network activating; if ( !current_user_can( ‘manage_options’ ) ) locks me out…
- Certain functions are undefined when called form mu-plugins
- Multisite for Multisite?
- Is there a way to get plugins and themes not built for multisite to work on a network subsite?
- Why shortcode always displayed after footer not in body
- WordPress Multisite: Programmatically Activate / Deactivate a Plugin of a Specific Blog
- How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
- Managing wordpress Themes & plugins for multisite
- Redirect Plugins.php to New Plugin Page
- WordPress’s is_plugin_active_for_network function not working for multisites
- Each User has a Personal Blog
- Storing Form data in a different database
- Completely remove ability to create users?
- Do WordPress plugins suport multisite site?
- looking for a multi-user hello-world plugin
- How to get values from network settings panel?
- After enable multisite enviroment in wordpress site creation wizard not working
- Bulk User Deletion
- Best method of implementing compartmentalized custom post types on a multi-site network
- In Multisite Setups, how to update mass sections of sub-sites
- WordPress Multisite Profile Picture Sync Error with Nextend Social Login Plugin
- Hide fields in woocommerce settings
- Multisite – Cloning CPT pages + content (including ACF Flexible Content) from site to site
- How to Fix WordPress multisite woocommerce 403 file error
- How to capture hidden values with Gravity Forms
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- How to use get_blogs_of_user?
- Install/Enable/Activate plugin on multisite without access to master site
- Why my multisite is this slow? (stats inside)
- How to set plugin across network in multisite and modify it in one place?
- Renamed plugin folder and when I changed back nothing was activated
- How To Add Code To WP Without Plugin or Functions
- How to make wp multisite subdomain exist search
- Plugin with AJAX on subdomains causes 404 in console
- Specific plugin script not working on subdomain
- Update page (update-core.php) & Plugins page (plugins.php) revert to homepage
- Show image or notification on specific blog in multisite
- Force Network Activated Plugin to Run After Site Level Plugins
- How to set the default options on an existing plugin in a WP MU new user install
- Custom plugin breaks css.php on Multisite
- Plugin menu replaced by another plugin?
- WPMU site in subdirectory: When I clone a site with NS Cloner Pro plugin, how do I remove the subdirectory from the URL?
- WordPress internationalization + domains
- Trying to output a “Most visited blogs” list in wordpress multisite
- Managing database tables in WordPress multisite
- Add custom fields in the new and edit the site forms without touching the WP core
- Change email notification language based on the site language in WPForms