When working on WordPress Plugins that are going to be used by others, you may want to enable other developers to create their WordPress extensions for your plugin. That will make your plugin grow even more. Previously I have written about 5 Ways to Make your WordPress Plugin Really Extensible and also how to use OOP for Better Conversions in WordPress Plugins. Both can be applied here.
The bottom line is, your plugin must be extensible so you can allow other developers to write WordPress extensions for your plugin. Some might do it still even if your plugin is not extensible, but that is only if they need to do it for a client. That is why I have also written how to extend non extensible plugins.
If your plugin is not yet extensible, don’t worry. That is easy to fix. I recommend you to read this article to the end so you can have a basic idea of how to extend your plugin.
Helper Functions for WordPress Extensions
Let’s first create the helper functions. You can add as many as you want here if you’re going to build something complex. There are two helper functions:
a function to get all the registered extensions
a function to get active extensions
The first function
Source: https://managewp.org/articles/16830/how-to-enable-wordpress-extensions-in-your-plugin
source https://williechiu40.wordpress.com/2017/12/18/how-to-enable-wordpress-extensions-in-your-plugin/
No comments:
Post a Comment