Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings links to Performance features screen #1137

Closed
westonruter opened this issue Apr 15, 2024 · 3 comments · Fixed by #1208
Closed

Add settings links to Performance features screen #1137

westonruter opened this issue Apr 15, 2024 · 3 comments · Fixed by #1208
Labels
[Type] Enhancement A suggestion for improvement of an existing feature

Comments

@westonruter
Copy link
Member

westonruter commented Apr 15, 2024

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:

image

Just as we've added plugin row action links for these plugins (#1131, #1036), we should facilitate discovery on the Performance screen as well.

@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label Apr 15, 2024
@westonruter westonruter added this to the performance-lab 3.1.0 milestone Apr 15, 2024
@benoitfouc
Copy link

Yes complety agree, i was searching for settings so many times for each plugins...

@westonruter
Copy link
Member Author

The settings link can be discovered (as of #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 #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.

@ashwinparthasarathi
Copy link
Contributor

I would like to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
3 participants