In Easy Digital Downloads 2.5, we introduced a new organizational structure for our settings screen. Previously, settings were handled with a tabbed system in which each tab contained all related core settings. There was also an Extensions tab that contained all settings for any activated extensions on a single page.
Subsections in 2.5
Now in 2.5, you’ll notice that we’ve separated out our core settings into more manageable subsections, allowing users to find what they’re looking for more quickly and easily.
Not only has this made it easier for us to organize our settings, it also enables extension developers to register their own through a few filters.
So now that you’ve seen how much easier this is to use for our users, here’s how you can integrate your extensions with it.
Integrating with the EDD 2.5 Subsections
In order to register your subsection and your settings, you’ll need to write two functions. The first to register your subsection with a tab, and the second to register all your settings fields.
Registering your Subsection and Settings
Each tab has a filter to register subsections with. They are:
As an example we’ll use the Extensions tab and register our own subsection with the highlighted filter above:
Updating your Extensions
In order to provide a consistent user experience we encourage developers to update their extensions to use this new feature, and we will be following suit by working to get our extensions updated as soon as possible. With the provided example, the subsection system is backwards compatible with EDD Versions prior to 2.5.
If you have any questions on integrating with subsections, please feel free to reach out to us in the comments below.
The development team would like to thank Benjamin Rojas for the initial work on the subsections feature