The MU forums have moved to

Plugins vs. Hacks (8 posts)

  1. TheDoubtfulRebel
    Posted 14 years ago #

    I've been playing around with WordPress MU for a while now, and there is something I want to ask of programmers who spend a lot of time customizing WordPress MU for clients. (andrea_r comes to mind)

    When you (or your client) desires specific functionality or a high level of customization - is it actually possible to do it all with ONLY plugins? And not modify any of the core files?

    I am finding it difficult to keep my hands off the core files, and I want to know if even the pros have to modify core files from time to time to achieve specific results.

    It sounds like the pros always strongly discourage modifying any core files (for upgrading purposes), but I want to know if you do it anyway.

    Please try to be honest =)

  2. donncha
    Key Master
    Posted 14 years ago #

    You're much better off not modifying core files. Makes life a lot easier when upgrading!

    With a little extra work, I think it's probably possible to do most things using the built in actions.

  3. andrea_r
    Posted 14 years ago #

    There's very few things you actually need to hack - so far the only ones I can think of (offhand) is all the activation & welcome emails (there's a couple hardcoded ones, especially if you don't want them called blogs) and wording on the signup page.

    But even then, there might be a way around that. (custom localization maybe?)

    Sometimes you're stuck, because someone insists it has to be changed and maybe you don't have time and it's faster to hack it.

    But you have to KEEP TRACK OF IT. :D Then upgrade and reapply your hacks.

    Donncha's still right though - you're better off if you can not hack it. And he'll usually accept patches for filters around some areas so they can be customized via plugins. There's been a lot added between major versions.

  4. kgraeme
    Posted 14 years ago #

    Modifying the core files is certainly the fastest solution in the short term. But before we began work on our deployment, I spent a lot of time reading the forums here and the overwhelming amount of times that donncha recommended not modifying the core kinda clued me in that maybe that was a bad idea.

    I'm fortunate to have a great codegrrl (DeannaS) who has done a great job in writing plugins that call the existing hooks to modify most of what we needed to customize in wpmu. New Blog Defaults was a big thing we found missing and that would have been tempting to modify the core to accomplish but she wrote a plugin and now when upgrades come along we only have to test the plugin instead of doing a lot of code change comparisons in the core.

    If you do need to modify the core, look at WHY and if the modification can be written in such a way that a small core tweak will enable you to write a plugin to do the rest, it might be something to submit to the WPMU codebase on Trac. We did that for a modification to the terms of service plugin we're using. So our current 2.7 install is modified, but we know that the 2.7.1 version will incorporate a change that obviates our need for the modified core.

  5. tdjcbe
    Posted 14 years ago #

    I seem to remember a theme counter that came into being because of a hack that someone got tired of doing every version.

    edit: We modify core but we have our own private svn server that we run stuff off of and install from.

  6. TheDoubtfulRebel
    Posted 14 years ago #

    Thanks for replying everyone. I guess I'll have to try to get a better grasp on the use of filters/actions.

    Just as an example though... do you think it would be possible to hijack the import functionality of blogroll (OPML) links with a plugin? I currently have opml.php modified to import the Links into their proper Link Categories, as opposed to forcing all links into one category.

    Is it possible to do this with a plugin?

  7. vlm
    Posted 14 years ago #

    kgraeme ... New Blog Defaults was a big thing we found missing and that would have been tempting to modify the core to accomplish but she wrote a plugin ...

    Available for others to use?

  8. andrea_r
    Posted 14 years ago #

About this Topic

  • Started 14 years ago by TheDoubtfulRebel
  • Latest reply from andrea_r