• Resolved roms981

    (@roms981)


    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 status

    for 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 with admin-menu-editor pro activated only returns a list of must-use plugins.

    Long story short: admin-menu-editor pro should check in its isPluginVisible function, if WP CLI is requesting plugin information and and return true regardless of wp_get_current_user or users’ roles.

    A short

    if(DEFINED('WP_CLI') && DEFINED('WP_CLI_VERSION')){
      return true;
    }

    should be enough.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    Thank you for the report! Hmm, I thought I had already fixed this issue in the past and I can’t reproduce it on my own sites. Could you please try that again with the development version of the plugin?

    Thread Starter roms981

    (@roms981)

    thank you, it works. sorry, for the confusion, but somehow wordpress didn’t recognize that an update for admin-menu-editor pro is available.

    Using the latest version fixed the problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘plugin breaks wp-cli plugin commands’ is closed to new replies.