xwp / unsplash-wp

GNU General Public License v2.0
9 stars 3 forks source link

Fix for masorny not load pre WP 5.3 #110

Closed spacedmonkey closed 4 years ago

spacedmonkey commented 4 years ago

Summary

In UVP-178 it was noted that the the masonry view ( using the macy library ) is not loading loading. Looking into the issue more, it seems like the masonry was loading on site running WordPress 5.3 and above. This is because the our code uses a trigger ( backbone event / hook ), to trigger redraw of the masonry called attachments:received. The trigger was only added in 5.3.

In this PR, I simply back port two method that implement this trigger.

Fixes UVP-178

Checklist

spacedmonkey commented 4 years ago

@derekherman This really need to be Alpha IMO.