mindkomm / timmy

Advanced image handling for Timber.
MIT License
171 stars 13 forks source link

wp_make_content_images_responsive() deprecated in version 5.5 of Wordpress #33

Closed thomasansems closed 4 years ago

thomasansems commented 4 years ago

Hi,

After updating to 5.5, there are deprecation warning regarding; wp_make_content_images_responsive is deprecated since version 5.5.0. Use wp_filter_content_tags () instead. Is this on the agenda in future updates?

Kind regards

gchtr commented 4 years ago

Hey @thomasansems

I didn’t have this on the radar yet, thanks for reporting! But are you sure that Timmy is causing the deprecation warning and not another plugin, like Advanced Custom Fields? Because Timmy doesn’t call the wp_make_content_images_responsive() function, which would trigger that warning. There’s only this line, which removes the filter:

remove_filter( 'the_content', 'wp_make_content_images_responsive' );

In my understanding, this shouldn’t cause a deprecation warning.

Of course this doesn’t mean that I don’t have to account for the new wp_filter_content_tags() function, which is called instead of wp_make_content_images_responsive(). I hope I can release a fix this week.

gchtr commented 4 years ago

I added a fix in https://github.com/mindkomm/timmy/commit/58eeb0cac2d69bf3b4154586081f0d02dfac2687, so that for WordPress 5.5, the correct filter will be removed. The fix is released in the 0.14.5 release.

And I’m going to close this issue. If you still think that Timmy is the reason for your deprecation warnings, then I’ll gladly reopen it and investigate further.

thomasansems commented 4 years ago

You are right, thank you for the fix!