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

Replace wp_make_content_images_responsive(). #21510

Closed
joemcgill opened this issue Apr 9, 2020 · 3 comments
Closed

Replace wp_make_content_images_responsive(). #21510

joemcgill opened this issue Apr 9, 2020 · 3 comments
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@joemcgill
Copy link
Member

Is your feature request related to a problem? Please describe.
Based on https://core.trac.wordpress.org/changeset/47554, wp_make_content_images_responsive() will be deprecated in WP 5.5 and replaced by wp_filter_content_tags(). There are currently two places in this plugin where wp_make_content_images_responsive() are being called directly, which will throw deprecation notices when running against WP trunk. See: https://github.com/WordPress/gutenberg/search?q=wp_make_content_images_responsive&unscoped_q=wp_make_content_images_responsive

Describe the solution you'd like
Replace instances of wp_make_content_images_responsive() with wp_filter_content_tags() if the latter function exists and fallback to wp_make_content_images_responsive() if not.

Describe alternatives you've considered
I'm curious in the two places where this is called why specifically all these formatting functions are being called directly, rather than applying the_content hook to the template part code?

@johnstonphilip
Copy link
Contributor

I just opened a PR for those here:
#21514

@joemcgill You can find the PR why that (the_content) was changed here:
#20343

@joemcgill
Copy link
Member Author

Yeah the PR looks good. Thanks for the explanation and helpful example. I wonder if long-term it would make sense to process all formatting functions through a filter specifically for template parts so that changes to default formatting of content could be hooked/unhooked as needed, but this takes care of the current problem.

@talldan talldan added [Type] Task Issues or PRs that have been broken down into an individual action to take Backwards Compatibility Issues or PRs that impact backwards compatability labels Apr 20, 2020
@skorasaurus
Copy link
Member

was later fixed in #21514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

4 participants