I would like to add some additional features/functionality with already available WordPress plugin.
Is it possible to carry over my customization while updating the plugin?
The recommended way to get your enhancements into the plugin is: Send your fixes to the developer and ask her to merge them into the original. If your changes are rather personal customizations, this won’t happen.
If the plugin is written in a strict OOP style you can create a second plugin which extends just the classes from the original as you need it (sort of a child plugin). Unfortunately most plugin developers don’t see this need and don’t write their code accordingly. Be aware of the load order problem.
We could help better if you would describe which plugin you want to extend and what exactly you want to change.
Unfortunately it totally depends on the plugin (or more accurately, on the plugin author!) If the author was thinking pro-actively and created the plugin in such a way to make it extensible, then yes, you can create your OWN plugin that adds to the functionality in the existing plugin.
Do make note of what Toscho pointed out - that your plugin order matters (the link again is here).
The most common way to make a plugin extensible is to add hooks (action and filter hooks) that you can then leverage with your own plugin. If you have a good code editor (right now I'm rocking out on NetBeans) you should do a search through the plugin source files for:
If the plugin author is savvy, but is using the global namespace for the plugin functions, he/she may have wrapped the plugin's functions within
If the plugin author is a good OOP coder, he/she may write the plugin code in a granular enough way that is open for extension (since, as the GOF would say, it is definitely closed for modification). Look for lots of granularity in the plugin class - that is to say methods that perform small, highly specific tasks - that can be overridden in your own class that extends the plugin's class. Of course, as Toscho mentions, the class needs to be architected in such a way that it can be overridden, and that its default implementation doesn't invoke itself completely.
Fork or Patch
If the plugin author is using gitHub, or has opened the source in some other way, you can either submit a patch to the author with your proposed modifications (your best bet is to modify the plugin to make it MORE flexible or powerful without removing or changing existing features or functionality), or you can just download the source, modify the plugin header to the extent that it will no longer be updated when the original author pushes an update out, and preferably submit your updated version to the author, or as its own entity directly to WordPress. Be aware that if you do submit the plugin to WP you will need to have a site for it and should be prepared to support it if others download it.
I understand this question is really old but I felt this might help someone.
If you feel the changes would help the community, please submit them to the developer. However, if the changes are unique to your installation, you can continue reading the following.
I had this issue about carrying over changes to updated version of a theme.
We did a recursive diff from
The patch tools create files with changes that could not be applied automatically. We had a few of those, and were easily able to identify and manually make those changes.
While making changes you have to make sure you don't change spacing for the entire file using editor features like auto-indent, etc. That is, make changes only where necessary. That would only make the process of carrying over the changes more time consuming later.