Skip to content

Conversation

@remyperona
Copy link
Contributor

@remyperona remyperona commented Jul 24, 2024

Description

Documentation

User documentation

Add a new filter rocket_lazyload_noscript with a boolean value, that can be used to enable/disable the noscript tag added to lazyloaded images.

Technical documentation

Add a new method noscriptEnabled(), and use it in the lazyloadImages and lazyloadPictures methods.

Type of change

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

Checklists

Feature validation

  • I validated all the Acceptance Criteria. If possible, provide sreenshots 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.

Documentation

  • I prepared the user documentation for the feature/enhancement and shared it in the PR or the GitHub issue.
  • The user documentation covers new/changed entry points (endpoints, WP hooks, configuration files, ...).
  • I prepared the technical documentation if needed, and shared it in the PR or the GitHub issue.

Code style

  • I wrote self-explanatory code about what it does.
  • I wrote comments to explain why it does it.
  • I named variables and functions explicitely.
  • I protected entry points against unexpected inputs.
  • I did not introduce unecessary complexity.

@remyperona remyperona self-assigned this Jul 24, 2024
@remyperona remyperona added the enhancement New feature or request label Jul 24, 2024
@remyperona remyperona marked this pull request as ready for review July 25, 2024 20:30
@remyperona remyperona requested a review from a team July 25, 2024 20:30
Copy link
Contributor

@nicomollet nicomollet left a comment

Choose a reason for hiding this comment

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

Approved

I added an issue in rocket-lazy-load to document the new (and older) filters: wp-media/rocket-lazy-load#146

@remyperona remyperona merged commit 680957e into develop Jul 26, 2024
@remyperona remyperona deleted the enhancement/filter-noscript branch July 26, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants