• SO, in the event you need to edit a core file, say customize the backend per a clients request. Is there a way to assure that all you work does not disappear in the event of an upgrade?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Make it a plugin, Why would you need to edit a core file? There are plugins out there that customize the back end without editing core files.

    Moderator t-p

    (@t-p)

    -you will lose your mods when you nest upgrade the WP.

    -also, unless you know what you are doing, you may inadvertently create some security vulnerabilities.

    Thread Starter justinwhall

    (@jwind)

    Well, mostly CSS and some other minor changes. Haven’t really looked at the plugins in depth but I ‘d like to be able to adjust some layout issues.

    Moderator t-p

    (@t-p)

    If you are talking about making changes to the theme templates, that should be ok, just make a child theme so that when you update theme next time, you don’t lose your customization.

    Thread Starter justinwhall

    (@jwind)

    No, I’m talking about editing core files. I havn’t had to do this often, but chagning the look and layout of the backend would be one example.

    Moderator t-p

    (@t-p)

    No, I’m talking about editing core files.

    see previous responses.

    Thread Starter justinwhall

    (@jwind)

    -you will lose your mods when you nest upgrade the WP.

    I know. That’s why I asked if there is a way for this to not happen.

    -also, unless you know what you are doing, you may inadvertently create some security vulnerabilities.

    I do. And I don’t believe editing a css file poses much of a risk.

    I need to do this too, for different reasons. In my case I’m consuming an RSS with malformed entities. I need to edit some of the SimplePie code to strip out the bad entities without choking entirely.

    I started a new thread, but no one has replied, and every thread I find where someone asks about changing a core file ends the way this one does: silence.

    ANYONE? There has to be a right way…

    Here are the details of what I’m doing (I’ll post a solution there if I find one.) https://www.ads-software.com/support/topic/editing-core-file-simplepie-parsing-chokes-on-entity?replies=1

    Silence seems a big word ??
    The very first answer by kenrik was the right one.

    If you need to modify core files, and you don’t want to have problems when you update WordPress, make it a plugin.
    There is no other possible right answer.

    Well, four days of silence on my original thread, and an awful lot of threads that die out when someone asks *how*. ??

    I’m familiar but not expert with plug-in architecture. I understand how to hook and unhook things, add filters, etc., but I need to replace the Class WP_SimplePie_File

    I could write a new class that extends WP_SimplePie_File, but then I’d have to change the core file that uses WP_SimplePie_File, so I’m left with the same fundamental problem — how to change a file that’s far from the UI.

    Can you point me at a tutorial where I can learn to replace *arbitrary* code (or an arbitrary file?) in the core by writing a plugin?

    Well, I still have no idea how to use a plugin to edit arbitrary core code. It doesn’t seem like there is an action hook or filter that’s relevant, and I haven’t found any other way to interact with the core.

    Is it not possible? It seems like surely there must be a way to simply replace an arbitrary bit of code…it’s literally a ONE LINE change in the file…

    If I have to I’ll save a copy and warn the client to replace it at every upgrade, but boy does that seem like a hack for something pretty straightforward like adding a function to an RSS parser…

    Anyone? Bueller?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Editing Core files’ is closed to new replies.