I am making WP plugin,
I am also planning to provide Addons for this plugin.
Please tell me how to make WordPress plugin extendable.
I am making WP plugin,
I am also planning to provide Addons for this plugin.
Please tell me how to make WordPress plugin extendable.
You must be logged in to post a comment.
It really depends on the plugin , it´s functionality , and what “extension” you want or what will they do .
One thing is for sure , you will follow best practice using apply_filters() and add_action()
( specific function codex: apply_filters() & add_action() )
There is a nice tutorial HERE
Of course ,there are other methods, for example you can add the so-called extensions with as a stand-alone plugin, and use
if ( function_available('my_extension') )
to check whether it is installed or not , and verify whether a certain action should or should not be taken place .The best way would be to use action hooks and filters. By doing this you allow other developers to “hook” into your functions or “filter” data before it is used on their sites. You can find more information on how to use them here: http://codex.wordpress.org/Plugin_API