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

Filters hooked to tevkori_image_sizes_args are no longer firing in 3.0.0 #226

Closed
joemcgill opened this issue Nov 7, 2015 · 4 comments
Closed
Assignees
Labels
Milestone

Comments

@joemcgill
Copy link
Member

See this issue on WP.org

@joemcgill joemcgill modified the milestone: Next release Nov 7, 2015
@joemcgill joemcgill added the bug label Nov 8, 2015
@jaspermdegroot
Copy link
Member

I don't think they are never firing, because we have a unit test for this which is passing. I will try to reproduce the issue.

@joemcgill
Copy link
Member Author

The unit test assumes we're calling the tevkori_get_sizes() function, but that function no longer runs by default after an upgrade to 3.0.0. What we need to do is route any hooks attached to this function to the wp_calculate_image_sizes() function instead.

@jaspermdegroot
Copy link
Member

I see. So the deprecated tevkori_image_sizes_args filter should still be applied when the new sizes function runs? I thought it only had to be applied when the deprecated tevkori_get_sizes() function is called.
I can create a PR for this.

@joemcgill
Copy link
Member Author

That's correct. If someone has a filter applied to the old tevkori_get_sizes hook, their function should still affect the sizes attribute after upgrading to 3.0

@jaspermdegroot jaspermdegroot self-assigned this Nov 10, 2015
joemcgill added a commit to joemcgill/wp-tevko-responsive-images that referenced this issue Nov 14, 2015
This adds unit test `test_filter_shim_calculate_image_sizes()` which makes sure that
a filter added to `tevkori_image_sizes_args` still fires when the execution path
goes through `wp_calculate_image_sizes()`.
joemcgill added a commit to joemcgill/wp-tevko-responsive-images that referenced this issue Nov 14, 2015
This adds unit test `test_filter_shim_calculate_image_sizes()` which makes sure that
a filter added to `tevkori_image_sizes_args` still fires when the execution path
goes through `wp_calculate_image_sizes()`.
joemcgill added a commit to joemcgill/wp-tevko-responsive-images that referenced this issue Nov 14, 2015
This adds unit test `test_filter_shim_calculate_image_sizes()` which makes sure that
a filter added to `tevkori_image_sizes_args` still fires when the execution path
goes through `wp_calculate_image_sizes()`.
joemcgill added a commit that referenced this issue Nov 15, 2015
This adds unit test `test_filter_shim_calculate_image_sizes()` which makes sure that
a filter added to `tevkori_image_sizes_args` still fires when the execution path
goes through `wp_calculate_image_sizes()`.
joemcgill added a commit that referenced this issue Nov 16, 2015
This adds unit test `test_filter_shim_calculate_image_sizes()` which makes sure that
a filter added to `tevkori_image_sizes_args` still fires when the execution path
goes through `wp_calculate_image_sizes()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants