GoogleChromeLabs / wp-native-lazyload

WordPress plugin to lazy-load media using the native browser feature.
https://wordpress.org/plugins/native-lazyload/
Apache License 2.0
51 stars 13 forks source link

Add filter for overriding image placeholder #23

Closed cr0ybot closed 2 years ago

cr0ybot commented 4 years ago

Summary

This PR can be summarized in the following changelog entry:

Addresses issue #22

Relevant technical choices

Added a filter named native_lazyload_placeholder roughly following the precedent set by native_lazyload_fallback_script_enabled. This filters the lazyload element's src attribute and overrides the hardcoded PLACEHOLDER_PATH.

Also, please note that I assumed this would be a minor version bump, so the filter documentation uses @since 1.1.0.

Checklist: