WordPress.org

Support

Support » Plugins and Hacks » Modyfying the plugins – the right way

Modyfying the plugins – the right way

  • Hello,

    if I modify the plugin and later there is an update for that plugin, there is good chanche that after update my modidied files will be overwritten, so my modifications will be gone.

    So I think it should be somehting like extending the plugin – make the child of the plugin or something.

    What is the right way, best practice with plugin modifications?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    The concept for child plugin doesn’t really work with. With child theme’s you inherit the CSS, functions, template, etc.

    But as a plugin can do pretty much do anything, it’s hard to determine what to inherit. 🙂

    if I modify the plugin and later there is an update for that plugin

    If you modify it, update the Plugin Name: and Version: in the plugin header and that should* avoid updates overwriting your changes.

    If you want to modify the output or behavior of that plugin, that’s more fun (and educational BTW). You can make another plugin that adjusts the output via add_filter(), remove and re-add the plugin’s shortcode, etc.

    That way if the original plugin get’s updated, as long as the way it works remains the same, your modify plugin will probably still work.

    *I have to check that part. I think bumping up the version number to ludicrous numbers will prevent an update too.

    thanks for the reply. At first somehow I dind’t think much about those updates and used to modify those plugins, now on one site I cannot remember which of them are modified and which are not. And there are lots of updates.

    At least I wasn’t that stupid – I didn’t modify the wordpress core files 🙂

    But for next project I should thinkg that if I want modify theme – I should make child theme. If I modify the plugin – use your advice.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modyfying the plugins – the right way’ is closed to new replies.
Skip to toolbar