• Hello,

    I’m the author of Freesoul Deactivate Plugins. FDP allows the user to disable specific plugins on specific pages, including the backend pages.
    If the user disables some plugins in the backend, FDP stores in the cache some information needed to rebuild the admin menu. When it rebuilds the menu, it takes into account that some plugins are disabled in some backend pages, and the capabilities of the logged user.

    When AME is active, the menu items added by the disabled plugins are missing, because AME overrides the admin menu provided by FDP.

    For you would it be possible to show the entire admin menu also on the backend pages where some plugins are disabled?

    I would be very happy to collaborate with you to make AME compatible with FDP.
    For any kind of information you need, feel free to contact me at https://freesoul-deactivate-plugins.com/contact/

    Have a great day!

    Jose

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

    (@whiteshadow)

    In general, I’m pretty pessimistic about that because there are technical constraints on what AME can do. However, here’s some information that may be useful:

    • AME finalizes the admin menu after the admin_menu hook, running at a very late hook priority. So as long as FDP makes its menu changes inside that hook, AME should not override them (unless it has been configured to do that, of course).
    • On the other hand, if FDP – or any other plugin – changes the admin menu in some later, unrelated hook (e.g. admin_head), those changes will be lost when AME is active. It’s not feasible to move AME to a later hook because certain menu properties need to be ready shortly after admin_menu.
    • AME identifies menu items based on their URL. If FDP changes menu URLs when rebuilding the menu, that could cause AME to treat those menu items as “new”. The user can configure AME to automatically hide new items, which would make it look like the changes were overridden. Keeping the URLs the same should prevent this issue.
    • For various compatibility reasons, AME only replaces the global admin menu data immediately before WordPress renders the admin menu. If FDP needs to do the same, or it needs to directly control the rendering of the admin menu, it’s probably not feasible to make these two plugins work together.

    Thread Starter Jose

    (@giuse)

    Hi @whiteshadow

    thank you for your quick reply and information.
    I will take into account what you said and study the code of your plugin.
    I will try to figure out if I can do something on the FDP side, and eventually ask you more specific questions if needed.

    Have a great day!
    Jose

    Thanks to both of you for looking into this. I also found this post which may be related:

    https://wordpress.org/support/topic/bug-with-admin-menu-editor/

    I wasn’t clear if that was part of a potential solution or not. There was a reply from the user so unsure if it resolved their issue.

    Any update on this? Thanks for looking into it! Trying to manage the admin menu is difficult with these two plugins active at the same time.

    Plugin Author Janis Elsts

    (@whiteshadow)

    I’m afraid there’s nothing new on my end.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.