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

Rmove only the version in the meta generator content attribute #7079

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

remyperona
Copy link
Contributor

Description

Remove only the version instead of the full content attribute when we use the related filter.

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

New filter name is rocket_display_meta_generator_content_version. By default, it adds the version to the content attribute. When false, the version is removed.

Technical description

Documentation

Updated the code to only change the display of the version

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@remyperona remyperona added the type: bug Indicates an unexpected problem or unintended behavior label Oct 29, 2024
@remyperona remyperona added this to the 3.17.2 milestone Oct 29, 2024
@remyperona remyperona self-assigned this Oct 29, 2024
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -0.10%) 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6964fc4) 38112 16690 43.79%
Head commit (35522bd) 38112 (+0) 16690 (+0) 43.79% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7079) 4 4 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@Mai-Saad
Copy link
Contributor

Working as expected now
When the filter is false now, we see only WP Rocket (Note: filter name changed to rocket_display_meta_generator_content_version)
ex: <meta name="generator" content="WP Rocket" data-wpr-features="wpr_desktop wpr_preload_links" />
While if filter is true, the version is there
<meta name="generator" content="WP Rocket 3.17.2-alpha1" data-wpr-features="wpr_desktop wpr_preload_links" />

@Mai-Saad Mai-Saad added this pull request to the merge queue Oct 29, 2024
Merged via the queue into develop with commit 30e6ab6 Oct 29, 2024
16 checks passed
@Mai-Saad Mai-Saad deleted the fix/meta-generator-content-version branch October 29, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants