FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Check for fetchpriority feature being available in WordPress core before loading the module by felixarntz · Pull Request #769 · WordPress/performance · GitHub

Check for fetchpriority feature being available in WordPress core before loading the module - #769

Merged
mukeshpanchal27 merged 2 commits into
trunkfrom
add/fetchpriority-wp63-compat
Jul 3, 2023
Merged

Check for fetchpriority feature being available in WordPress core before loading the module#769
mukeshpanchal27 merged 2 commits into
trunkfrom
add/fetchpriority-wp63-compat

Conversation

felixarntz commented Jun 28, 2023
edited
Loading

Copy link
Copy Markdown
Member

Summary

This PR checks for existence of the fetchpriority feature in WordPress core, which was merged earlier this week and will become widely available with the WordPress 6.3 launch in August (see https://core.trac.wordpress.org/ticket/58235). We should therefore ensure before that release that Performance Lab caters for that situation.

Relevant technical choices

  • For the module, a can-load.php file is added, the default mechanism to check whether a module can be loaded, with the closure returning false when the WP core version on the site already provides the feature.
  • For the standalone plugin version of the module, the can-load.php file is irrelevant, therefore the PR adds an admin notice closure which is only shown for the standalone plugin (based on the specific constant check).
  • The standalone plugin's readme.txt has been updated and the standalone plugin version is bumped to 1.1.0. This will automatically be published together with the next Performance Lab plugin release on July 17.

Screenshots

Performance Lab module checkbox when feature already in core

Admin notice for standalone plugin when feature already in core

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

felixarntz added this to the PL Plugin 2.5.0 milestone Jun 28, 2023
felixarntz added [Type] Enhancement A suggestion for improvement of an existing feature [Focus] Images labels Jun 28, 2023

kt-12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you @felixarntz. LGTM!.

Just an observation, since we are not forcefully disabling fetchpriority for standalone plugin, there can be a chance of having 2 fetchpriority in a page - If the post thumbnail is less than the 50000px threshold, but one of the first 3 content image is larger than the threshold ( a very rare edge case )

Copy link
Copy Markdown
Member Author

@kt-12 Fair point, thanks for raising. I think that's okay though, also given that the standalone plugin currently only has 20+ installs.

mukeshpanchal27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @felixarntz for the PR, Look good to me.

mukeshpanchal27 merged commit dda9253 into trunk Jul 3, 2023
mukeshpanchal27 deleted the add/fetchpriority-wp63-compat branch July 3, 2023 04:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL