One of the most powerful features of Redux are extensions. With extensions you can override or customize any field type, or even extend Redux to do more than it was originally meant to do. With extensions we’ve built metaboxes, customizer support, and a slew of field types.
Loading Extensions
By using the Redux API, you can very easily load extensions. You do so with the following command:
Redux::setExtensions( 'OPT_NAME', 'FULL PATH' );
Be sure to replace OPT_NAME with your opt_name and FULL PATH with the full path to your extension(s) location.
This can be used to reference a single extension, or a folder of extensions. The choice of yours.
A typical “extensions” directory would look somewhat like this:
Creating Your Own Extension
Creating your own extension is quite easy and virtually painless. We even have a boilerplate for you which can be found here:
https://github.com/reduxframework/extension-boilerplate
The concept is simple. The folder, extension php filename, and extension class name, must all match. Place any ajax calls within the extension_YOURNAMEHERE.php file, and place your field specific logic (if it is a field) within the other files. Then make ANYTHING you want for Redux. 😉
Loading Extensions – The Legacy Method
If you are not using the Redux API, then you need to use the legacy method for extensions. This involves a custom loader function being run BEFORE you run your Redux config. You can find full details for this method here.
https://github.com/reduxframework/redux-extensions-loader
Please not that this method is deprecated and we will not provide support for it any longer.