Modyfying the plugins - the right way (3 posts)

  1. Speed_FANat1c
    Posted 3 years ago #


    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?

  2. 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.

  3. Speed_FANat1c
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.