plugin breaks wp-cli plugin commands
-
The admin-menu-editor plugin seems to break WP CLI plugin commands; or more specific, it does not allow WP CLI to access plugin information.
WP CLI is a command line tool which allows, among other things, to manage (list, install, activate, deactivate) plugins.
So
wp plugin list
should give a list of all plugins and their statusfor example:
+———————————————+———-+———–+———+
| name | status | update | version |
+———————————————+———-+———–+———+
| admin-menu-editor-pro | active | available | 2.4.3 |
| advanced-custom-fields-pro | active | available | 5.8.2 |But unfortunately,
admin-menu-editor pro
does restrict plugin information to users (admins, and so on). Since wp cli is not in the allowed users list, it does not get this information.So
wp plugin list
withadmin-menu-editor pro
activated only returns a list of must-use plugins.Long story short:
admin-menu-editor pro
should check in itsisPluginVisible
function, if WP CLI is requesting plugin information and and return true regardless ofwp_get_current_user
or users’ roles.A short
if(DEFINED('WP_CLI') && DEFINED('WP_CLI_VERSION')){ return true; }
should be enough.
Thank you.
- The topic ‘plugin breaks wp-cli plugin commands’ is closed to new replies.