admin管理员组文章数量:1423871
This is a spin of: how to create child WordPress plugin
I am using a plugin that I use and like a lot, but there is a feature that I need and it seems like the author is busy with life. I am a PHP developer so I could hard code my feature to his plugin, but this way on the next update I will not be able to update without loosing my changes. I have seen that there are some plugins out there that are addons/child to other plugins and they will not work unless you have the main/mother plugin installed.
So my question is what is best to do in this situation? What steps I should take to make sure that after updating the main plugin my child plugin will still work?
This is a spin of: how to create child WordPress plugin
I am using a plugin that I use and like a lot, but there is a feature that I need and it seems like the author is busy with life. I am a PHP developer so I could hard code my feature to his plugin, but this way on the next update I will not be able to update without loosing my changes. I have seen that there are some plugins out there that are addons/child to other plugins and they will not work unless you have the main/mother plugin installed.
So my question is what is best to do in this situation? What steps I should take to make sure that after updating the main plugin my child plugin will still work?
Share Improve this question edited Apr 13, 2017 at 12:37 CommunityBot 1 asked May 22, 2012 at 17:56 RadiRadi 2495 silver badges11 bronze badges 1- 1 Great question! This is a common plugin paradigm that is seldom explained. As well, the question you reference does not make these philosophically practical considerations clear. Thanks for this! – Metagrapher Commented Oct 2, 2015 at 15:23
2 Answers
Reset to default -3Personally I'd either write my own plugin with a if plugin x exists clause or just edit it and send the code off to the developer saying "I have added a feature to your plugin, hope you like it" kinda deal.
Realistically though, in my own site I just edit the code and be done with it cause I know that plugin will be there cause I put it there and won't remove it. If he is too busy to respond to feature requests he is probably too busy to update his plugin so that shouldn't be a problem, just be sure to remember that next time he does update though.
Write your own plugin. I am pretty new to wordpress plugin development and so I have faced the same issue. Luckily I got some good advice from someone who has been working in wordpress for 10 years. Creating your own plugin allows you to keep your own code separate. That will help you avoid reinventing the wheel as well as allow you to update the plugin and turn off your modifications for debugging purposes. If you end up developing something useful then you can forward that plugin to the developer and help them forward the progress of the plugin you found useful in the first place. This article has a pretty detailed breakdown of your options regarding this...
https://wpengine/resources/customize-wordpress-plugin/
本文标签: How to create a childaddon plugin
版权声明:本文标题:How to create a childaddon plugin 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745404743a2657200.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论