Updating extension settings for subsections in 2.5

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.

Screen Shot 2016-01-07 at 8.57.36 AM

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:

  • edd_settings_sections_general
  • edd_settings_sections_gateways
  • edd_settings_sections_emails
  • edd_settings_sections_styles
  • edd_settings_sections_taxes
  • edd_settings_sections_extensions
  • edd_settings_sections_misc

As an example we’ll use the Extensions tab and register our own subsection with the highlighted filter above:

Screen Shot 2016-01-07 at 9.33.05 AM

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

2 responses... add one

Glad to see this kind of standarization baked into the main plugin. That should keepthings more organized 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *