• In a comment here Matt says “However I strongly recommend never touching core files, you should be able to do everything through plugins.”

    Is it really necessary to make a plugin if I just modified my own installation? I know what I’m doing and I diff my installation against the released code before updating, so upgrading isn’t a problem.

    An example: To enable some cool effects I needed to modify the wp_list_pages function in the template-functions-post.php file. I wanted to add:
    – a unique id for every item
    – an onmouseover and an onmouseout on every item
    – some code that would alter the onmouseover and onmouseout input depending on if the item is the current page.

    I modified the wp_list_pages, got my effect working and all is fine. I guess I’ve could have done this using filters, but then I would have to make some kind of advanced regexp which I rather not do because it would take much more time (not to mention learning how to make a WP plugin correctly).

    So, in my case, are there any good reason I shouldn’t modify the core files and instead spend more time making it a plugin?

    (Sorry if this has been discussed earlier – i searched but didn’t find anything.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Usually when I make special versions of core/plugin functions, I first copy them to my-hacks.php, rename them, and then do my magic. I don’t have any more enlightened opinion on the topic, though 🙂

    Thread Starter AdrianB

    (@adrianb)

    Ah, well that seems better than hacking the core files. I’ve never used my-hacks.php, so I never thought about it.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Making a plugin necessary? (vs. hacking core files)’ is closed to new replies.