-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
InfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] FeatureA new feature within an existing moduleA new feature within an existing module
Description
The plugin should provide a simple UI (filterable) to enable/disable modules broken down by focus area.
Requirements
- The plugin's settings screen (slug already defined in
PERFLAB_MODULES_SCREENconstant) should be implemented, with a dynamic list of all modules and a checkbox to toggle each one on/off. - It should be an ordinary WordPress settings screen called "Performance Modules", under "Settings".
- All available modules should be dynamically included in the UI, grouped by their
Focusdefinition (see Define basic module specification #2). - Whether a module is enabled or not should be stored in the plugin's setting already defined as
PERFLAB_MODULES_SETTING.
Specification Details
- A function should be implemented that iterates through the
modulesdirectory and gathers all available module information from each module'sload.phpfile header. This can largely be copied from the WordPress core functionget_plugins()which includes all necessary parsing logic. - The screen should be registered with title "Performance Modules" and capability
manage_optionsviaadd_options_page(). - The screen should be a regular settings page using the WordPress Settings API.
- Settings sections should be registered for the initial focus areas
images,javascript,site-health,measurement, andobject-caching, as well as a genericothersection. - Settings fields should be registered for every available module's
enabledsub-setting, associated with the settings section specified in the module'sFocusheader field. - Any settings sections that don't include any modules / settings fields (yet) should not be displayed.
- Every module's name and description should be displayed with the checkbox to toggle it on/off.
- When submitting the HTML form on the screen, the configuration for which modules are enabled should be saved in the plugin's existing
PERFLAB_MODULES_SETTINGoption.
- Settings sections should be registered for the initial focus areas
- PHPUnit test coverage should be added.
This issue depends on #2 for finalizing the module specification and on #28 for completing the PHPUnit infrastructure necessary to validate that the changes included here work correctly.
Metadata
Metadata
Assignees
Labels
InfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] FeatureA new feature within an existing moduleA new feature within an existing module