performance
performance copied to clipboard
Add settings links to Performance features screen
Feature Description
Certain plugins have settings (e.g. Modern Image Formats and Speculative Loading). However, discovery of how to access these plugins' settings is not facilitated on the Performance features screen:
Just as we've added plugin row action links for these plugins (#1131, #1036), we should facilitate discovery on the Performance screen as well.
Yes complety agree, i was searching for settings so many times for each plugins...
The settings link can be discovered (as of https://github.com/WordPress/performance/pull/1145 and #1146) by manually applying the plugin_action_links_{slug}
filter, at least for webp-uploads and speculation-rules. For example:
$links = apply_filters( "plugin_action_links_{$plugin_main_file}", array() );
$settings_link = $links['settings'] ?? null;
Reminder: The plugin main file (e.g. speculation-rules/load.php
) is not the same as the slug (e.g. speculation-rules
).
Related: If we do go with Ajax-activation of plugins in https://github.com/WordPress/performance/issues/1139 then the settings link as provided by the standalong plugin may not be known before the plugin is activated. As such, another Ajax request may be needed to fetch the settings links unless we hard-code them in the Performance Lab plugin.
I would like to work on this.