wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Closes #6879 Add meta generator

Open remyperona opened this issue 4 months ago • 3 comments

Description

Fixes #6879

Add meta tag generator to HTML when optimized

Type of change

  • [x] Enhancement (non-breaking change which improves an existing functionality).

Detailed scenario

In optimized HTML, a new meta tag is added: <meta name="generator" content="WP Rocket" data-wpr-features="" />

The data-wpr-features contains the list of features enabled.

Using rocket_disable_meta_generator filter set to true prevents the meta tag from being added.

Using rocket_display_meta_generator_content set to false removes the content="WP Rocket" part.

Technical description

Documentation

Explain how this code works. Diagrams & drawings are welcome.

Mandatory Checklist

Code validation

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

Code style

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

remyperona avatar Oct 15 '24 18:10 remyperona