Control Plugin Load by MU

  1. Vasyltech


    It might be quite beneficial to allow programmatically control the load of active plugins based on current user. It gives more flexibility for administrator to control not only the content but also functionality.
    As example, WordPress Core should not load Plugin X if current user belongs to Role Contributor.

    I was able to accomplish this with Must Use plugin but the implementation is "dirty" because of one reason - the Current User global object is instantiated after Must Use plugins are loaded. It means that all must use plugins are not able to work with $current_user variable.

    If there is a way to initialize Current User right after system load but BEFORE any custom code load, this can give a pretty good opportunity to control plugins load based on user or role.

    Posted: 1 year ago #

RSS feed for this topic


You must log in to post.

  • Rating

    1 Vote
  • Status

    This idea is under consideration