Dependencies for tag visitors in Optimization Detective #1419
Labels
blocked
[Plugin] Enhanced Responsive Images
Issues for the Enhanced Responsive Images plugin (formerly Auto Sizes)
[Plugin] Image Prioritizer
Issues for the Image Prioritizer plugin (dependent on Optimization Detective)
[Plugin] Optimization Detective
Issues for the Optimization Detective plugin
[Type] Enhancement
A suggestion for improvement of an existing feature
In at least one case, there is a need currently for a tag visitor to run after another tag visitor has run:
performance/plugins/auto-sizes/optimization-detective.php
Lines 54 to 66 in e34711d
The tag visitor in Enhanced Responsive Sizes needs to run after the IMG tag visitor be
The Image Prioritizer's tag visitor is currently registered with the name ID of
img-tags
which is not ideal:performance/plugins/image-prioritizer/helper.php
Lines 33 to 35 in e34711d
It should rather be prefixed like
image-prioritizer-img
. Theimage-prioritizer-img
string could even be defined as a class constant likeImage_Prioritizer_Img_Tag_Visitor::ID
. When Enhanced Responsive Sizes registers its tag visitor, it should be able to explicitly declare this dependency:Then there wouldn't be a need to rely on action priorities (and the current implementation of
OD_Tag_Visitor_Registry
) to ensure that one tag visitor runs before another.The text was updated successfully, but these errors were encountered: