This repository was archived by the owner on Dec 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Use single regex for loading/srcset/sizes, and only modify attachment images #20
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a418120
Use a single regex for loading/srcset/sizes, and only modify attachme…
66105ac
Add missing filter parameters.
4977fbd
Fix too early return.
0c1e7d9
Fix tests.
8b545a4
Move checks for modifying attributes out of loops for performance.
ab4ffda
Update wp-lazy-loading.php
azaozz 051b5f1
Few more name changes
azaozz f02acc2
Rename wp_filter_content_images to wp_filter_content_tags.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wp_make_content_images_responsiveis used in a lot of plugins, some with > 1m installs. Removing or changing how it works is not a good idea.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't be changed, it just would no longer be used by core. Also I'm curious how it is being used by plugins?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly to run content through it: https://wpdirectory.net/search/01E0PTA8MSD8ZHCC7V4QDG9EV3 but some may be removing it, which will fail if it is not used in core.
Also deprecating a "popular" function is generally not a good idea. I know, sometimes there's no way around it, but not convinced this case qualifies :) (There are about 200 plugins that use the function. If we rename and deprecate it, they will have to "catch up" or will fill millions of error logs with "deprecated" entries.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the purposes of plugin development, the function needs to be replaced.
This discussion can be moved to an issue for wider input from the media team closer to any merge proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterwilsoncc How do you mean "the function needs to be replaced", can you clarify? Not sure I understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixarntz I mean if you'd like to use a single regex while developing this plugin, you'll need to remove the core filter and replace it with a duplicate in this plugin (as the team has done in this PR).
This allows the naming/deprecation discussion to happen outside of this PR.