WordPress.org

Ready to get started?Download WordPress

Ideas

multiple plugin directories -or- allow plugins deeper than one directory

  1. scottnath
    Member

    Hi All,

    We have need of multiple plugin directories.

    About our setup:

    We have many, many sites on WordPress and would like to have a Core WordPress install that that is under version control and a would be duplicated throughout all sites and a Contents directory that would have site-specific content, such as the theme, as well as site-unique plugins - this would be under a separate repository from the Core WordPress.

    Each of our sites has four different and separate environments: DEV, QA, STAGE, and PROD.

    I realize this seems like an easy job for MU, however we can't use MU because:
    --1) We can not have sites or even an individual site's environments sharing a database due to stability concerns
    --2) The mu-plugins folder does not look into directories, and thus will negate the use of many plugins out there. (the idea of mu-plugins looking into directories has been rejected: http://core.trac.wordpress.org/ticket/14359)

    Here is the structure we would like to implement:

    SITE DOCROOT

    -CORE WORDPRESS (version controlled, repository used by all sites and their individual environments)
    --Wordpress install
    --*NEW OPTION* CORE plugins

    -SITE CONTENT (version controlled, repository unique to this site and its environments)
    --themes
    --uploads
    --Site plugins (normal WordPress plugins directory)
    ---Includes a pointer to CORE plugins, perhaps a symlink

    The problem with this implementation:

    While we can create a relative symlink to the CORE plugins folder from inside the Site plugins folder, it will only look one directory deep for the plugin files. We need it to look at least two.

    We have done many experiments with get_plugins and all_plugins without positive results.

    The change we would like:

    Can the default WordPress plugins functionality be changed to search more than one directory deep when looking for, and interacting with, plugins?

    thank you for any help,
    Scott Nath
    Senior Developer, Web Development
    NBCUniversal Operations & Technical Services

    Posted: 2 years ago #
  2. iansane
    Member

    I was just googleing to see if this was possible. I'd like to be able to make plugins part of a theme or child theme so they would appear available in the admin panel for activation by a user simply installing my theme. I'm only guessing at this point that plugins could take the form of include files and be included in the functions.php file but it would be nice to make them separate plugins that are able to be activated or deactivated.

    Posted: 2 years ago #
  3. Ipstenu (Mika Epstein)
    Administrator

    iansane - It's possible to code plugins so they only activate if a theme is active, but really if you have to lock in people to a theme, the code should be included IN the theme itself. Just like adding a Theme Options page, you can add in features like that.

    Posted: 2 years ago #
  4. iansane
    Member

    yep I figured that out last night. I have been dissecting the genesis framework to see how they tie theme options, widgets, etc. to the theme. I learned how to make some shortcodes and plugins and thought they all had to be in the plugins directory till I looked through the genesis code.

    Thanks

    Posted: 2 years ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    4 Votes
  • Status

    This idea is under consideration