WordPress.org

Ready to get started?Download WordPress

Ideas

Child Plugins

  1. Ipstenu (Mika Epstein)
    Administrator

    You're meant to style it with CSS, not editing the actual code.

    Posted: 1 year ago #
  2. Taylor
    Member

    Running into this same issue for the 1,000th time. I hate having to go in and recode a bunch of hooks just to get the CSS changes I made to stick if the plugin ever updates.

    Posted: 11 months ago #
  3. webbrewers
    Member

    12345

    The usefulness of child plug ins occurred to me too and I found this "idea" thread when I searched to see if it was possible. One scenario I've often come across is a client updating a customized plug in. A back up would take care of that but oftentimes that's not available.
    It would be nice to keep customized files separate in a "plug-ins" directory similar to way you can call non template files with get_stylesheet_directory.

    Posted: 9 months ago #
  4. Ipstenu (Mika Epstein)
    Administrator

    Plugins aren't meant to be edited by end users for one, so do please educate clients whenever possible :)

    Plugin code is so much more (potentially) complex than most themese, this is far more difficult :/ If yove ever tried to adapt functions in a child theme, that's the tip of the iceberg. Basically you'd want to unhook and replace the functions.

    Posted: 9 months ago #
  5. josh1978
    Member

    Yes, the end-user isn't supposed to update code. We got that. But there are still instances where a developer would want to update the code and not have it overwritten each time an update is released.

    I'm both the programmer and end-user of my site. I'm using a few plugins that are correct functionally, but they insert html and CSS that are superfluous or semantically incorrect (e.g. creating a form using a table-based layout, adding inline CSS that i have to write a ton of css with !important to fix).

    This looks promising: http://wordpress.org/plugins/plugin-dependencies/

    Posted: 9 months ago #
  6. webbrewers
    Member

    12345

    The use case I'm referring to is not a client updating code. As I said, what I often see is "a client updating a customized plug in" - to a newer vesion. Can't blame them - they see a warning about a plug in being outdated and think that's the right thing to do, no matter what the developer told them.
    Child plug ins may not be easy to do, but that's not a reason to say it shouldn't be explored and attempted.

    Posted: 9 months ago #
  7. Erlend Sogge Heggen
    Member

    12345

    I think between "Plugin Dependencies" linked above and "Code Snippets" linked below, we're pretty much covered.
    http://wordpress.org/plugins/code-snippets/

    I for one don't see the appeal of child plugins any longer.

    Posted: 9 months ago #
  8. vegasrob
    Member

    I also think that CSS is the best way to style as opposed to changing the actual code since it's better for SEO.

    Posted: 8 months ago #
  9. Ipstenu (Mika Epstein)
    Administrator

    There's a quote here attributed to Lord Buckley: "If you know what to do and you don't do it, there you bloody well are, aren't you?"

    Yes, the end-user isn't supposed to update code. We got that. But there are still instances where a developer would want to update the code and not have it overwritten each time an update is released.

    The proper solution, for the developer, is to fork the plugin. Take the code, make their own version with a new name (I tend to use 'ippy-pluginname') and make it your own. Then when the real plugin has a new version, I compare the diffs.

    If I on;y want to replace one action or function, I use plugins_loaded - Heck I have a large mu-plugin file with all my overrides locally for this:

    http://codex.wordpress.org/Plugin_API/Action_Reference/plugins_loaded

    That's exactly what it's for.

    That said, if I am making major changes on a client site, a fork is way better for sustainability and control:

    1) They can't update it by accident (they have to intentionally goof with files)

    2) My changes won't 'break' on an upgrade like they might with plugins_loaded

    3) I don't have to worry about new features I don't need, because I just won't bring them in.

    Posted: 8 months ago #
  10. As wordpress continues to evolve I'm sure this will become more prevalent. There are different ways to build plugins using "parent" plugins and hopefully soon it will be better than just copying and pasting code.

    Posted: 7 months ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    44 Votes
  • Status

    Sorry, not right now