-
Notifications
You must be signed in to change notification settings - Fork 130
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_SCREEN
constant) 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
Focus
definition (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
modules
directory and gathers all available module information from each module'sload.php
file 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_options
viaadd_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 genericother
section. - Settings fields should be registered for every available module's
enabled
sub-setting, associated with the settings section specified in the module'sFocus
header 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_SETTING
option.
- 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