The problem is the value inside the var $plugin
. The function get_plugin_data
will use the completed path, like /var/www/wp/wp-content/plugins/akismet/akismet.php
.
Add the path before your plugin-folder and it works. I think you can use the constant WP_PLUGIN_DIR
.
Related Posts:
- “Master” WordPress Multisite – Database Sync
- ‘Global’ settings page for multisite plugin
- How to do I get a list of active plugins on my wordpress blog programmatically?
- How to add field for new site-wide option on Network Settings screen?
- Making my plugin multi-site compatible
- How to tell if a plugin is multisite compatible?
- Plugin Development: WPMU or WP?
- WordPress sharding: which multi-DB plugin to use?
- Auto Load Plugin Hooks inside Must Use Plugin
- How Is Network Activate Different From Activate (by Implementation)?
- How to get the main blog’s id and db prefix from a mu plugin?
- Inherit plugin settings to new site in Multisite
- What is a Network Activated Plugin Exactly?
- 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
- Plugins or Tutorials for displaying data from SQL-db on WP-page? [closed]
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Can I enable/disable/hide plugins on a per-site basis in multisite?
- How to enable Admins to see Plugins
- Sharing Ad Revenue among Users of a Multisite in a Collaborative Model?
- While using WordPress Multisite is it possible to display data to main site from subsites?
- Prevent multisite sites from using a plugin
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- Will these plugins work with wp multisite?
- User Signup in Multisite – Need Plugin or Advice
- Add custom text color WordPress 3.9 TinyMCE 4 Visual editor
- 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?
- Multisite – maximum number of users with specific role
- Create a single website with 3 theme options in wordpress
- Why shortcode always displayed after footer not in body
- Understanding State in WordPress Multisites
- WordPress Multisite: Programmatically Activate / Deactivate a Plugin of a Specific Blog
- One sub site is slow while all others load fine, same theme & plugins [closed]
- How to display terms and conditions in post area?
- How to see which sites use my installed plugins (wordpress multisite)
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?
- WordPress super admin login issue. (Automatically logout)
- How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
- Managing wordpress Themes & plugins for multisite
- How to remove a CPT Menu from the Root Admin only
- Hosting multiple sites
- Redirect Plugins.php to New Plugin Page
- Issue removing Media Editor Tabs — Duplicate Items
- WordPress’s is_plugin_active_for_network function not working for multisites
- Cannot add edit themes and add plugins after multisite update
- Each User has a Personal Blog
- Storing Form data in a different database
- Completely remove ability to create users?
- how to make a wplang for network fill automatically
- Creating teams of users in WordPress
- Do WordPress plugins suport multisite site?
- Multisite Plugin – Access options (wp_options) on child sites
- looking for a multi-user hello-world plugin
- How to get values from network settings panel?
- Share plugins, themes, and multi post in a multidomain network
- Plugin to create unlimited custom shortcodes?
- Constructing a Pay to Download music website with wordpress
- 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 a WPMU that uses several different domains, how to enable users to register subdomains of any domain from the main site?
- Multisite Change from domain.com to sub.newdomain.com
- Activation flow of a plugin in a multisite environment
- 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
- Javascript embedded disappears for editors
- WP Forms not displaying,becomming an fatal error
- Can I edit multiple sites with an online WordPress account?
- disable plugin activation on no multisite
- Fatal error: require_once(): Failed opening required
- How to implement data residency in my WordPress 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?
- Creating one user access account for all the multiple sites
- How to use get_blogs_of_user?
- Multisite converted to Single Site can’t add new plugins or new themes
- Copying content from my other websites
- Install/Enable/Activate plugin on multisite without access to master site
- how to add navigation icons in specific template?
- Why my multisite is this slow? (stats inside)
- Category as Subdomain for One WP Install
- How to set plugin across network in multisite and modify it in one place?
- Update javascript URL in header – Domain Mapping Plugin [closed]
- Renamed plugin folder and when I changed back nothing was activated
- How To Add Code To WP Without Plugin or Functions
- Any way to force a specific plugin to use single site tables in multisite installation?
- How to make wp multisite subdomain exist search
- How to Call Function From Separate WordPress Install on Same Server?