Changing Behaviour of a WordPress Plugin

Mar 13, 2012   //   by phpfreelancer.biz   //   Blog, Wordpress Plugin Tutorial  //  No Comments

Im new to wordpress plugin development. I want to be able to change the behavior of another wordpress plugin. Is there a good way to do this. ie. Should i create a new plugin to override its behavior, or should I change the plugin directly. If anyone else has some good tips for wordpress plugin development, please let me know.

Easiest would be to just edit the plugin’s source directly then modify its version number to something high like 99999 so that you won’t mistakenly update it through WordPress and wipe out all the edits you’ve made (that happened to me).

Better would be to make another plugin that will modify the behavior of the original plugin, or code it in the functions.php of the theme if the change is minimal, or just edit the plugin’s code then rename it to a different plugin (as plugins hosted at WordPress are GPL2-licensed).

Use, WordPress’ remove_action function to remove the original plugin’s hooks then redeclare them using your own functions using add_action.

Leave a comment

Share This Post

RSS Wordpress News