Hi @wpallimport, thank you for creating this plugin.
Just like @uncharteddesign in https://wordpress.org/support/topic/install_plugins-permissions-fails-on-protected-environments/, we noticed the missing dashboard menu item in protected environments.
Unfortunately, this forum thread is closed, so I’ll start a new one. We are aware of the WPAI_WPAE_ALLOW_INSECURE_MULTISITE
constant that restores the previous behavior, and while it is a simple fix, it is tedious and error-prone to add it to all projects. Instead, we would like to ask you to use a different capability for permission checking. The problem with install_plugins
is that, as @uncharteddesign correctly said, WordPress dynamically sets it based on the environment.
Fortunately, there are better capabilities to test against for checking super-administrator privileges, specifically setup_network
, which is the “semi-official” way to do it (source). And the cool thing about this capability is that it falls back on manage_options
for non-multisite, so you could even simplify the logic and remove the !is_multisite()
check in https://plugins.trac.wordpress.org/browser/wp-all-import/tags/3.7.5/plugin.php#L243.
We would appreciate you considering implementing this change, also in WP All Import Pro.
Thank you very much!
Phillip